]> sourceware.org Git - newlib-cygwin.git/blame - winsup/cygwin/ChangeLog
* syscalls.cc (seteuid32): Fix incorrect use of system_printf.
[newlib-cygwin.git] / winsup / cygwin / ChangeLog
CommitLineData
3557bbc1
CF
12002-07-01 Christopher Faylor <cgf@redhat.com>
2
3 * syscalls.cc (seteuid32): Fix incorrect use of system_printf.
4
74fcdaec
CF
52002-07-02 Christopher January <chris@atomice.net>
6
7 * autoload.cc (GetSecurityInfo): Define new autoload function.
8 (RegQueryInfoKeyA): Ditto.
9 * fhandler.h (fhandler_virtual::fill_filebuf): Change return type to
10 bool.
11 (fhandler_proc::fill_filebuf): Ditto.
12 (fhandler_registry::fill_filebuf): Ditto.
13 (fhandler_process::fill_filebuf): Ditto.
14 (fhandler_registry::value_name): Add new member.
15 (fhandler_registry::close): Add new method.
16 (fhandler_process::p): Remove member.
17 * fhandler_proc.cc (fhandler_proc::open): Add set_nohandle after
18 calling superclass method. Check return value of fill_filebuf.
19 (fhandler_proc::fill_filebuf): Change return type to bool. Add return
20 statement.
21 * fhandler_process.cc (fhandler_process::open): Add set_nohandle after
22 calling superclass method. Remove references to p. Check return value
23 of fill_filebuf.
24 (fhandler_process::fill_filebuf): Change return type to bool. Don't
25 use dereference operator on p. Add return statement.
26 (fhandler_process::format_process_stat): Fix typo.
27 * fhandler_registry.cc: Add static open_key declaration.
28 (fhandler_registry::exists): Assume path is already normalised. Try
29 opening the path as a key in its own right first, before reverting to
30 enumerating subkeys and values of the parent key.
31 (fhandler_registry::fstat): Add additional code to return more relevant
32 information about the registry key/value.
33 (fhandler_registry::readdir): Explicitly set desired access when
34 opening registry key. Remove output of buf from debug_printf format
35 string.
36 (fhandler_registry::open): Use set_io_handle to store registry key
37 handle. Set value_name member. Move code to read a value from the
38 registry to fill_filebuf. Add call to fill_filebuf.
39 (fhandler_registry::close): New method.
40 (fhandler_registry::fill_filebuf): Change return type to bool. Add
41 code to read a value from registry.
42 (fhandler_registry::open_key): Make function static. Use KEY_READ as
43 desired access unless this is the last path component. Check the
44 return value of RegOpenKeyEx for an error instead of hKey.
45 * fhandler_virtual.cc (fhandler_virtual::lseek): Check the return value
46 of fill_filebuf.
47 (fhandler_virtual::open): Remove call to set_nohandle.
48 (fhandler_virtual::fill_filebuf): Change return type to bool. Add
49 return statement.
50 * security.cc (get_nt_object_attribute): New function.
51 (get_object_attribute): New function.
52 * security.h (get_object_attribute): New function declaration.
53
542002-07-01 Pierre Humblet <pierre.humblet@ieee.org>
96edd0a9
CF
55
56 * syscalls.c (seteuid32): Do not return an error when the token cannot
57 be created only because of a problem with the gid.
58
1bc9effd
CF
592002-07-01 Christopher Faylor <cgf@redhat.com>
60
61 * fhandler_clipboard.c (fhandler_dev_clipboard::open): Force text mode.
62 * fhandler_console.cc (fhandler_console::open): *Really* force binary
63 mode rather than make it optional.
64 * fhandler_proc.cc (fhandler_proc::open): Ditto.
65 * fhandler_process.cc (fhandler_process::open): Ditto.
66 * fhandler_random.cc (fhandler_dev_random::fhandler_dev_random): Ditto.
67 * fhandler_raw.cc (fhandler_dev_raw::open): Ditto.
68 * fhandler_registry.cc (fhandler_registry::open): Ditto.
69 * fhandler_tty.cc (fhandler_tty_slave::open): Ditto.
70 * fhandler_virtual.cc (fhandler_virtual::open): Ditto.
71 * fhandler_windows.cc (fhandler_windows::open): Ditto.
72 * fhandler_zero.cc (fhandler_dev_zero::open): Ditto.
73 * net.cc (fdsock): Ditto.
74 * path.cc (set_flags): Add more debugging.
75
b5e1ec76
CF
762002-07-01 Christopher Faylor <cgf@redhat.com>
77
78 * debug.cc (threads): Avoid initialization.
79 * uinfo.cc (cygheap_user::ontherange): (from Corinna Vinschen) Actually
80 make below changes work.
81
db57a363
CF
822002-07-01 Christopher Faylor <cgf@redhat.com>
83
84 * uinfo.cc (cygheap_user::ontherange): Make cygwin root the last resort
85 for HOMEPATH/HOMEDRIVE for consistency with HOME.
86
73d97618
CV
872002-07-01 Corinna Vinschen <corinna@vinschen.de>
88
89 * shared.cc (sec_none): Move to sec_helper.cc.
90 (sec_none_nih): Ditto.
91 (sec_all): Ditto.
92 (sec_all_nih): Ditto.
93 (get_null_sd): Ditto.
94 (sec_acl): Ditto.
95 (__sec_user): Ditto.
96 * sec_helper.cc (sec_none): Move from shared.cc to here.
97 (sec_none_nih): Ditto.
98 (sec_all): Ditto.
99 (sec_all_nih): Ditto.
100 (get_null_sd): Ditto.
101 (sec_acl): Ditto.
102 (__sec_user): Ditto.
103
8297bda0
CF
1042002-06-30 Christopher Faylor <cgf@redhat.com>
105
106 * uinfo.cc (cygheap_user::ontherange): Potentially set HOME from
107 existing homepath and homedrive cygheap_user fields (not currently used
108 yet). Set HOME to / if no other alternative.
109 (cygheap_user::test_uid): Simplify.
110
8a2ce995
CF
1112002-06-30 Christopher Faylor <cgf@redhat.com>
112
113 * environ.cc (parse_options): Use setenv to potentially replace CYGWIN
114 value on export. Fixes broken behavior since November 2000 changes.
115 (regopt): Return indication of whether or not something has been parsed
116 from the registry.
117 (environ_init): Only attempt to export CYGWIN variable when values were
118 set from the registry. It is exported automatically otherwise.
119
fdf0b5de
CF
1202002-06-30 Christopher Faylor <cgf@redhat.com>
121
122 * fhandler.h (fhandler_process::pid): New field.
123 (fhandler_process::fstat): Remove unneeded array. Set pid element.
124 (fhandler_process::open): Ditto.
125 (fhandler_process::fill_filebuf): Handle case where 'p' field is NULL.
126
ccacec81
CF
1272002-06-30 Christopher Faylor <cgf@redhat.com>
128
129 * fhandler.h (fhandler_process::p): New field.
130 (fhandler_process:fill_filebuf): Revert to same definition as virtual
131 in parent class.
132 (fhandler_process::open): Fill out p field rather than passing as an
133 argument.
134 (fhandler_process::fill_filebuf): Use p pointer rather than argument.
135
fad1c3a8 1362002-06-29 Pierre Humblet <pierre.humblet@ieee.org>
c6d90e84
CV
137
138 * security.cc (extract_nt_dom_user): Check for all buffer overflows.
139 Call LookupAccountSid after trying to get domain & user from passwd.
140 (get_group_sidlist): Obtain the domain and user by calling
141 extract_nt_dom_user instead of LookupAccountSid.
142
839b2942
CF
1432002-06-29 Christopher Faylor <cgf@redhat.com>
144
145 * uinfo.cc (cygheap_user::test_uid): Use standard issetuid test.
146
efc1575e
CF
1472002-06-29 Christopher Faylor <cgf@redhat.com>
148
149 * autoload.cc (NetGetDCName): Change to make this an optional load
150 function.
151 * cygheap.h (cygheap_user::logsrv): Return NULL when operation fails.
152 (cygheap_user::winname): Ditto.
153 (cygheap_user::domain): Ditto.
154 * uinfo.cc (cygheap_user::env_logsrv): Save results in temp variable.
155 (cygheap_user::env_userprofile): Ditto.
156
638180f5
CF
1572002-06-29 Christopher Faylor <cgf@redhat.com>
158
159 * environ.cc (spenv::retrieve): Detect return of env_dontadd from
160 cygheap_user methods.
161 (build_env): Avoid incrementing environment pointer if not actually
162 adding to the environment. That could result in garbage in the
163 environment table. Be more defensive when reallocing envblock.
164
38bc1196
CF
1652002-06-29 Christopher Faylor <cgf@redhat.com>
166
167 * uinfo.cc (cygheap_user::test_uid): Return NULL or further tests are
168 sorta useless.
169 (cygheap_user::env_domain): Recalculate if name is missing.
170
664075a3
CF
1712002-06-29 Christopher Faylor <cgf@redhat.com>
172
173 * environ.cc (spenv::from_cygheap): Still need to take setuid into
174 consideration.
175
e97962b9
CF
1762002-06-28 Christopher Faylor <cgf@redhat.com>
177
178 * uinfo.cc (cygheap_user::env_logsrv): Return "almost_null" in case
179 where no domain or username is "SYSTEM".
180
094d5193
CF
1812002-06-28 Christopher Faylor <cgf@redhat.com>
182
183 * cygheap.h (cygheap_user): Reorg to accommodate environment caching.
184 (cygheap_user::logsrv): New method.
185 (cygheap_user::winname): Ditto.
186 (cygheap_user::domain): Ditto.
187 (cygheap_user::test_uid): Ditto.
188 * cygheap.cc (cygheap_user::set_name): Reflect name "pwinname" name
189 change.
190 * environ.cc (getwinenveq): New function.
664075a3 191 (penv::from_cygheap): penv::from_cygheap): Change arguments.
094d5193
CF
192 (spenv::retrieve): Ditto for call. Use getwinenveq to retrieve info
193 from environment. Always return value from cygwin environment, if it
194 exists.
195 * environ.h (getwinenveq): Declare.
196 * uinfo.cc (cygheap_user::ontherange): Use logsrv() rather than
197 env_logsrv().
198 (cygheap_user::test_uid): Define new method.
199 (cygheap_user::env_logsrv): Accept environment arguments. Use test_uid
200 to find info.
201 (cygheap_user::env_domain): Ditto.
202 (cygheap_user::env_userprofile): Ditto.
203 (cygheap_user::env_homepath): Ditto.
204 (cygheap_user::env_homedrive): Ditto.
205 (cygheap_user::env_name): Ditto.
206
179cae11
CF
2072002-06-27 Christopher Faylor <cgf@redhat.com>
208
209 * cygheap.cc (cfree_and_set): New function.
210 (cygheap_user::set_name): Use cfree_and_set to reset members.
211 * cygheap.h (cygheap_user): Delete static members.
212 (cygheap_user::puserprof): New member.
213 (cfree_and_set): Declare.
214 * dcrt0.cc (almost_null): Define.
bf75aae8 215 * environ.cc (env_dontadd): Redefine as "almost_null".
179cae11
CF
216 * winsup.h (almost_null): Declare.
217 * syscalls.cc (cfree_and_set): Remove unused variable.
218 * uinfo.cc (cygheap_user::homepath_env_buf): Eliminate.
219 (cygheap_user::homedrive_env_buf): Ditto.
220 (cygheap_user::userprofile_env_buf): Ditto.
221 (cygheap_user::ontherange): YA change to try to preserve existing
222 HOMEPATH and HOMEDRIVE. Return almost_null values when variables
223 should not actually exist.
224 (cygheap_user::env_logsrv): Ditto.
225 (cygheap_user::env_domain): Ditto.
226 (cygheap_user::env_userprofile): Ditto.
227
eba23038
CV
2282002-06-27 Corinna Vinschen <corinna@vinschen.de>
229
230 * dcrt0.cc (dll_crt0_1): Let __progname point to the applications
231 basename. Move eliminating ".exe" suffix from argv[0] so that it
232 always also affects __progname.
233
196cdd45
CF
2342002-06-27 Thomas Pfaff <tpfaff@gmx.net>
235
236 * thread.cc (pthread::create): Added trace printf to get CreateThread
237 LastError.
238
5b509758
CV
2392002-06-27 Corinna Vinschen <corinna@vinschen.de>
240
241 * mmap.cc (list::match): Check using pagesize aligned size.
242
75c6a983
CF
2432002-06-26 Christopher Faylor <cgf@redhat.com>
244
245 * fhandler_disk_file.cc (fhandler_disk_file::fstat_by_name): Force
246 FindFirstFile on first file of directory when asking for x:\ .
247
b3e2d035
CF
2482002-06-26 Christopher Faylor <cgf@redhat.com>
249
250 * cygheap.cc (cygheap_user::set_name): Correct thinko in below change.
251
c99902b9
CF
2522002-06-26 Christopher Faylor <cgf@redhat.com>
253
254 * cygheap.cc (cygheap_user::set_name): Avoid clearing things when just
255 setting name to itself or during first time initialization.
256
257 * environ.cc (check_case_init): Make case insensitive.
258
be5007aa
CV
2592002-06-26 Corinna Vinschen <corinna@vinschen.de>
260
261 * fhandler.h (fhandler_socket::bind): Add method definition.
262 (fhandler_socket::connect): Ditto.
263 (fhandler_socket::listen): Ditto.
264 (fhandler_socket::accept): Ditto.
265 (fhandler_socket::getsockname): Ditto.
266 (fhandler_socket::getpeername): Ditto.
267 (fhandler_socket::recvfrom): Ditto.
268 (fhandler_socket::recvmsg): Ditto.
269 (fhandler_socket::sendto): Ditto.
270 (fhandler_socket::sendmsg): Ditto.
271 (fhandler_socket::shutdown): Ditto.
272 * fhandler_socket.cc (get_inet_addr): Move here from net.cc.
273 (fhandler_socket::bind): New method.
274 (fhandler_socket::connect): Ditto.
275 (fhandler_socket::listen): Ditto.
276 (fhandler_socket::accept): Ditto.
277 (fhandler_socket::getsockname): Ditto.
278 (fhandler_socket::getpeername): Ditto.
279 (fhandler_socket::recvfrom): Ditto.
280 (fhandler_socket::recvmsg): Ditto.
281 (fhandler_socket::sendto): Ditto.
282 (fhandler_socket::sendmsg): Ditto.
283 (fhandler_socket::shutdown): Ditto.
284 * net.cc: Various formatting cleanups throughout.
285 (get_inet_addr): Move to fhandler_socket.cc.
286 (cygwin_bind): Move base functionality to appropriate fhandler_socket
287 method.
288 (cygwin_connect): Ditto.
289 (cygwin_listen): Ditto.
290 (cygwin_accept): Ditto.
291 (cygwin_getsockname): Ditto.
292 (cygwin_getpeername): Ditto.
293 (cygwin_recvfrom): Ditto.
294 (cygwin_recvmsg): Ditto.
295 (cygwin_sendto): Ditto.
296 (cygwin_sendmsg): Ditto.
297 (cygwin_shutdown): Ditto.
298
303af157
CV
2992002-06-26 Corinna Vinschen <corinna@vinschen.de>
300
301 * pwdgrp.h (pwdgrp_read::~pwdgrp_read): Avoid compiler warning.
302
8698edb8
CF
3032002-06-26 Christopher Faylor <cgf@redhat.com>
304
305 * dcrt0.cc (_dcrt0): Be more defensive when reserved block is used and
306 it's not cygwin info.
307
f279e522
CF
3082002-06-26 Christopher Faylor <cgf@redhat.com>
309
310 * autoload (noload): Avoid clobbering bx register.
311
312 * environ.cc (codepage_init): Use case insensitive match.
313
314 * fhandler_console.cc (cp_get_internal): Delete.
315 (con_to_str): Use get_cp to derive code page.
316 (str_to_con): Ditto.
317 * miscfuncs.cc (get_cp): New function.
318 (sys_wcstombs): New function. Converted from macro.
319 (sys_mbstowcs): Ditto.
320 * winsup.h: Reflect above changes.
321
109e4822
CF
3222002-06-26 Christopher Faylor <cgf@redhat.com>
323
324 * winsup.h: Minor cleanup.
325 * path.h (path_conv::[]): New operator.
326 * syscalls.cc (_link): Use path_conv operators rather than methods,
327 where appropriate. Minor white space cleanup.
328
3292002-06-26 Christopher Faylor <cgf@redhat.com>
330
331 * include/cygwin/version.h: Bump DLL minor number.
332
3332002-06-25 Christopher Faylor <cgf@redhat.com>
334
335 * dcrt0.cc (sm): Make NO_COPY.
336
6331b658
CV
3372002-06-25 Corinna Vinschen <corinna@vinschen.de>
338
339 * syscalls.cc (chown): Convert uid to 32 bit.
340 (lchown): Ditto.
341 (fchown): Ditto.
342
e773b7cf
CF
3432002-06-24 Christopher Faylor <cgf@redhat.com>
344
345 * dtable.cc (dtable::find_unused_handle): Avoid coercion.
346
4c78be52
CF
3472002-06-24 Christopher Faylor <cgf@redhat.com>
348
349 * dtable.cc (fhandler_base::dup2): Cleanup. Ensure that lock is turned
350 off in error condition.
351
1fd072b6
CV
3522002-06-24 Corinna Vinschen <corinna@vinschen.de>
353
354 * uinfo.cc (internal_getlogin): Set myself->uid and myself->gid instead
355 of user.real_uid and user.real_gid.
356 (uinfo_init): Evaluate orig_uid and real_uid from myself->uid. Ditto
357 for gid.
358
de0557f7
CF
3592002-06-23 Pierre Humblet <pierre.humblet@ieee.org>
360
361 * security.cc (get_group_sidlist): Add pw argument and use pw->pw_name
362 in call to get_supplementary_group_sidlist.
363 (create_token): Add pw argument and use it in call to
364 get_group_sidlist.
365 * security.h: Add pw argument in declaration of create_token.
366 * syscalls.cc (seteuid32): Add pw argument in call to create_token.
367
035bfbdd
CF
3682002-06-23 Conrad Scott <conrad.scott@dsl.pipex.com>
369
370 * fhandler.cc (fhandler_base::fstat): Set S_IFIFO for pipes.
371 * fhandler_socket.cc (fhandler_socket.cc::fstat): Set S_IFSOCK.
372
eecef29f
CF
3732002-06-23 Christopher Faylor <cgf@redhat.com>
374
375 * lib/_cygwin_S_IEXEC.cc: Remove obsolete file.
376
85b995d4
CF
3772002-06-23 Christopher Faylor <cgf@redhat.com>
378
379 Use cygwin_{shm,ipc}.h instead of /sys/{shm,ipc}.h throughout.
380 * sys/ipc.h: Remove.
381 * sys/shm.h: Remove.
382 * cygwin_ipc.h: New file.
383 * cygwin_shm.h: New file.
384
6bda8def
CF
3852002-06-23 Christopher Faylor <cgf@redhat.com>
386
387 * cygwin.sc: Add recent changes from ld sources.
388
3892002-06-23 Conrad Scott <conrad.scott@dsl.pipex.com>
390
391 * winsup.h: Move #ifdef EXPCGF code into "winbase.h".
392 * winbase.h: #ifdef EXPCGF code moved here from "winsup.h".
393
f6709c07
RC
3942002-06-12 Thomas Pfaff <tpfaff@gmx.net>
395
396 * thread.h (pthread::cleanup_stack): Renamed cleanup_handlers to
397 cleanup_stack.
398 * thread.cc (pthread::pthread): Ditto.
399 (pthread::create): Fixed mutex verification.
400 (pthread::push_cleanup_handler): Renamed cleanup_handlers to
401 cleanup_stack.
402 Mutex calls removed, used InterlockedExchangePointer instead.
403 (pthread::pop_cleanup_handler): Renamed cleanup_handlers to
404 cleanup_stack.
405 (pthread::pop_all_cleanup_handlers): Ditto.
406 (__pthread_once): Check state first and return if already done.
407 (__pthread_join): DEADLOCK test reverted to __pthread_equal
408 call.
409 (__pthread_detach): Unlock mutex before deletion.
410
0278e3a3
CF
4112002-06-21 Christopher Faylor <cgf@redhat.com>
412
413 * Makefile.in (cygrun.exe): Move -lgcc where it will do some good.
414
1a7cb557
CV
4152002-06-21 Corinna Vinschen <corinna@vinschen.de>
416
417 * syscalls.cc (stat64_to_stat32): Correctly evaluate st_rdev.
418 (fstat64): Set st_rdev to same value as st_dev.
419 (stat_worker): Ditto.
420
49056987
CV
4212002-06-21 Corinna Vinschen <corinna@vinschen.de>
422
423 * security.cc (alloc_sd): Carefully check owner_sid again after trying
424 SIDs from cygheap.
425
dd0208eb
CV
4262002-06-21 Corinna Vinschen <corinna@vinschen.de>
427
428 * security.cc (alloc_sd): Remove unnecessary retrieval of owner name.
429 Check uid for current user first and use SIDs from cygheap if so.
430 Set errno to EINVAL if user SID isn't retrievable. Just print user SID
431 as debug output.
432 Don't bail out if group SID isn't retrievable. Change debug output
433 appropriately.
434
d7c2bd8e
CF
4352002-06-21 Christopher Faylor <cgf@redhat.com>
436
437 * errno.cc: Change text description for EBADF throughout.
438
7c02f861
CF
4392002-06-20 Pierre Humblet <pierre.humblet@ieee.org>
440
441 * uinfo.cc (cygheap_user::ontherange): Use env_name for NetUserGetInfo.
442 (cygheap_user::env_logsrv): Verify env_domain is valid.
443 * environ.cc: Include child_info.h and keep spenvs[] sorted.
444 (environ_init): Check child_proc_info instead of myself->ppid_handle.
445
c25ebbaf
CF
4462002-06-19 Christopher Faylor <cgf@redhat.com>
447
448 * fhandler.cc (fhandler_base::set_flags): Change priority of "linked
449 in" default binmode setting so that it has priority over optional
450 setting.
451
03a2ce9a
CF
4522002-06-19 Christopher Faylor <cgf@redhat.com>
453
d70b993f 454 Use hMainProc where appropriate, throughout.
03a2ce9a
CF
455 * environ.cc (spenv::retrieve): Add debugging statements.
456
457 * pinfo.cc (set_myself): Don't call strace.hello if already stracing.
458 * strace.cc (strace): Move NO_COPY keyword so that it will actually
459 take effect.
460
834224ab
CV
4612002-06-19 Corinna Vinschen <corinna@vinschen.de>
462
463 * uinfo.cc (cygheap_user::ontherange): Call NetUserGetInfo() only with
464 non-NULL logserver parameter.
465
e40670ee
CF
4662002-06-16 Christopher Faylor <cgf@redhat.com>
467
468 * cygheap.h (cygheap_user::issetuid): New method.
469 * dtable.cc (dtable::vfork_child_dup): Use new method to determine if
470 we are in "setuid mode."
471 * fork.cc (fork_parent): Ditto.
472 * spawn.cc (spawn_guts): Ditto.
473 * syscalls.cc (seteuid32): Ditto.
474 (setegid32): Ditto.
475 * environ.cc (spenv::retrieve): (Suggested by Pierre Humblet) Do
476 potential recalculation of cygheap_user stuff when in setuid mode.
00a9e8a0
CF
477 Return special value when environment variable should be calculated but
478 not added.
e40670ee
CF
479 (build_env): Don't add retrieved value to dstp if it is 'dont_add'.
480
a05a9e01
CF
4812002-06-16 Christopher Faylor <cgf@redhat.com>
482
483 Changes suggested by Pierre Humblet.
484 * environ.cc (NL): New macro.
485 (conv_envvars): Use NL macro to fill in name and namelen.
486 (spenv::namelen): New field.
487 (spenvs): Use NL to fill in name and namelen.
488 (spenv::retrieve): Eliminate length argument. Instead, use namelen
489 throughout.
490 (build_env): Don't calculate length of initial FOO= part of
491 environment. Accommodate spenv::retrive argument change.
492
5f25e1d1
CF
4932002-06-16 Christopher Faylor <cgf@redhat.com>
494
495 * cygheap.h (cygheap_user::winname): New field.
496 * cygheap.cc (cygheap_user::set_name): Clear winname when name changes.
497 * uinfo.cc (cygheap_user::env_logsrv): Avoid calculating server when
498 Windows user == SYSTEM.
499 (cygheap_user::env_domain): Set winname here too.
500 (cygheap_user::env_userprofile): Eliminate superfluous tests.
501 (cygheap_user::env_name): Seed winname by calling env_domain().
502
5c8bce24
CF
5032002-06-12 Pierre Humblet <pierre.humblet@ieee.org>
504
505 * spawn.cc (spawn_guts): Revert removal of ciresrv.moreinfo->uid =
506 ILLEGAL_UID.
507
6ea3e429
CF
5082002-06-15 Christopher Faylor <cgf@redhat.com>
509
510 * child_info.h (child_proc_info): Declare as base class.
511 (spawn_info): Declare as alias of child_proc_info to aid debugging.
512 (fork_info): Ditto.
513 * cygheap.cc (cygheap_fixup_in_child): Use child_proc_info global
514 rather than parameter.
515 * cygheap.h (cygheap_fixup_in_child): Reflect above change in
516 declaration.
517 * dcrt0.cc (_dll_crt0): Move 'si' definition here. Assign
518 child_proc_info.
519 (dll_crt0_1): Accommodate cygheap_fixup_in_child and *_info changes.
520 * environ.cc (spenv::retrieve): Make regparm.
521 * environ.h (environ_init): Ditto.
522 (win_env::add_cache): Ditto.
523 (build_env): Ditto.
524 (getwinenv): Ditto.
525 * fork.cc (sync_with_parent): Use fork_info global.
526 (fork_child): Ditto.
527
cff111a6
CF
5282002-06-14 Christopher Faylor <cgf@redhat.com>
529
530 * uinfo.cc (cygheap_user::ontherange): Don't set HOMEDRIVE or HOMEPATH
531 unless one or the other is specified.
532
6d171b44
CF
5332002-06-14 Christopher Faylor <cgf@redhat.com>
534
535 * cygheap.h (cygheap_user::userprofile_env_buf): New static member.
536 * environ.cc (build_env): Add debugging statement.
537 (spenvs): Switch functions for USERDOMAIN and USERNAME.
538 * spawn.cc (spawn_guts): Move environment initialization prior to
539 cygheap_setup_for_child or environment info will never be copied to
540 child.
541
a77d35f7
CF
5422002-06-14 Christopher Faylor <cgf@redhat.com>
543
544 * cygheap.h (cygheap_user): Add static members to hold home{drive,path}
545 info.
546 * uinfo.cc (cygheap_user::ontherange): Use static class members for
547 local HOME* storage.
548
9a771b29
CF
5492002-06-14 Christopher Faylor <cgf@redhat.com>
550
551 * cygheap.cc (cygheap_user::set_logsrv): Remove.
552 (cygheap_user::set_domain): Ditto.
553 * cygheap.h (cygheap_user::set_logsrv): Remove declaration.
554 (cygheap_user::set_domain): Ditto.
555 (cygheap_user::env_domain): Declare new method.
556 (cygheap_user::env_name): Ditto.
557 * environ.cc (spenvs): Add two environment variables.
558 * spawn.cc (spawn_guts): Call build_env after RevertToSelf. Always set
559 ciresrv.mount_h.
560 (cygheap_user::ontherange): Recalculate homedrive/homepath if they are
561 empty. Use env_logsrv to get logon server.
562 (cygheap_user::env_logsrv): Calculate server name here rather than
563 relying on it having been previously calculated.
564 (cygheap_user::env_domain): Ditto for domain name.
565 (cygheap-user::env_name): New method.
566
5672002-06-12 Pierre Humblet <pierre.humblet@ieee.org>
568
569 * syscalls.cc (seteuid32): Do not get or set the environment. Do not
570 call LookupAccountSid nor internal_getlogin. Set cygheap->user name
571 and sid from the passwd entry.
572 * uinfo.cc (uinfo_init): Only call internal_getlogin when starting from
573 a non Cygwin process and use the values returned in user.
574 (internal_getlogin): Simplify to case where starting from a non Cygwin
575 process. Store return values in user and return void. Do not set the
576 Windows default environment.
577 * dcrt0.cc (dll_crt0_1): Call uinfo_init only when needed. Do not set
578 myself->uid nor reset user.sid.
579 * spawn.cc (spawn_guts): Get the sid from cygheap->user. Always
580 RevertToSelf(). Don't set uid in impersonated case.
581 * cygheap.cc (cygheap_user::set_sid): Do not set orig_sig.
582 (cygheap_user::set_orig_sid): New.
583 * cygheap.h: Declare cygheap_user::set_sid.
584 * winsup.h: Add argument to uinfo_init().
585
470e8c46
CV
5862002-06-14 Corinna Vinschen <corinna@vinschen.de>
587
588 * environ.cc (build_env): If realloc moves envblock, move s with it.
589
39be53dc
CF
5902002-06-13 Nicholas S. Wourms <nwourms@netscape.net>
591
592 * winver.rc: Add more words to copyright.
593
0e6d80e4
CV
5942002-06-13 Corinna Vinschen <corinna@vinschen.de>
595
596 * cygheap.cc (cygheap_user::set_name): Revert previous change.
597 * environ.cc (spenv::retrieve): Check return value of call to
598 cygheap->user.*from_cygheap().
599
5682a6dd
CV
6002002-06-13 Corinna Vinschen <corinna@vinschen.de>
601
602 * cygheap.cc (cygheap_user::set_name): Remove setting homedrive and
603 homepath to NULL.
604 (cygheap_user::set_logsrv): Fix free'ing of plogsrv.
605 * cygheap.h (cygheap_user::cygheap_user): Initialize homedrive and
606 homepath to NULL.
607
5f74ae83
CF
6082002-06-13 Christopher Faylor <cgf@redhat.com>
609
610 * security.cc (get_logon_server): Use strcasematch rather than
611 strcasecmp.
612
4863867a
CF
6132002-06-12 Christopher Faylor <cgf@redhat.com>
614
615 * path.cc (chdir): Minor cleanup.
616
12a2ef44
CF
6172002-06-12 Christopher Faylor <cgf@redhat.com>
618
619 * environ.cc (build_env): Correctly fill out windows environment block
620 with win32 paths rather than posix paths.
621
da086d02
CF
6222002-06-12 Christopher Faylor <cgf@redhat.com>
623
624 * cygheap.cc (cygheap_user::set_name): Set homedrive and homepath to
625 NULL on user name change.
626 (cygheap_user::set_logsrv): Allocate enough space for leading \\ so
627 that we can put this in the environment, if needed.
628 * cygheap.h (homebodies): New enum.
629 (cygheap_user::homedrive): New field.
630 (cygheap_user::homepath): Ditto.
631 (cygheap_user::env_logsrv): New method.
632 (cygheap_user::env_homepath): New method.
633 (cygheap_user::env_homedrive): New method.
634 (cygheap_user::env_userprofile): New method.
635 (cygheap_user::ontherange): New method.
636 * environ.cc (envsize): Eliminate debugging argument.
637 (environ_init): Assume that envc counts number of elments not total
638 size.
639 (spenv): New class.
640 (spenvs): New array, renamed from forced_winenv_vars, using spenv.
641 (spenv::retrieve): New method.
642 (build_env): Rename from 'winenv' -- one stop shopping for building new
643 environment blocks for both windows and "unix".
644 * environ.h (build_env: Declare.
645 (winenv): Delete declaration.
646 (envsize): Ditto.
647 * spawn.cc (spawn_guts): Use build_env to build windows and cygwin
648 environment blocks.
649 * uinfo.cc (internal_getlogin): Eliminate environment manipulation.
650 Default to info from GetUserName if it exists. Move HOMEPATH and
651 HOMEDRIVE stuff elsewhere. Move HOME setting elsewhere. Only set HOME
652 environment variable in processes that are not parented by a cygwin
653 process.
654 (cygheap_user::ontherange): Define new method.
655 (cygheap_user::env_logsrv): Ditto.
656 (cygheap_user::env_homepath): Ditto.
657 (cygheap_user::env_homedrive): Ditto.
658 (cygheap_user::env_userprofile): Ditto.
659
077d8b23
CF
6602002-06-11 Christopher Faylor <cgf@redhat.com>
661
662 * spawn.cc (spawn_guts): More hToken removal cleanup.
663
d5377829
CF
6642002-06-09 Pierre Humblet <pierre.humblet@ieee.org>
665
666 * spawn.cc (spawn_guts): Define sec_attribs and call sec_user_nih()
667 only once.
668
380aaf2d
CF
6692002-06-10 Christopher Faylor <cgf@redhat.com>
670
671 * Makefile.in: Ensure that -MD gets added to CFLAGS regardless of
672 CFLAGS command-line setting.
673
674 * cygwin.din: Export sexec* functions as function which returns ENOSYS
675 (i.e., sexec* is deprecated).
676 * dtable.cc (dtable::vfork_child_dup): Ensure that impersonation is
677 restored even on failure.
678 * exec.cc: Throughout, remove references to sexec* and _spawnve.
679 * pinfo.h: Remove _spawnve declaration.
680 * spawn.cc: Rename _spawnve to spawnve and use throughout.
681 (spawn_guts): Eliminate hToken argument and processing of same. Just
682 perform special actions if impersonating.
683 (spawnve): Rename from _spawnve.
684
b01cbd5d
CF
6852002-06-10 Christopher Faylor <cgf@redhat.com>
686
687 * include/sys/strace.h (strace): Avoid use of constructor.
688
fe4283af
CF
6892002-06-10 Christopher Faylor <cgf@redhat.com>
690
691 * dcrt0.cc (dll_crt0_1): Initialize wincap and check for sanity before
692 running global ctors.
693 * wincap.h (wincap): Eliminate constructor. Default is to zero memory,
694 anyway.
695 * wincap.cc (wincap): Copy this on fork to avoid initialization in
696 forked processes.
697
3d78e129
CV
6982002-06-10 Corinna Vinschen <corinna@vinschen.de>
699
700 * fhandler.h (fhandler_socket::fixup_after_fork): Revert patch from
701 2002-06-04.
702 * fhandler_socket.cc (fhandler_socket::fixup_after_fork): Ditto.
703 (fhandler_socket::dup): Ditto.
704 * net.cc (fdsock): Make sockets explicitely noninheritable on NT.
705
c2102631
CF
7062002-06-09 Christopher Faylor <cgf@redhat.com>
707
708 * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Correctly
709 set number of links for directory, if appropriate.
710
43c3c4e3
RC
7112002-06-10 Robert Collins <rbtcollins@hotmail.com>
712
713 * thread.cc: Variation of a patch from Thomas Pffaf.
d70b993f 714 (__pthread_detach): Cleanup thread object if the thread has terminated.
43c3c4e3
RC
715 (__pthread_join): Change order of error checks, and lock against
716 join/detach/exit races.
717 (__pthread_exit): Lock object against join/detach/exit races.
718 (pthread::thread_init_wrapper): Ditto.
719 (thread_init_wrapper): Rename to pthread::thread_init_wrapper.
720 (pthread::create): Check that the mutex initialized correctly.
721 (pthread::push_cleanup_handler): Lock against potential cancellation
722 race. NB: this may not be required if pthread_cleanup_push is non-
723 cancelable.
724 * thread.h (pthread::mutex): New member.
725 (thread_init_wrapper): Rename to pthread::thread_init_wrapper.
726 (pthread::thread_init_wrapper_: New static member.
727
007276b3
RC
7282002-06-10 Robert Collins <rbtcollins@hotmail.com>
729
730 * cygwin.din: Add _pthread_cleanup_push and _pthread_cleanup_pop.
731 * pthread.cc: Change __pthread_self to pthread::self() thruoghout.
732 (_pthread_cleanup_push): New function.
733 (_pthread_cleanup_pop): Ditto.
734 * thread.cc: Thanks to Thomas Pfaff for the pthread cleanup_push,_pop
735 patch, this work is derived from that.
736 Change __pthread_self to pthread::self() thruoghout.
737 (__pthread_self): Rename to pthread::self.
738 (pthread::self): New method.
739 (pthread::pthread): Initialize new member.
740 (pthread::push_cleanup_handler): New method.
741 (pthread::pop_cleanup_handler): New method.
742 (pthread::pop_all_cleanup_handlers): New method.
743 (__pthread_exit): Pop all cleanup handlers.
744 * thread.h (pthread::push_cleanup_handler): Declare.
745 (pthread::pop_cleanup_handler): Ditto.
746 (pthread::pop_all_cleanup_handlers): Ditto.
747 (pthread::self): New static method.
748 (__pthread_exit): Give C++ linkage.
749 (__pthread_join): Ditto.
750 (__pthread_detach): Ditto.
751 (__pthread_self): Remove.
752
7532002-04-24 Thomas Pfaff <tpfaff@gmx.net>
754
c2102631
CF
755 * include/pthread.h (__pthread_cleanup_handler): New structure.
756 (pthread_cleanup_push): Rewritten.
007276b3
RC
757 (pthread_cleanup_pop): Ditto.
758 (_pthread_cleanup_push): New prototype.
c2102631 759 (_pthread_cleanup_pop): Ditto.
007276b3
RC
760
7612002-04-24 Thomas Pfaff <tpfaff@gmx.net>
762
763 * thread.cc (thread_init_wrapper): Check if thread is already joined.
764 (__pthread_join): Set joiner first.
765 (__pthread_detach): Ditto.
766
fec98ec9
RC
7672002-06-10 Robert Collins <rbtcollins@hotmail.com>
768
769 * cygserver_transport.cc (create_server_transport): Finish the split
770 out of sockets code from transport_layer_base. Thanks to Nicholas
771 Wourms and Conrad Scott for catching this.
772
7ac66bdd
CF
7732002-06-08 Christopher Faylor <cgf@redhat.com>
774
775 * pinfo.cc (pinfo_dummy): Initialize to correct size.
776
a004a5b8
CF
7772002-06-08 Christopher Faylor <cgf@redhat.com>
778
779 * path.cc: Change MOUNT_AUTO to MOUNT_CYGDRIVE throughout.
780 * shared_info.h (CURR_MOUNT_MAGIC): Update.
781
50484e8e
CF
7822002-06-08 Christopher Faylor <cgf@redhat.com>
783
784 * external.cc (cygwin_internal): Make v1 mount table access invalid.
785 * path.cc (mount_info::init): Remove had_to_create_mount_areas initialization.
786 (mount_info::from_registry): Remove v1 table import.
787 (mount_info::read_v1_mounts): Eliminate.
788 (mount_info::import_v1_mounts): Ditto.
789 * shared_info.h (mount_info): Ditto for both of above.
790 * sys/mount.h (MOUNT_DEVFS): New enum.
791 (MOUNT_PROC): Ditto.
792
2e2dcba3
CF
7932002-06-08 Christopher Faylor <cgf@redhat.com>
794
795 * include/wchar.h: Define __need_size_t.
796
9cde3cf3
CF
7972002-06-07 Christopher Faylor <cgf@redhat.com>
798
799 * fhandler_socket.cc (fhandler_socket::fstat): Don't assume that socket
800 is unix-domain socket.
801
8022002-06-07 Christopher Faylor <cgf@redhat.com>
803
804 * times.cc (hires_ms::prime): Set init flag.
805
8062002-06-07 Conrad Scott <conrad.scott@dsl.pipex.com>
807
808 * times.cc (hires_ms::prime): Adjust epoch of initime_us from 1601 to
809 1970.
810
9d0efbb3
CF
8112002-06-06 Christopher Faylor <cgf@redhat.com>
812
813 * autoload.cc (timeGetDevCaps): Define new autoload function.
814 (timeGetTime): Ditto.
815 (timeBeginPeriod): Ditto.
816 (timeEndPeriod): Ditto.
817 * hires.h (hires_base): New class. Renamed from hires.
818 (hires_us): New class.
819 (hires_ms): New class.
820 * strace.cc (strace::microseconds): Use hires_us class.
821 * times.cc (gettimeofday): Use hires-ms class.
822 (hires_us::prime): Renamed from hires::prime.
823 (hires_us::usecs): Renamed from hires:usecs.
824 (hires_ms::prime): New method.
825 (hires_ms::usecs): New method.
826 (hires_ms::~hires_ms): New destructor.
827
46b941fc
CF
8282002-06-06 Christopher Faylor <cgf@redhat.com>
829
830 * autoload.cc (noload): Correctly save argument count register.
831
c4e6ff48
CV
8322002-06-05 Conrad Scott <conrad.scott@dsl.pipex.com>
833
834 * fhandler.cc (fhandler_base::fstat): Initialise tv_nsec member of
835 st_atim, st_mtim, and st_ctim fields.
836 * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Ditto.
837 * fhandler_process.cc (fhandler_process::fstat): Ditto.
46b941fc
CF
838 * glob.c (stat32_to_STAT): Copy across the whole st_atim, st_mtime, and
839 st_ctim fields.
c4e6ff48
CV
840 * syscalls.cc (stat64_to_stat32): Ditto.
841 * times.cc (to_timestruc_t): New function.
842 (time_as_timestruc_t): New function.
843 * winsup.h: Add to_timestruc_t and time_as_timestruc_t functions.
46b941fc
CF
844 * include/cygwin/stat.h: Replace time_t with timestruc_t throughout for
845 all file times, removing the st_spare1, st_spare2, and st_spare3 fields
846 in the process. Add macros to access tv_sec fields by old names.
847 * include/cygwin/types.h: Typedef timespec_t and timestruc_t as struct
848 timespec.
c4e6ff48 849
2e8abfc1
CV
8502002-06-03 Pierre Humblet <pierre.humblet@ieee.org>
851
852 * sec_helper.cc (lookup_name): Suppress.
853 * security.cc (alloc_sd): Remove logsrv argument.
854 Remove two calls to lookup_name.
855 (set_security_attribute): Remove logsrv argument.
856 Remove logsrv argument in call to alloc_sd.
857 (set_nt_attribute): Remove logsrv argument.
858 Remove logsrv argument in call to set_security_attribute.
859 (set_file_attribute): Remove logsrv argument.
860 Remove logsrv argument in call to set_nt_attribute.
861 (set_file_attribute): Remove logsrv argument.
862 Remove logsrv argument in call to set_file_attribute.
863 * syscalls.cc (chown_worker): Remove logserver argument in
864 call to set_file_attribute.
865 (chmod): Ditto.
866 * shm.cc (shmget): Remove logsrv argument in call to alloc_sd.
867 * uinfo.cc (internal_getlogin): Replace calls to
868 lookup_name by call to LookupAccountName.
869 * security.h: Remove logsrv in declarations of set_file_attribute
870 and alloc_sd. Remove declaration of lookup_name.
871
f7a7cc90
CF
8722002-06-05 Christopher Faylor <cgf@redhat.com>
873
874 * child_info.h (CHILD_INFO_MAGIC): Oops. Revert previous change. gcc
875 3.1 bug?
876
784e340c
CF
8772002-06-05 Christopher Faylor <cgf@redhat.com>
878
879 * child_info.h (CHILD_INFO_MAGIC): Update.
880
58fcd93a
CF
8812002-06-05 Christopher Faylor <cgf@redhat.com>
882
883 * strace.cc (strace::hello): Set inited, when appropriate.
884
ee964e2f
CF
8852002-06-05 Christopher Faylor <cgf@redhat.com>
886
887 * cygwin.din: Eliminate some newlib wrappers.
888 * path.cc (get_devn): Only consider first 99 potential com devices.
889 (get_device_number): Ditto.
890 * times.cc (_times): Eliminate.
891 (_times): Renamed from times().
892
ea4e6ec8
CF
8932002-06-05 Christopher Faylor <cgf@redhat.com>
894
895 * dir.cc (rmdir): Streamline. Detect attempts to remove directories
896 from "read-only" virtual devices. (Suggested by Pavel Tsekov)
46b941fc
CF
897 * syscalls.cc (unlink): Detect attempts to remove directories from
898 "read-only" virtual devices. (From Pavel Tsekov)
ea4e6ec8 899
2bb6b3e5
CF
9002002-06-05 Christopher Faylor <cgf@redhat.com>
901
902 * dtable.cc (handle_to_fn): Check error return value from NtQueryObject
903 first before seeing if name buffer is NULL.
904
905 * grp.cc (read_etc_group): Fix gcc warning regarding snprintf format.
906 * passwd.cc (read_etc_passwd): Ditto.
907
e9259cb2
RC
9082002-04-18 Thomas Pfaff <tpfaff@gmx.net>
909
910 * thread.h (pthread::joiner): New member.
911 * thread.cc (pthread::pthread): Initialize joiner to NULL
912 (pthread::create): Increment of thread counter moved from
913 __pthread_create to this location.
914 (__pthread_create): Increment thread counter removed.
915 (thread_init_wrapper): Set joiner to self when thread was created
916 detached.
917 (__pthread_exit): delete thread when it is detached and not
918 joined.
919 (__pthread_join): Check for deadlock and delete thread when it has
920 terminated.
921 (__pthread_detach): Set joiner to self when thread state
922 changed to detached.
923
eceee297
CV
9242002-06-05 Corinna Vinschen <corinna@vinschen.de>
925
926 * grp.cc (read_etc_group): When emulating nonexisting group file on
927 NT systems, read primary group SID from process token. Use that info
928 to create correct group entry. On error or on 9x systems fallback
929 to emulating Administrators group as before.
ae1ebb81 930 * passwd.cc (read_etc_passwd): When emulating nonexisting passwd file
46b941fc 931 on NT systems, read user and primary group SID from process token.
ae1ebb81
CV
932 Use that info to create correct passwd entry. On error or on 9x
933 systems fallback to emulating user with Administrator user id and
934 Administrators group as before.
eceee297 935
38f39368
CV
9362002-06-05 Corinna Vinschen <corinna@vinschen.de>
937
938 * grp.cc (etc_group): Removed.
939 (parse_grp): Make line parameter nonconst. Don't copy data into new
940 allocated memory. Check for CR instead of LF to accomodate new
941 read method.
942 (add_grp_line): Make line parameter nonconst.
943 (read_etc_group): Rearrange using new pwdgrp_read class.
944 * passwd.cc (parse_pwd): Don't copy data into new allocated memory.
945 Check for CR instead of LF to accomodate new read method.
946 (read_etc_passwd): Rearrange using new pwdgrp_read class.
947 * pwdgrp.h (pwdgrp_check::set_last_modified): Use different
948 parameters.
949 (class pwdgrp_read): New class for opening and reading passwd and
950 group files.
951
ce006ffa
CF
9522002-06-04 Christopher Faylor <cgf@redhat.com>
953
954 * dtable.cc (handle_to_fn): Attempt to handle "raw" accesses to remote
955 shares.
956 * path.cc (mount_info::conv_to_win32_path): Set flags to binary when
957 mount entry is not found.
958 (mount_info::set_flags_from_win32_path): Ditto.
959
147d2ab4
CF
9602002-06-04 Christopher Faylor <cgf@redhat.com>
961
962 * dtable.cc (handle_to_fn): Correct placement and length of name
ea4e6ec8 963 buffer. (Suggested by Pavel Tsekov)
147d2ab4 964
e35f391f
CF
9652002-06-04 Christopher Faylor <cgf@redhat.com>
966
967 Remove fcntl.h includes throughout.
968 * fhandler.h: Move fcntl.h include here.
969 (fhandler_base::set_flags): Accept supplied_bin argument. Make
970 non-inlined.
971 * dtable.cc (dtable::init_std_file_from_handle): Just use binmode from
972 pc.
973 (reset_to_open_binmode): Use set_flags.
974 * cygwin.din (open): Avoid newlib wrapper.
975 (read): Ditto.
976 (unlink): Ditto.
977 (write): Ditto.
978 * fhandler.cc (fhandler_base::set_flags): Accept supplied_bin argument.
979 Make binmode decisions here.
980 (fhandler_base::open): Avoid using pc if it is NULL. Eliminate binmode
981 logic. Just call set_flags with binmode argument.
982 (fhandler_base::init): Call set_flags with binmode argument.
983 * fhandler_clipboard.cc (fhandler_dev_clipboard::open): Ditto.
984 * fhandler_console.cc (fhandler_console::open): Ditto.
985 (fhandler_console::init): Force binary on open.
986 * fhandler_disk_file.cc (fhandler_disk_file::open): Don't set binmode
987 here. Let it happen in base class.
988 * fhandler_dsp.cc (fhandler_dev_dsp::open): Force binmode open. Set
989 return value appropriately if unable to open.
990 * fhandler_proc.cc (fhandler_proc::open): Make sure flags are set
991 before open_status.
992 * fhandler_process.cc (fhandler_process::open): Ditto.
993 * fhandler_registry.cc (fhandler_registry::open): Ditto.
994 * fhandler_random.cc (fhandler_dev_random::fhandler_dev_random): Ditto.
995 * fhandler_raw.cc (fhandler_dev_raw::open): Force O_BINARY by default.
996 * fhandler_serial.cc (fhandler_serial::init): Ditto.
997 * fhandler_tty.cc (fhandler_tty_slave::open): Ditto.
998 (fhandler_pty_master::open): Ditto.
999 * fhandler_virtual.cc (fhandler_virtual::open): Ditto.
1000 * fhandler_windows.cc (fhandler_windows::open): Ditto.
1001 * fhandler_zero.cc (fhandler_dev_zero::open): Ditto.
1002 * net.cc (fdsock): Ditto.
1003 * path.cc (path_conv::check): Avoid checking for executable extension
1004 when directory. (Suggested by Pavel Tsekov)
1005 (set_flags): Set PATH_TEXT explicitly, when appropriate.
1006 (mount_info::conv_to_win32_path): Use set_flags() to set path flags.
1007 * path.h (PATH_TEXT): New enum.
1008 (path_conv::binmode): Return appropriate constant based on binmode.
1009 * pipe.cc (make_pipe): Set binmode to O_TEXT xor O_BINARY.
1010 * syscalls.cc (setmode_helper): Make debugging message a little
1011 clearer.
1012 (setmode): Set binmode via set_flags.
1013
4e138847
CV
10142002-06-04 Corinna Vinschen <corinna@vinschen.de>
1015
1016 * fhandler.h (class fhandler_socket): Add private method
1017 fixup_after_fork (bool, HANDLE).
1018 * fhandler_socket.cc (fhandler_socket::fixup_after_fork): Move
1019 functionality to new private method. Add closing parent socket
1020 if not called from dup(). Create method new calling private method
1021 with appropriate parameter.
1022 (fhandler_socket::fixup_after_exec): Call private method
1023 fixup_after_fork with appropriate parameter.
1024 (fhandler_socket::dup): Ditto.
1025
10262002-06-04 Corinna Vinschen <corinna@vinschen.de>
6bfca3cc
CV
1027
1028 * fhandler_dsp.cc (fhandler_dev_dsp::open): Set errno to EACCES if
1029 requested mode isn't supported.
1030
e02f1e9c
CF
10312002-06-03 Christopher Faylor <cgf@redhat.com>
1032
1033 * fhandler.cc (fhandler_base::open): Don't set binmode if already set.
1034 Don't check for file. Files should already be set. Report on binary
1035 mode for debugging.
1036 (fhandler_base::fhandler_base): Don't set default binmode here. That's
1037 for later.
1038 * fhandler_console.cc (fhandler_console::output_tcsetattr): Don't set
1039 binmode, ever, for console.
1040 * fhandler_disk_file.cc (fhandler_disk_file::open): Always set the
1041 binary mode to the value derived from mount table.
1042 * path.cc (mount_info::conv_to_win32_path): Default to binmode if path
1043 does not translate into anything in the mount table.
1044
31b98a62
CV
10452002-06-03 Corinna Vinschen <corinna@vinschen.de>
1046
1047 * external.cc (cygwin_internal): Add CW_EXTRACT_DOMAIN_AND_USER
1048 handling to call extract_nt_dom_user() from applications.
1049 * include/sys/cygwin.h (cygwin_getinfo_types): Add
1050 CW_EXTRACT_DOMAIN_AND_USER.
1051
b3c29731
CV
10522002-06-03 Corinna Vinschen <corinna@vinschen.de>
1053
1054 * syscalls.cc (stat64_to_stat32): Transform st_dev correctly.
1055 (fstat64): Add evaluating st_ino and st_dev.
1056 (stat_worker): Evaluate st_dev as 32 bit value.
1057 * include/cygwin/stat.h: Use new dev_t definition throughout.
1058 * include/cygwin/types.h: Define __dev16_t and __dev32_t. Define
1059 dev_t according to __CYGWIN_USE_BIG_TYPES__ setting.
1060 * include/sys/sysmacros.h: Define major, minor and makedev
1061 according to __CYGWIN_USE_BIG_TYPES__ setting.
1062
656c3192
CV
10632002-06-03 Pierre Humblet <pierre.humblet@ieee.org>
1064
1065 * syscalls.cc (setegid32): Verify the correctness of the gid
1066 of the group returned by getgrgid32.
1067
1eb934b7
CV
10682002-06-03 Pierre Humblet <pierre.humblet@ieee.org>
1069
1070 * security.cc (lsa2wchar): Suppressed.
1071 (get_lsa_srv_inf): Suppressed.
1072 (get_logon_server_and_user_domain): Suppressed.
1073 (get_logon_server): Essentially new.
1074 (get_user_groups): Add "domain" argument. Only lookup the
1075 designated server and use "domain" in LookupAccountName.
1076 (is_group_member): Simplify the arguments.
1077 (get_user_local_groups): Simplify the arguments. Do only a
1078 local lookup. Use "BUILTIN" and local domain in LookupAccountName.
1079 (get_user_primary_group). Only lookup the designated server.
1080 (get_group_sidlist): Remove logonserver argument. Do not lookup
1081 any server for the SYSTEM account.
1082 (create_token): Delete logonserver and call to get_logon_server.
1083 Adjust arguments of get_group_sidlist, see above.
1084 * security.h: Delete declaration of get_logon_server_and_user_domain
e35f391f 1085 and add declaration of get_logon_server.
1eb934b7
CV
1086 * uinfo.cc (internal_get_login): Call get_logon_server instead of
1087 get_logon_server_and_user_domain.
1088
37be5a67
CF
10892002-06-02 Christopher Faylor <cgf@redhat.com>
1090
e35f391f
CF
1091 * dtable.cc (handle_to_fn): Use largest match for device. Correctly
1092 (?) deal with remote drive weirdness.
37be5a67 1093
97478fe6
CF
10942002-06-02 Christopher Faylor <cgf@redhat.com>
1095
1096 * fhandler_disk_file.cc (fhandler_disk_file::fstat_by_name): Check
1097 specifically for non-existent file, first.
1098 (fhandler_disk_file::fstat): Perform fd open on files with funny
1099 characters.
1100
47413f84
CF
11012002-06-02 Christopher January <chris@atomice.net>
1102
1103 * fhandler_process.cc (fhandler_process::open): Set fileid.
1104
6b7cd251
CF
11052002-06-02 Christopher Faylor <cgf@redhat.com>
1106
1107 Remove unneeded sigproc.h includes throughout.
1108 * fhandler.h (fhandler_proc::fill_filebuf): Take a pinfo argument.
1109 * fhandler_proc.cc (fhandler_proc::get_proc_fhandler): Simplify search
1110 for given pid.
1111 (fhandler_proc::readdir): Assume that pid exists if it shows up in the
1112 winpid list.
1113 * fhandler_process.cc (fhandler_process::open): Simplify search for
1114 given pid. Call fill_filebuf with pinfo argument.
1115 (fhandler_process::fill_filebuf): Pass pinfo here and assume that it
1116 exists.
1117 * pinfo.h (pinfo::remember): Define differently if sigproc.h is not
1118 included.
1119
11202002-06-02 Christopher Faylor <cgf@redhat.com>
1121
1122 * dll_init.cc (dll_list::detach): Don't run destructor on exit.
1123
e065a187
CF
11242002-06-01 Christopher Faylor <cgf@redhat.com>
1125
1126 * fhandler.cc (fhandler_base::fstat): Move dev and ino calculation into
1127 caller.
1128 * syscalls.cc (stat_worker): Calculate dev and ino calculation here, if
1129 zero.
1130 * fhandler_proc.cc (fhandler_proc::fhandler_proc): Minor reorg for
1131 debugging.
1132 * fhandler_process.cc (fhandler_process::exists): Return 0 on
1133 nonexistence.
1134 (fhandler_process::fstat): Simplify pid logic.
1135 * fhandler_tape.cc (fhandler_dev_tape::fstat): Minor reformatting.
1136
60abf1c4
CF
11372002-06-01 Christopher Faylor <cgf@redhat.com>
1138
1139 * path.cc (chdir): Don't allow cd'ing to a non-directory virtual path.
1140
28af03fa
CF
11412002-05-31 Christopher Faylor <cgf@redhat.com>
1142
1143 * fhandler_disk_file.cc (readdir): Move inode calculation into caller.
1144 (fhandler_cygdrive::readdir): Add "." and "..".
1145 * dir.cc (readdir): Move inode calculation here so that fhandler
1146 readdirs can benefit.
1147
8e74c320
CF
11482002-05-31 Christopher Faylor <cgf@redhat.com>
1149
1150 * fhandler_console.cc (fhandler_console::open): Reinstate setting of
1151 flags.
1152
30478f15
CF
1153 * dtable.cc (dtable::init_std_file_from_handle): Default to using
1154 binmode derived from path_conv, when required.
1155 * fhandler.h (fhandler_base::get_w_binary): Default to binmode if
1156 nothing else is specified.
1157 * fhandler.h (fhandler_base::get_r_binary): Ditto.
1158
1159 * fhandler_disk_file.cc (fhandler_disk_file::fstat_by_handle): Work
1160 around g++ warning.
1161
1162 * path.cc (path_conv::check): Remove a debugging statement.
1163
de86e35b
CF
11642002-05-31 Christopher Faylor <cgf@redhat.com>
1165
1166 * fhandler_console.cc (fhandler_console::open): Always default to
1167 binmode.
1168 (fhandler_console::write_normal): Don't honor binmode setting. There
1169 is already a termios setting for this.
1170 (fhandler_console::init): Correct argument order in init call.
1171
8461f41e
CF
11722002-05-31 Christopher Faylor <cgf@redhat.com>
1173
1174 * fhandler.cc (fhandler_base::open): Make default open mode == binmode.
1175 (fhandler_base::init): Set open flags based on derived binmode argument.
1176
bcd0ed9f
CF
11772002-05-31 Christopher Faylor <cgf@redhat.com>
1178
1179 * dll_init.cc (dll_list::init): Eliminate unneeded debugging statement.
1180
18c04cc4
CF
11812002-05-31 Christopher Faylor <cgf@redhat.com>
1182
1183 * fhandler_proc.cc (fhandler_proc::readdir): Set errno when no more
1184 files.
1185 * fhandler_process.cc (fhandler_process::readdir): Ditto.
1186 * fhandler_registry.cc (fhandler_registry::readdir): Ditto.
1187
69be001c
CF
11882002-05-30 Christopher Faylor <cgf@redhat.com>
1189
1190 * path.cc (path_conv::check): Set fileattr to INVALID_FILE_ATTRIBUTES
1191 for nonexistent virtual device path.
1192 (chdir): Set correct errno when attempt is made to cd to nonexistent
1193 virtual device path.
1194
5d8c7a56
CF
11952002-05-30 Christopher Faylor <cgf@redhat.com>
1196
1197 * fhandler_disk_file.cc (fhandler_disk_file::fstat): Always call
1198 fstat_by_name if fd is not opened to allow fstat_by_name to properly
1199 set errno.
1200
d74eced5
CV
12012002-05-30 Corinna Vinschen <corinna@vinschen.de>
1202
1203 * autoload.cc: Replace autoload statments for ZwXXX by NtXXX.
1204 Drop ZwQuerySystemInformation since NtQuerySystemInformation was
1205 already available.
1206 * fhandler_proc.cc (format_proc_uptime): Replace call to
1207 ZwQuerySystemInformation by call to NtQuerySystemInformation.
1208 (format_proc_stat): Ditto.
1209 * fhandler_process.cc (format_process_stat): Replace call to
1210 ZwQueryInformationProcess by call to NtQueryInformationProcess.
1211 (get_process_state): Ditto.
1212 (get_mem_values): Ditto. Replace call to ZwQueryVirtualMemory by
1213 call to NtQueryVirtualMemory.
1214 * ntdll.h: Cleanup. Drop ZwQuerySystemInformation since
1215 NtQuerySystemInformation was already available. Replace declarations
1216 of ZwXXX functions by declarations of NtXXX.
1217 * pinfo.cc (winpids::enumNT): Replace call to ZwQuerySystemInformation
1218 by call to NtQuerySystemInformation.
1219
5d8c7a56
CF
12202002-05-29 Christopher Faylor <cgf@redhat.com>
1221
1222 * fhandler.cc (binmode): Default to binmode when mode is not known.
1223
186637a5
CF
12242002-05-29 Christopher Faylor <cgf@redhat.com>
1225
1226 * include/sys/cygwin.h (EXTERNAL_PINFO_VERSION): Reinstate.
1227 * external.cc (fillout_pinfo): Use it.
1228
3a571063
CV
12292002-05-29 Corinna Vinschen <corinna@vinschen.de>
1230
1231 * external.cc (fillout_pinfo): Use new version define.
1232 * include/sys/cygwin.h (external_pinfo): Define
1233 EXTERNAL_PINFO_VERSION_16_BIT and EXTERNAL_PINFO_VERSION_32_BIT
1234 instead of just EXTERNAL_PINFO_VERSION.
1235
9fef0139
CF
12362002-05-29 Christopher Faylor <cgf@redhat.com>
1237
1238 * external.cc (fillout_pinfo): Set new version field in external_pinfo
1239 structure.
1240 * include/sys/cygwin.h (external_pinfo): Replace strace_file with
1241 version field.
1242
a8d7ae61
CV
12432002-05-29 Corinna Vinschen <corinna@vinschen.de>
1244
1245 Change internal uid datatype from __uid16_t to __uid32_t
1246 throughout.
1247 * cygwin.din: Export new symbols getpwuid32, getpwuid_r32, getuid32,
1248 geteuid32, setuid32, seteuid32.
1249 * passwd.cc (getpwuid32): New function.
1250 (getpwuid_r32): Ditto.
1251 * syscalls.cc (seteuid32): Ditto.
1252 (setuid32): Ditto.
1253 * uinfo.cc (getuid32): Ditto.
1254 (geteuid32): Ditto.
d4000bc4 1255 * winsup.h (uid16touid32): New macro, correct casting from __uid16_t
a8d7ae61
CV
1256 to __uid32_t.
1257 (gid16togid32): Ditto fir gids.
1258 (getuid32): Declare.
1259 (geteuid32): Ditto.
1260 (getpwuid32): Ditto.
1261 * include/sys/cygwin.h (struct external_pinfo): Add members uid32 and
1262 gid32.
1263
9854c44c
CV
12642002-05-29 Corinna Vinschen <corinna@vinschen.de>
1265
1266 * include/cygwin/socket.h: Protect some symbols against multiple
1267 definition.
1268 * include/netinet/ip.h: Ditto.
1269 * include/netinet/tcp.h: Ditto.
1270
12712002-05-29 Wu Yongwei <adah@netstd.com>
1272
1273 * include/netinet/ip.h: Replace by BSD derived version of the file.
1274 * include/netinet/tcp.h: Ditto.
1275 * include/netinet/udp.h: New file.
1276 * include/cygwin/ip.h: Remove.
1277
cef69559
CF
12782002-05-29 Christopher Faylor <cgf@redhat.com>
1279
1280 * dtable.cc (dtable::init_std_file_from_handle): Attempt stronger
1281 detection of invalid handle.
1282 (handle_to_fn): Detect pathological condition where NT resets the
1283 buffer pointer to NULL on an invalid handle.
1284
a761ad82
CF
12852002-05-28 Christopher Faylor <cgf@redhat.com>
1286
1287 * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Properly
1288 check for whether we should be opening the file to search for #!
654783b6
CF
1289 characters. Set path_conv structure execability, too, when
1290 appropriate.
a761ad82 1291
7ea70e99
CV
12922002-05-28 Corinna Vinschen <corinna@vinschen.de>
1293
1294 * security.cc (set_security_attribute): Call getegid32() instead of
1295 getegid().
1296 * include/cygwin/grp.h: Declare getegid32().
1297
57196405
CV
12982002-05-28 Corinna Vinschen <corinna@vinschen.de>
1299
1300 Change internal gid datatype from __gid16_t to __gid32_t
1301 throughout.
1302 * cygwin.din: Export new symbols chown32, fchown32, getegid32,
1303 getgid32, getgrgid32, getgrnam32, getgroups32, initgroups32, lchown32,
1304 setgid32, setegid32, getgrent32.
1305 * grp.cc (grp32togrp16): New static function.
1306 (getgrgid32): New function.
1307 (getgrnam32): Ditto.
1308 (getgrent32): Ditto.
1309 (getgroups32): Change name of internal function from getgroups.
1310 (getgroups32): New function.
1311 (initgroups32): Ditto.
1312 * syscalls.cc (chown32): Ditto.
1313 (lchown32): Ditto.
1314 (fchown32): Ditto.
1315 (setegid32): Ditto.
1316 (setgid32): Ditto.
1317 * uinfo.cc (getgid32): Ditto.
1318 (getegid32): Ditto.
1319 * include/cygwin/grp.h: Remove declaration of getgrgid() and getgrnam().
1320 Declare getgrgid32() and getgrnam32() instead. Declare getgid32().
1321
0c12979b
CF
13222002-05-27 Christopher Faylor <cgf@redhat.com>
1323
1324 * autoload.cc (noload): Properly mask low order word for determining
1325 number of bytes to pop.
1326
57e2ae68
CF
13272002-05-27 Christopher Faylor <cgf@redhat.com>
1328
1329 * fhandler_disk_file.cc (fhandler_disk_file::fstat): Minor logic
1330 cleanup.
1331
2402700d
CF
13322002-05-27 Christopher Faylor <cgf@redhat.com>
1333
1334 * autoload.cc (LoadFuncEx): Define via new LoadFuncEx2 macro.
1335 (LoadFuncEx2): Adapted from LoadFuncEx. Provides control of return
1336 value for nonexistent function.
1337 (NtQueryObject): Declare.
1338 (IsDebuggerPresent): Declare via LoadFuncEx2 and always return true if
1339 not available.
1340 * debug.h (being_debugged): Just rely on IsDebuggerPresent return
1341 value.
1342 * dtable.cc (handle_to_fn): New function.
1343 (dtable::init_std_file_from_handle): Attempt to derive std handle's
1344 name via handle_to_fn.
1345 (dtable::build_fhandler_from_name): Fill in what we can in path_conv
1346 structure when given a handle and path doesn't exist.
1347 * fhandler.cc (fhandler_base::open): Don't set the file pointer here.
1348 Use pc->exists () to determine if file exists rather than calling
1349 GetFileAttributes again.
1350 * fhandler.h (fhandler_base::exec_state_isknown): New method.
1351 (fhandler_base::fstat_helper): Add extra arguments to declaration.
1352 (fhandler_base::fstat_by_handle): Declare new method.
1353 (fhandler_base::fstat_by_name): Declare new method.
1354 * fhandler_disk_file (num_entries): Make __stdcall.
1355 (fhandler_base::fstat_by_handle): Define new method.
1356 (fhandler_base::fstat_by_name): Define new method.
1357 (fhandler_base:fstat): Call fstat_by_{handle,name} as appropriate.
1358 (fhandler_disk_file::fstat_helper): Accept extra arguments for filling
1359 out stat structure. Move handle or name specific stuff to new methods
1360 above.
1361 (fhandler_disk_file::open): Use real_path->exists rather than calling
1362 GetFileAttributes again.
1363 * ntdll.h (FILE_NAME_INFORMATION): Define new structure.
1364 (OBJECT_INFORMATION_CLASS): Partially define new enum.
1365 (OBJECT_NAME_INFORMATION): Define new structure.
1366 (NtQueryInformationFile): New declaration.
1367 (NtQueryObject): New declaration.
1368 * path.cc (path_conv::fillin): Define new method.
1369 * path.h (path_conv::fillin): Declare new method.
1370 (path_conv::drive_thpe): Rename from 'get_drive_type'.
1371 (path_conv::volser): Declare new method.
1372 (path_conv::volname): Declare new method.
1373 (path_conv::root_dir): Declare new method.
1374 * syscalls.cc (fstat64): Send real path_conv to fstat as second
1375 argument.
1376
74b2f73e
CV
13772002-05-24 Pierre Humblet <pierre.humblet@ieee.org>
1378
1379 * security.cc (lsa2str): New function.
1380 (get_priv_list): Call lsa2str instead of sys_wcstombs.
1381
75bf2931
CV
13822002-05-22 Pierre Humblet <pierre.humblet@ieee.org>
1383
1384 * syscalls.cc (seteuid): Do not take allow_ntsec into account.
1385 Attempt to use an existing or new token even when the uid
1386 matches orig_uid, but the gid is not in the process token.
1387 Major reorganization after several incremental changes.
1388 (setegid): Do not take allow_ntsec into account. Minor
1389 reorganization after several incremental changes.
1390
918a268c
CF
13912002-05-26 Christopher Faylor <cgf@redhat.com>
1392
1393 * debug.h (being_debugged): New macro.
1394 * dtable.cc (dtable::extend): Use new macro.
1395 * exceptions.cc (try_to_debug): Ditto.
1396 * strace.cc (strace::hello): Only output debugging info when we think
1397 we're being debugged.
1398
0cfbfc24
CF
13992002-05-25 Robert Collins <rbtcollins@hotmail.com>
1400
1401 * winsup.h: Remove duplicate declarations of malloc_lock and
1402 malloc_unlock.
1403
d7b4a300
CF
14042002-05-24 Christopher Faylor <cgf@redhat.com>
1405
1406 Remove unneeded sync.h, where appropriate, throughout.
1407 Remove unneeded heap.h, where appropriate, throughout.
1408 Remove unneeded exceptions.h, where appropriate, throughout.
1409 Remove unneeded perprocess.h, where appropriate, throughout.
1410
908f9b65
CV
14112002-05-22 Pierre Humblet <pierre.humblet@ieee.org>
1412
1413 * security.cc (create_token): Call __sec_user() instead of
1414 sec_user() to remove dependence on allow_ntsec. Verify that
1415 the returned sd is non-null.
1416
a6247be9
RC
14172002-05-25 Robert Collins <rbtcollins@hotmail.com>
1418
1419 * gmon.c (fake_sbrk): Correctly return -1 on failed malloc's.
1420
ff938546
CF
14212002-05-24 Christopher Faylor <cgf@redhat.com>
1422
1423 * dtable.cc (dtable::build_fhandler_from_name): Just pass posix path
1424 along to set_name via return_and_clear_normalized_path.
1425 (dtable::build_fhandler): New method with const char * argument.
1426 (dtable::reset_unix_path_name): Eliminate.
1427 (dtable::dup_worker): Use correct build_fhandler method.
1428 * mmap.cc (mmap_record::alloc_fh): Ditto.
1429 * dtable.h (dtable::build_fhandler): New method.
1430 (dtable::reset_unix_path_name): Eliminate.
1431 * fhandler.cc (fhandler_base::set_name): Assume that unix_name has
1432 already been cmalloced.
1433 (fhandler_base::reset_unix_path_name): Eliminate.
1434 (fhandler_base::~fhandler_base): Coercion for cfree.
1435 * fhandler.h (fhandler_base::unix_path_name): Make const char *.
1436 (fhandler_base::win32_path_name): Ditto.
1437 (fhandler_base::reset_unix_path_name): Eliminate.
1438 * fhandler_disk_file.cc (fhandler_cygdrive::set_drives): Accommodate
1439 const char *ness of win32_path_name.
1440 * fhandler_socket.cc (fhandler_socket::fstat): Accommodate new set_name
1441 requirements.
1442 * path.cc (path_conv::return_and_clear_normalized_path): New method.
1443 (path_conv::clear_normalized_path): Eliminate.
1444 (path_conv::~path_conv): Ditto.
1445 (path_conv::check): Accommodate new build_fhandler method.
1446 * path.h (path_conv::~path_conv): Eliminate.
1447 (path_conv::clear_normalized_path): Ditto.
1448 (path_conv::return_and_clear_normalized_path): Declare new method.
1449
b4bb31ad
CF
14502002-05-23 Christopher Faylor <cgf@redhat.com>
1451
1452 * path.cc (path_conv::check): Make sure any trailing path component is
1453 part of potential normalized posix path.
1454
b2f338e9
CF
14552002-05-23 Christopher Faylor <cgf@redhat.com>
1456
1457 * smallprint.c (__small_vsprintf): Implement '%o' after all these
1458 years.
1459
fc240f58
CF
14602002-05-22 Christopher Faylor <cgf@redhat.com>
1461
1462 * fhandler.h (fhandler_virtual::exists): Eliminate path argument.
1463 (fhandler_proc::exists): Ditto.
1464 (fhandler_registry::exists): Ditto.
1465 (fhandler_process::exists): Ditto.
1466 * fhandler_proc.cc (fhandler_proc::exists): Ditto. Use built-in name.
1467 * fhandler_process.cc (fhandler_process::exists): Ditto.
1468 (fstat): Ditto.
1469 * fhandler_registry.cc (fhandler_registry::exists): Ditto.
1470 (fhandler_registry::fstat): Ditto.
1471 * fhandler_virtual.cc (fhandler_virtual::opendir): Ditto.
1472 * path.cc (path_conv::check): Ditto. Add debugging.
1473
14742002-05-22 Christopher Faylor <cgf@redhat.com>
1475
1476 * syscalls.cc (dup): Always call dup2 for error handling.
1477
1d2b71d6
CV
14782002-05-22 Corinna Vinschen <corinna@vinschen.de>
1479
1480 * include/cygwin/types.h: Revert previous patch.
1481
36f86a55
CV
14822002-05-22 Corinna Vinschen <corinna@vinschen.de>
1483
1484 * include/cygwin/types.h: Define pthread stuff only if _POSIX_THREADS
1485 is defined.
1486
2d6ce5c2
CV
14872002-05-19 Pierre Humblet <pierre.humblet@ieee.org>
1488
fc240f58 1489 * security.cc (open_local_policy): Initialize lsa to
2d6ce5c2
CV
1490 INVALID_HANDLE_VALUE instead of NULL.
1491 (get_logon_server_and_user_domain): Test for INVALID_HANDLE_VALUE
1492 instead of NULL.
1493 (create_token): Both of the above.
1494
9ded8bd8
CF
14952002-05-18 Christopher Faylor <cgf@redhat.com>
1496
1497 * fhandler_disk_file.cc (fhandler_disk_file::fstat): Make handling of
1498 nlink consistent for remote files.
1499
2701126a
CF
15002002-05-18 Christopher Faylor <cgf@redhat.com>
1501
1502 * path.cc (path_conv::check): Always set executable bit for executable
1503 extension.
1504
b05b7d84
CF
15052002-05-17 Christopher Faylor <cgf@redhat.com>
1506
1507 * fhandler.cc (fhandler_base::lseek): Avoid calling SetFilePointer with
1508 high order part of 64 bit address on OS's which do not support that
1509 kind of operation. Otherwise Windows 95 will become confused.
1510
d6dc9825
CV
15112002-05-16 Pierre Humblet <pierre.humblet@ieee.org>
1512
1513 * fhandler_raw.cc (fhandler_dev_raw::open): Replace set_errno()
1514 by __seterrno_from_win_error().
1515 * security.cc (open_local_policy): Ditto.
1516 (get_lsa_srv_inf): Ditto.
1517 (get_user_groups): Ditto.
1518 (get_user_primary_group): Ditto.
1519 (create_token): Ditto.
1520 (subauth): Ditto.
1521
35a89cbe
CV
15222002-05-17 Corinna Vinschen <corinna@vinschen.de>
1523
1524 * times.cc (utimes): Use FILE_WRITE_ATTRIBUTES even on 9x/Me when
1525 opening file for writing timestamp.
1526 * wincap.cc: Remove flag has_specific_access_rights.
1527 * wincap.h: Ditto.
1528
ebbdc703
CV
15292002-05-13 Pierre Humblet <pierre.humblet@ieee.org>
1530
1531 * syscalls.cc (seteuid): Set default dacl in process token.
1532 Replace in-line code by call to verify_token().
1533 (setegid): Reverse change from 2002-01-21. Add call to
1534 RevertToSelf and set primary group in impersonation token.
1535 * security.cc (create_token): Store pgrpsid in token security
1536 descriptor, except if it already appears in my_grps.
1537 Use sec_acl() in place of get_dacl().
1538 (verify_token): Create from code in seteuid(), with tighter checks.
c2102631 1539 (get_dacl): Deleted.
ebbdc703
CV
1540 (get_group_sidlist): Add argument to indicate if pgrpsid is already
1541 in the groups.
1542 * security.h: Define verify_token().
1543 * autoload.cc: Load GetKernelObjectSecurity().
1544
feb7f1a9
CF
15452002-05-13 Mark Bradshaw <bradshaw@staff.crosswalk.com>
1546
1547 * cygwin.din: Add strlcat and strlcpy.
1548 * include/cygwin/version.h: Increment API minor version number.
1549
fc240f58 15502002-05-09 Pierre Humblet <pierre.humblet@ieee.org>
043bc3e1
CV
1551
1552 * shared.cc (__sec_user): Split into sec_acl() and call orig_sid().
1553 (sec_acl): Create from part of __sec_user(), except creator/owner.
1554 * security.h: Define sec_acl() and MAX_DACL_LEN.
1555
c8b20196
CF
15562002-05-12 Christopher Faylor <cgf@redhat.com>
1557
1558 * fhandler_disk_file.cc (fhandler_disk_file::open): Avoid using
1559 O_DIROPEN when OS doesn't support it. Return proper errno in that
1560 case.
1561
b4f8d31f
CF
15622002-05-12 Christopher Faylor <cgf@redhat.com>
1563
56caca1d
CF
1564 * syscalls.cc (_read): Change error to EBADF if attempt to read from a
1565 non-readable fd.
b4f8d31f 1566
29ee580d
CF
15672002-05-11 Christopher Faylor <cgf@redhat.com>
1568
1569 * fhandler.h (executable_states): For now, make dont_care_if_executable
1570 equivalent to not_executable.
1571 * sys/mount.h: Define MOUNT_NOTEXEC.
1572 * path.h (fs_info): New class.
1573 (path_conv): Move fs-specific fields to new 'fs' structure.
1574 (path_conv::update_fs_info): Move to fs_info and rename to just 'update'.
1575 * path.cc (fs_info::update): Ditto. Return 'true' if successful.
1576 (fillout_mntent): Add ',noexec' to list of reported options.
1577
b84621d2
CF
15782002-05-11 Christopher Faylor <cgf@redhat.com>
1579
1580 * fhandler_virtual.cc (fhandler_virtual::close): Quiet a compiler
1581 warning.
1582
9ba913a5
CF
15832002-05-10 Christopher January <chris@atomice.net>
1584
1585 * autoload.cc: Add dynamic load statements for
1586 'ZwQueryInformationProcess' and 'ZwQueryVirtualMemory'.
1587 * fhandler.h: Change type of bufalloc and filesize members of
1588 fhandler_virtual from int to size_t. Change type of position member
1589 from __off32_t to __off64_t. Add new fileid member to fhandler_virtual
1590 class. Make seekdir take an __off64_t argument. Make lseek take an
1591 __off64_t argument. Add fill_filebuf method to fhandler_virtual. Add
1592 fill_filebuf method to fhandler_proc. Add fill_filebuf method to
1593 fhandler_registry. Add fill_filebuf method to fhandler_process. Add
1594 saved_pid and saved_p members to fhandler_process.
1595 * fhandler_proc.cc (proc_listing_array): Add 'loadavg', 'meminfo', and 'stat'.
1596 (proc_fhandlers array): Ditto.
1597 (fhandler_proc::open): Use fill_filebuf to flesh out the file contents.
1598 (fhandler_proc::fill_filebuf): New method.
1599 (fhandler_proc::format_proc_meminfo): Ditto.
1600 (fhandler_proc::format_proc_stat): Ditto.
1601 (fhandler_proc::format_proc_uptime): Ditto.
1602 * fhandler_process.cc (process_listing): Add 'stat' and 'statm'.
1603 (fhandler_process::fstat): Find the _pinfo structure for the process
1604 named in the filename. Return ENOENT if the process is no longer
1605 around. Set the gid and uid fields of the stat structure.
1606 (fhandler_process::open): Store pid and pointer to _pinfo structure in
1607 saved_pid and saved_p respectively. Use fill_filebuf to flesh out file
1608 contents.
1609 (fhandler_proc::fill_filebuf): New method.
1610 (format_process_stat): New function.
1611 (format_process_status): Ditto.
1612 (format_process_statm): Ditto.
1613 (get_process_state): Ditto.
1614 (get_mem_values): Ditto.
1615 * fhandler_registry.cc (fhandler_registry::seekdir): Change argument
1616 type from __off32_t to __off64_t.
1617 (fhandler_registry::fill_filebuf): New method.
1618 * fhandler_virtual.cc (fhandler_virtual::seekdir): Change argument type
1619 from __off32_t to __off64_t.
1620 (fhandler_virtual::lseek): Ditto.
1621 (fhandler_virtual::fill_filebuf): New method.
1622 (fhandler_virtual::fhandler_virtual): Initialise fileid to -1.
1623 * wincap.cc: Set flag has_process_io_counters appropriately.
1624 * wincap.h: Add flag has_process_io_counters.
1625
16262002-05-09 Christopher Faylor <cgf@redhat.com>
f561f644
CF
1627
1628 * syscalls.cc (_write): Change error to EBADF if attempt to write to a
56caca1d 1629 non-writeable fd.
f561f644 1630
6327de5f
CV
16312002-05-08 Corinna Vinschen <corinna@vinschen.de>
1632
1633 * cygheap.h (class cygheap_user): Add member `orig_psid'.
1634 Add method `orig_sid()'.
1635 * cygheap.cc (cygheap_user::set_sid): Maintain orig_psid.
1636
795b46cf
CV
16372002-04-28 Norbert Schulze <norbert.schulze@web.de>
1638
1639 * localtime.cc (tzsetwall): Use wildabbr if generated timezone name
1640 length < 3.
1641
a9917779
CV
16422002-05-05 Pierre Humblet <pierre.humblet@ieee.org>
1643
1644 * spawn.cc (spawn_guts): Move call to set_process_privilege()
1645 to load_registry_hive().
1646 * registry.cc (load_registry_hive): ditto.
1647 * fork.cc (fork_parent): Call sec_user_nih() only once.
1648
16492002-05-04 Christopher January <chris@atomice.net>
13ee3618
CF
1650
1651 * path.h (path_conv::path_conv): Initialise normalized_path to NULL.
1652
8761c1dc
CF
16532002-05-03 Christopher Faylor <cgf@redhat.com>
1654
1655 * net.cc (getdomainname): Change second argument of getdomainname to
1656 size_t.
1657
16582002-05-03 Christopher January <chris@atomice.net>
1659
1660 * fhandler_proc.cc (proc_listing): Add '.' and '..' to directory
1661 listing.
1662 (fhandler_proc::open): Change use of mode to flags. If the file does
1663 not exist already, fail with EROFS if O_CREAT flag is set. Change
1664 EROFS error to EACCES error when writing to a file. Use cmalloc to
1665 allocate memory for filebuf.
1666 (fhandler_proc::close): Use cfree to free filebuf.
1667 (fhandler_proc::get_proc_fhandler): Properly detect attempts to access
1668 unknown subdir.
1669 * fhandler_process.cc (process_listing): Add '.' and '..' to directory
1670 listing.
1671 (fhandler_process::open): Use cmalloc to allocate memory for filebuf.
1672 (fhandler_process::close): Use cfree to free filebuf.
1673 * fhandler_registry.cc (registry_listing): Add . and '..' to directory
1674 listing.
1675 (fhandler_registry::open): Move check for open for writing before
1676 open_key. Use cmalloc to allocate memory for filebuf.
1677 (fhandler_registry::close): Use cfree to free filebuf.
1678 (fhandler_registry::telldir): Use lower 16 bits of __d_position as
1679 position in directory.
1680 (fhandler_registry::seekdir): Ditto.
1681 * fhandler_virtual.cc (fhandler_virtual::write): Change EROFS error to
1682 EACCES error.
1683 (fhandler_virtual::open): Set the NOHANDLE flag.
1684 (fhandler_virtual::dup): Add call to fhandler_base::dup. Allocate
1685 child's filebuf using cmalloc. Copy filebuf from parent to child.
1686 (fhandler_virtual::close): Use cfree to free filebuf.
1687 (fhandler_virtual::~fhandler_virtual): Ditto.
1688 (from Chris Faylor <cgf@redhat.com>).
1689 (fhandler_registry::readdir): Add support for '.' and '..' files in
1690 subdirectories of /proc/registry.
1691 * path.cc (path_conv::check): Do not return ENOENT if a file is not
1692 found in /proc.
1693
335c87f9
CF
16942002-05-02 Christopher Faylor <cgf@redhat.com>
1695
1696 * fhandler_proc.cc (fhandler_proc::fstat): Use fhandler name rather
1697 than path_conv name.
1698 (fhandler_proc::open): Ditto.
1699 * fhandler_process.cc (fhandler_process::fstat): Use fhandler name
1700 rather than path_conv name.
1701 (fhandler_process::open): Ditto.
1702 * fhandler_registry.cc (fhandler_registry::fstat): Use fhandler name
1703 rather than path_conv name.
1704 (fhandler_registry::open): Ditto.
1705 * path.cc (path_conv::check): Don't copy posix path when virtual.
1706 (mount_info::conv_to_win32_path): Don't zero string when isproc. Just
1707 derive normal windows path.
1708
1709 * path.h (path_conv::clear_normalized_path): Declare new method.
1710 * path.cc (path_conv::clear_normalized_path): Define new method.
1711 * dtable.cc (build_fhandler_from_name): Clear normalized path when
1712 finished to conserve space.
1713
3bb7eb44
CF
17142002-05-02 Christopher Faylor <cgf@redhat.com>
1715
1716 * fhandler_proc.cc (fhandler_proc::fstat): Prime with information from
1717 fhandler_base::fstat. Use defines rather than constants for permission
1718 settings.
1719
d055ecb0
CV
17202002-04-30 Eric Blake <ebb9@email.byu.edu>
1721
1722 * path.cc (hash_path_name): Improve hash function strength.
1723
37143995
RC
17242002-05-02 Robert Collins <rbtcollins@hotmail.com>
1725
1726 * thread.cc (__pthread_cond_dowait): Fix a race on signalling from a
1727 thread woken by the same condition variable it's signalling on. Thanks
1728 to Michael Beach for the report and test case.
1729
291be307
CF
17302002-05-02 Christopher Faylor <cgf@redhat.com>
1731
1732 * path.h (pathconv_arg): Add PC_POSIX.
1733 (path_conv): Add normalized_path field.
1734 * path.cc (path_conv::~path_conv): New destructor.
1735 (path_conv::check): Set normalized_path, where appropriate.
1736 * dtable.cc (build_fhandler_from_name): Use normalized path from
1737 path_conv.
1738 * syscalls.cc (chroot): Ditto.
1739
1740 * cygheap.h: Remove path_prefix_p declaration.
1741
17422002-02-26 Christopher January <chris@atomice.net>
1743 Christopher Faylor <cgf@redhat.com> (minor fixups)
1744
1745 * Makefile.in: Add fhandler_proc.o, fhandler_registry.o,
1746 fhandler_process.o and fhandler_virtual.o.
1747 * dtable.cc (dtable::build_fhandler): Add entries for FH_PROC,
1748 FH_REGISTRY and FH_PROCESS. Set unix_name to the normalized posix
1749 path.
1750 * fhandler.h: Add constants for FH_PROC, FH_REGISTRY and FH_PROCESS.
1751 Add class declarations for fhandler_virtual, fhandler_proc,
1752 fhandler_registry and fhandler_virtual. Update fhandler_union
1753 accordingly.
1754 * fhandler_proc.cc: New file. Add implementation for fhandler_proc.
1755 * fhandler_virtual.cc: New file. Add implementation for
1756 fhandler_virtual.
1757 * fhandler_process.cc: New file. Add implementation for
1758 fhandler_process.
1759 * fhandler_registry.cc: New file. Add implementation for
1760 fhandler_registry.
8761c1dc
CF
1761 * path.cc (isproc): New macro.
1762 (isvirtual_dev): Ditto.
291be307
CF
1763 * path.cc (path_conv::check): Add check for virtual devices.
1764 * path.cc (mount_info::conv_to_win32_path): Convert paths in /proc to
1765 empty Win32 paths.
1766 * path.cc (chdir): Replace check for FH_CYGDRIVE with more generic
1767 isvirtual_dev macro. Force setting of posix path for virtual
1768 fhandlers.
8761c1dc 1769 * path.h (path_prefix_p): Declare.
291be307
CF
1770
1771
fee93846
CF
1772Wed May 1 16:06:02 2002 Jason Tishler <jason@tishler.net>
1773
1774 * include/cygwin/types.h: Include <sys/sysmacros.h>.
1775
9b15f5fa
CV
1776Wed Apr 17 11:27:04 2002 Jason Tishler <jason@tishler.net>
1777
1778 * security.cc (get_lsa_srv_inf): Prevent extraneous backslashes for
1779 the NT Domain case.
1780
4deace13
CV
17812002-04-12 Corinna Vinschen <corinna@vinschen.de>
1782
1783 * net.cc (cygwin_accept): Set socket type for accepted socket.
1784 (socketpair): Set socket type for both sockets.
1785
17862002-04-12 Egor Duda <deo@logos-m.ru>
1787
291be307 1788 * fhandler.h (class fhandler_socket): New member to store socket type.
4deace13
CV
1789 (fhandler_socket::get_socket_type): Access it.
1790 (fhandler_socket::set_socket_type): Ditto.
1791 * net.cc (cygwin_socket): Store socket type.
1792 (cygwin_connect): Disable security checks for connectionless sockets.
1793 (cygwin_accept): Ditto.
1794
dbe67a81
CF
17952002-04-09 Mark Bradshaw <bradshaw@staff.crosswalk.com>
1796
1797 * cygwin.din: Add strptime.
1798 * include/cygwin/version.h: Increment API version number.
1799
464b3e80
CV
18002002-04-09 Corinna Vinschen <corinna@vinschen.de>
1801
1802 * fork.cc (fork_child): Call fixup_mmaps_after_fork() somewhat earlier.
1803
d78bda7b
CV
18042002-04-09 Corinna Vinschen <corinna@vinschen.de>
1805
1806 * fhandler.cc (fhandler_base::open): Set read-only bit in
1807 file_attributes when adequate.
1808
8996623b
CF
18092002-03-28 Christopher Faylor <cgf@redhat.com>
1810
1811 * times.cc (gettimeofday): Fix typo in previous patch.
1812
7d7524e5
CF
18132002-03-27 Wu Yongwei <adah@netstd.com>
1814
1815 * times.cc (gettimeofday): Revert to setting timezone info if tz !=
1816 NULL.
1817
2f3126f6
CF
18182002-03-21 Christopher Faylor <cgf@redhat.com>
1819
1820 * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Always set
1821 st_[ug]id to value derived from get_file_attributes.
1822
45d2ea8a
CF
18232002-03-21 Christopher Faylor <cgf@redhat.com>
1824
1825 * spawn.cc (find_exec): Return input if file not found.
1826
99dbafac
CV
18272002-03-19 Boris Schaeling <boriss@web.de>
1828
291be307 1829 * poll.cc (poll): Add support for invalid descriptors.
99dbafac 1830
b0359971
RC
18312002-03-15 Robert Collins <rbtcollins@hotmail.com>
1832
1833 * fhandler.h (fhandler_termios::lseek): Override lseek.
1834 * fhandler_termios.cc (fhandler_termios::lseek): Implement this.
1835
59a2339f
CF
18362002-03-15 Christopher Faylor <cgf@redhat.com>
1837
1838 * cygserver.cc: Include stdlib.h for exit declaration.
1839 * threaded_queue.cc: Ditto.
1840
ca175377
CF
18412002-03-15 Christopher Faylor <cgf@redhat.com>
1842
1843 * pinfo.cc (pinfo::init): Use PID_ALLPIDS flag to control when a
1844 redirected block should be marked as nonexistent.
1845 (winpids::add): Use PID_ALLPIDS when looking for all pids.
1846 * cygwin.h (PID_ALLPIDS): New enum element.
1847
d78bda7b 18482002-03-15 Corinna Vinschen <corinna@vinschen.de>
2f263187 1849
291be307 1850 * glob.c (stat32_to_STAT): New function.
2f263187
CV
1851 (g_lstat): Call user space functions always with 32 bit struct stat
1852 as a workaround.
1853 (g_stat): Ditto.
1854 * include/glob.h (struct glob): Don't prototype function pointers
1855 when compiling Cygwin.
1856
4af6d4a9
CF
18572002-03-14 Christopher Faylor <cgf@redhat.com>
1858
1859 * pinfo.cc (pinfo::init): Properly handle execed process stub when
1860 PID_NOREDIR is specified.
1861
6ea9c716
CV
18622002-03-13 Boris Schaeling <boriss@web.de>
1863
e10c087b
CF
1864 * poll.cc (poll): Remove variable open_fds. Rearrange and add code to
1865 fix settings of revents.
6ea9c716 1866
d78bda7b 18672002-03-13 Corinna Vinschen <corinna@vinschen.de>
bbe09139
CV
1868
1869 * mmap.cc (mmap_record::map_map): Return -1 if VirtualProtect fails.
1870 (list::erase): New method with no argument. Erase latest record
1871 added.
1872 (mmap64): Fail if map_map() fails.
1873
d78bda7b 18742002-03-12 Corinna Vinschen <corinna@vinschen.de>
cb4589f4
CV
1875
1876 * sysconf.cc (sysconf): Fix condition.
1877
d78bda7b 18782002-03-11 Corinna Vinschen <corinna@vinschen.de>
2817e0dc
CV
1879
1880 * mmap.cc (msync): Check area given by addr and len for being a
1881 contigeous mmap'd region.
1882
d78bda7b 18832002-03-11 Corinna Vinschen <corinna@vinschen.de>
713fb38b
CV
1884
1885 * fork.cc (fork_child): Call fixup_mmaps_after_fork() before
1886 closing parent process handle. Call fixup_mmaps_after_fork()
1887 with parent process handle as parameter.
1888 * mmap.cc (mmap_record::access): New method.
1889 (fixup_mmaps_after_fork): Take process handle as parameter.
1890 In case of FILE_MAP_COPY access, copy valid memory regions to child.
1891 * pinfo.h (fixup_mmaps_after_fork): Change prototype accordingly.
1892
d78bda7b 18932002-03-07 Corinna Vinschen <corinna@vinschen.de>
c8c3824d
CV
1894
1895 * autoload.cc (NetGetDCName): Add symbol.
1896 (NetServerEnum): Remove symbol.
1897 * security.cc (get_lsa_srv_inf): Call NetGetDCName() instead of
1898 NetServerEnum() since it's faster. Don't call it at all if machine
1899 is not a domain member.
1900
9420d2b8
CF
19012002-03-06 Christopher Faylor <cgf@redhat.com>
1902
1903 * path.cc (normalize_posix_path): Avoid runs of '.'s > 2.
1904
07a21bce
CF
19052002-03-05 Christopher Faylor <cgf@redhat.com>
1906
1907 * errno.cc: Change EPERM associated text to "Operation not permitted"
1908 throughout.
1909
eeac69d8
CF
19102002-03-05 Christopher Faylor <cgf@redhat.com>
1911
1912 * fhandler_socket.cc (fhandler_socket::close): Respond to signals while
1913 looping, waiting for socket to close. Superstitiously clear last error
1914 when WSAEWOULDBLOCK.
1915
241a7c5a
RC
19162002-03-05 Robert Collins <rbtcollins@hotmail.com>
1917
291be307 1918 * cygserver_transport_pipes.cc (transport_layer_pipes::transport_layer_pipes):
241a7c5a
RC
1919 Always init - until static members work correctly.
1920 * shm.cc (shmget): Initialize the security descriptor - thanks Corinna!
291be307 1921 * include/sys/ipc.h: Make the ipc control constants partitioned off from the sem
241a7c5a
RC
1922 control constants.
1923
ad2864f4
CV
19242002-03-04 Christian Lestrade <christian.lestrade@free.fr>
1925
1926 * include/sys/termios.h: Define _POSIX_VDISABLE. Define CCEQ macro.
1927 * fhandler_termios.cc: Include <sys/termios.h>.
1928 (line_edit): Recognize disabled c_cc[] chars. Ignore VDISCARD when
1929 not in ICANON mode.
1930
59149930
CV
19312002-03-04 Dmitry Timoshkov <dmitry@baikal.ru>
1932
1933 * syscalls.cc (truncate64): Use ftruncate64 directly to not lose
1934 upper 32 bits.
1935
7c3617cc
RC
19362002-03-04 Robert Collins <rbtcollins@hotmail.com>
1937
1938 * cygserver_shm.cc (delete_shmnode): New function.
1939 (client_request_shm::serve): Use it.
1940
038c71f1
RC
19412002-03-04 Robert Collins <rbtcollins@hotmail.com>
1942
1943 * cygserver_shm.cc (client_request_shm::serve): Implement SHM_DETACH.
1944 * shm.cc (shmdt): Implement.
1945
67be0adb
RC
19462002-03-04 Robert Collins <rbtcollins@hotmail.com>
1947
1948 * cygserver_shm.cc: Run indent.
1949 (deleted_head): New global for storing shm id's pending deletion.
1950 (client_request_shm::serve): Return ENOSYS for invalid request types.
1951 Implement SHM_DEL - delete a shm id.
1952 * cygserver_shm.h (SHM_DEL): New type value.
1953 * shm.cc (delete_inprocess_shmds): New function, does what it's name implies.
1954 (shmctl): Implement shm_rmid control type.
1955
74c3173a
RC
19562002-03-04 Robert Collins <rbtcollins@hotmail.com>
1957
1958 * Makefile.in (install): Remove install-bin to allow make install to work.
1959
009314a4
RC
19602002-03-03 Robert Collins <rbtcollins@hotmail.com>
1961
1962 * shm.cc (shmat): Prevent a compile error.
1963 (shmdt): Set errno as this function is incomplete.
1964
e7729287
CF
19652002-02-28 Christopher Faylor <cgf@redhat.com>
1966
1967 * times.cc: Remove if 0'd code. Clean up slightly.
1968
f449bfef
RC
19692002-02-28 Robert Collins <rbtcollins@hotmail.com>
1970
1971 * Merged cygwin_daemon into head minus the new shm and ipc exports.
1972
19732002-02-28 Robert Collins <rbtcollins@hotmail.com>
1974
1975 * fhandler_tty.cc (fhandler_tty_slave::open): More debugging.
1976 (fhandler_tty_slave::read): Fix printf type for the handle.
1977 * tty.cc (tty::common_init): Add a FIXME for security.
1978
19792002-01-29 Robert Collins <rbtcollins@hotmail.com>
1980
1981 * Makefile.in (OBJS): Remove duplicate localtime.o.
1982
19832002-01-17 Robert Collins <rbtcollins@hotmail.com>
1984
291be307 1985 * cygserver.cc (check_and_dup_handle): Consolidate the two variants for
f449bfef
RC
1986 simplicity.
1987 Add Some basic debug output.
1988 (client_request_attach_tty::serve): Use the new debug_printf for clarity.
1989 Mark the duplicated handles as inheritable - fixup_after_fork() doesn't reopen
1990 tty's.
1991
19922002-01-16 Robert Collins <rbtcollins@hotmail.com>
1993
1994 * cygserver.cc (transport): Correct scope.
1995 (client_request_attach_tty::serve): Add more debug information.
1996 Fix erroneous use of transport instead of conn.
1997 * cygserver_transport_pipes.cc (transport_layer_pipes::close): More debug.
1998 (transport_layer_pipes::read): Ditto.
1999 (transport_layer_pipes::write): Ditto.
2000 (transport_layer_pipes::impersonate_client): Ditto.
2001
2002Mon Oct 8 7:41:00 2001 Robert Collins <rbtcollins@hotmail.com>
2003
2004 * cygserver.cc (server_request::process): Rename client_request_shm_get to
2005 client_request_shm.
2006 * cygserver_process.cc (process_cache::add): Rename to add_task.
2007 Use process_cleanup instead of process_request.
2008 (process_cache::remove_process): New method.
2009 (process::process): Initialize new members.
2010 (process::~process): New member.
2011 (process::cleanup): New method.
2012 (process::add_cleanup_routine): New method.
2013 (process_request::process): Rename to process_cleanup.
2014 Call the process object's cleanup method and then delete it.
2015 (process_process_param::request_loop): Remove the signalling process.
2016 * cygserver_shm.cc: Globally rename client_request_shm_get to client_request_shm.
2017 (client_request_shm_get::serve): Handle attach request counting.
2018 * cygserver_shm.h: Globally rename client_request_shm_get to client_request_shm.
2019 (class shm_cleanup): New class.
2020 * shm.cc: Globally rename client_request_shm_get to client_request_shm.
2021 (client_request_shm::client_request_shm): New constructor for attach requests.
2022 (shmat): Use it.
291be307 2023 * include/cygwin/cygserver_process.h (class process_request): Rename to
f449bfef
RC
2024 process_cleanup.
2025 (class cleanup_routine): New class.
2026 (class process): New members and methods to allow calling back when the process
2027 terminates.
2028
2029Thu Oct 4 14:12:00 2001 Robert Collins <rbtcollins@hotmail.com>
2030 * cygserver.cc (request_loop): Make static.
2031 (main): Use new cache constructor syntax.
2032 Start cache worker threads.
2033 Cleanup the cache at shutdown.
2034 * cygserver_process.cc: Run indent.
2035 (process_cache::process_cache): Add a trigger to use when adding a process.
2036 (process_cache::process): Move process_entry to process.
2037 Insert at the end of the list.
2038 Trigger the request loop when new process's inserted.
2039 (process_cache::process_requests): Do it.
2040 (process_cache::add): New method.
2041 (process_cache::handle_snapshot): New method.
2042 (process::process): Merge in the process_entry fields.
2043 (process::handle): Make a stub function.
2044 (process::exit_code): New method.
2045 (process_request::process): New method.
2046 (process_process_param::request_loop): New method.
2047 * cygserver_shm.cc: New header dependency - threaded_queue.h.
2048 * threaded_queue.cc (threaded_queue::cleanup): Clearer messages.
2049 (queue_process_param::stop): Short spinlock on interruptible threads.
2050 * threaded_queue.h (class threaded_queue): New constructor.
2051 * include/cygwin/cygserver_process.h (process_request): New class.
2052 (process_entry): Remove.
2053 (process): Merge in process_entry.
2054 (process_cache): Inherit from threaded_queue.
2055
2056Tue Oct 2 23:24:00 2001 Robert Collins <rbtcollins@hotmail.com>
2057
2058 * cygserver.cc (class server_process_param): Use new constructor syntax.
2059 * cygserver_process.cc (process_cache::~process_cache): New function.
2060 * threaded_queue.cc: Define condition debug_printf.
2061 Run indent.
2062 (threaded_queue::cleanup): Move queue_process_param guts to a method.
2063 (threaded_queue::process_requests): Ditto.
2064 (queue_process_param::queue_process_param): New method.
2065 (queue_process_param::~queue_process_param): Ditto.
2066 (queue_process_param::start): Ditto.
2067 (queue_process_param::stop): Ditto.
291be307 2068 * threaded_queue.h (class queue_process_param): Add support for
f449bfef
RC
2069 interruptible request loops.
2070 * cygwin/include/cygwin/cygserver_process.h (class process_cache): Add
2071 destructor.
2072
2073Tue Oct 2 23:24:00 2001 Robert Collins <rbtcollins@hotmail.com>
2074
2075 * cygserver_client.cc: New flag allow_daemon to disable the daemon completely.
2076 (cygserver_request): Check it.
2077 (cygserver_init): Ditto.
2078 * environ.cc (parse_thing): Add (no)daemon option.
2079
2080Tue Oct 2 23:00:00 2001 Robert Collins <rbtcollins@hotmail.com>
2081
2082 * shm.cc: Update to handle include changes from HEAD.
2083
2084Tue Oct 2 16:06:00 2001 Robert Collins <rbtcollins@hotmail.com>
2085
291be307 2086 * Makefile.in: Remove cygserver_shm.o from cygwin1.dll.
f449bfef
RC
2087 Rename cygserver_shm_outside.o to cygserver_shm.o.
2088 * cygserver.cc (server_request::process): Use the new client_request
2089 constructor.
2090 * cygserver_client.cc: Remove the #ifdef's stubs for the server method
2091 within cygwin.
2092 (client_request_attach_tty::client_request_attach_tty): Use the new
2093 client_request constructor.
2094 (client_request_shutdown::client_request_shutdown): Ditto.
2095 (client_request::client_request): Ditto.
291be307 2096 * cygserver_shm.cc (client_request_shm_get::serve): Remove the
f449bfef
RC
2097 #ifdef'd stub for in-cygwin builds.
2098 (client_request_shm_get::client_request_shm_get): Use the new
2099 client_request constructor, and remove the in-cygwin variants.
2100 * cygserver_shm.h (class client_request_shm_get): #ifndef test the
2101 serve method - it's only used in cygserver.
2102 * shm.cc (client_request_shm_get::client_request_shm_get): New function.
2103 * include/cygwin/cygserver.h (request_header): New constructor.
291be307 2104 (class client_request): Use it.
f449bfef
RC
2105 New constructor accepting the header size.
2106 #ifndef test the server method - it's only used within cygserver.
2107 (client_request_get_version): #ifdef test the server method.
2108 (client_request_shutdown): Ditto.
2109 (client_request_attach_tty): Ditto.
2110
2111Tue Oct 2 9:57:00 2001 Robert Collins <rbtcollins@hotmail.com>
2112
2113 * Makefile.in: add threaded_queue.o to cygserver.exe.
2114 * cygserver.cc: Include threaded_queue.h
2115 (class server_request): Inherit from queue_request.
2116 (class server_process_param): Inherit from queue_process_param.
2117 (class server_request_queue): Inherit from threaded_queue.
2118 (request_loop): Adjust for new types.
291be307 2119 (server_request_queue::process_requests): Remove guts to
f449bfef
RC
2120 threaded_queue::process_requests.
2121 (server_request::server_request): Adjust for new types.
2122 (worker_function): Delete.
2123 (server_request_queue::create_workers): Delete.
2124 (server_request_queue::cleanup): Delete.
2125 (server_request_queue::add): Move guts to threaded_queue::add.
2126 * threaded_queue.cc: New file.
2127 * threaded_queue.h: New file.
2128
2129Mon Oct 1 12:38:00 2001 Robert Collins <rbtcollins@hotmail.com>
2130
2131 * cygserver.cc (client_request::serve): New function.
2132 * cygserver_process.cc: Inlude <pthread.h> for pthread_once.
2133 (process_cache::process_cache): Initialise a crtiical section for write access.
291be307 2134 (process_cache::process): Use the critical section. Also add missing entries to
f449bfef
RC
2135 the cache.
2136 (do_process_init): New function to initalise class process static variables.
291be307 2137 (process::process): Ensure that the process access critical section is
f449bfef
RC
2138 initialised.
2139 (process::handle): Close the handle of old process's when they have terminated
2140 and we are returning the handle for a process with the same pid.
2141 * cygserver_shm.cc: Run indent.
2142 Include cygserver_process.h to allow process cache functionality.
2143 (client_request_shm_get::serve): New parameter for process cache support.
2144 Use the process cache, not OpenProcess to get a handle to the originating process.
2145 Fix a handle leak with token_handle.
291be307 2146 * cygserver_shm.h (class client_request_shm_get): Update ::serve for process
f449bfef
RC
2147 cache support.
2148 * cygserver_transport_pipes.cc: Redefine debug_printf to be conditional on DEBUG.
291be307 2149 * include/cygwin/cygserver.h: Do not implement client_request::serve in the
f449bfef 2150 header.
291be307
CF
2151 * include/cygwin/cygserver_process.h (class process_cache): Add a write access
2152 critical section to prevent races when requests from a multithreaded
f449bfef
RC
2153 application arrive.
2154
2155Sun Sep 30 23:41:00 2001 Robert Collins <rbtcollins@hotmail.com>
2156
2157 * Makefile.in: Add cygserver_process.o to cygserver.exe.
2158 * cygserver.cc: Include signal.h and cygwin_version.h.
2159 Define debug_printf as a macro.
2160 Define DEBUG to a value.
2161 (client_request_attach_tty::serve): Add beginning of process cache support.
2162 Change from #ifdef DEBUG to work with new DEBUG style.
2163 (client_request_get_version::serve): Add beginning of process cache support.
2164 (class server_request): New prototype for support of process cache.
2165 (class queue_process_param): New class to allow request loop threading.
2166 (class server_request_queue): Add beginning of process cache support.
2167 Allow request loop threading.
2168 (request_loop): Thread function for request loops.
2169 (server_request_queue::process_requests): Initiator for threaded request loops.
2170 (client_request_shutdown::serve): Add beginning of process cache support.
2171 (server_request::server_request): Ditto.
291be307 2172 (server_request::process): Use debug_printf. Add beginning of process cache
f449bfef
RC
2173 support.
2174 (server_request_queue::cleanup): Kill off any request loop threads.
2175 (server_request_queue::add): Add beginning of process cache support.
2176 (handle_signal): Trigger a shutdown.
2177 (main): Print out some useful info at startup - version, date time.
2178 Add process cache support.
2179 Spawn a separate thread for the transport request loop, thus allowing concurrent
2180 support for multiple transports.
291be307 2181 * cygserver_client.cc (client_request_get_version::serve): Add process cache
f449bfef
RC
2182 support.
2183 (client_request_attach_tty::serve): Add process cache support.
2184 (client_request_shutdown::serve): Add process cache support.
2185 * cygsserver_process.cc: New file with the process cache support.
2186 * cygserver_shm.cc: Redefine debug_printf to allow conditional output.
2187 * cygwin.din: Export shmdt().
2188 * shm.cc: Run indent.
2189 Update FIXME's.
2190 (shmdt): New function.
2191 * include/cygwin/cygserver.h (class client_request): Add process cache support.
2192 (class client_request_get_version): Ditto.
2193 (class client_request_shutdown): Ditto.
2194 (class client_request_attach_tty): Ditto.
2195 * include/cygwin/cygserver_process.h: New header for process cache support.
2196
2197Sun Sep 30 8:52:00 2001 Robert Collins <rbtcollins@hotmail.com>
2198
2199 * include/cygwin/cygserver_transport.h: Add copyright header.
2200 * include/cygwin/cygserver_transport_pipes.h: Ditto.
2201 * include/cygwin/cygserver_transport_sockets.h: Ditto.
2202
2203Sat Sep 29 20:40:00 2001 Robert Collins <rbtcollins@hotmail.com>
2204
2205 * Makefile.in: Add cygserver_transport_sockets.o to DLL_OFILES.
2206 Add cygserver_transport_sockets_outside.o to cygserver.exe.
2207 * cygserver.cc: Include new include files.
2208 * cygserver_client.cc: Ditto.
2209 * cygserver_shm.h: No need to include <sys/socket.h> now.
2210 * cygerver_transport.cc: Include new include files.
2211 (transport_layer_base::transport_layer_base): Strip back to a stub.
2212 (transport_layer_base::listen): Ditto.
2213 (transport_layer_base::accept): Ditto.
2214 (transport_layer_base::close): Ditto.
2215 (transport_layer_base::read): Ditto.
2216 (transport_layer_base::write): Ditto.
2217 (transport_layer_base::connect): Ditto.
291be307 2218 * cygserver_transport_pipes.cc: Include new header
f449bfef
RC
2219 "cygwin/cygserver_transport_pipes.h".
2220 * cygserver_transport_sockets.cc: New file.
2221 * dcrt0.cc: No need to include <sys/socket.h> now.
2222 * fhandler_tty.cc: Ditto.
2223 * tty.cc: Ditto.
2224 * include/cygwin/cygserver_transport.h: Strip the base class to a stub.
2225 Remove the cygserver_transport_pipes class.
2226 * include/cygwin/cygserver_transport_pipes.h: New file.
2227 * include/cygwin/cygserver_transport_sockets.h: New file.
2228
2229Tue Sep 25 16:22:00 2001 Robert Collins <rbtcollins@hotmail.com>
2230
2231 * autoload.cc: Add dynamic load statement for 'ImpersonateNamedPipeClient'.
2232 * Makefile.in: Add new object files, and build instructions for cygserver.exe.
2233 * cygwin.din: Export ftok, shmat, shmctl and shmget.
2234 * dcrt0.cc: Additional includes for cygserver support.
2235 (dll_crt0_1): Initialise the cygserver client.
2236 * fhandler.h (fhandler_tty): New method cygserver_attach_tty.
2237 * fhandler_tty.cc: Additional includes for cygserver support.
2238 (fhandler_tty_slave::open): Attempt to use the cygserver when obtaining
2239 handles from the parent process. On failure or 9x use the current method.
2240 (fhandler_tty_slave::cygserver_attach_tty): New function.
2241 * fork.cc (fork_child): Fixup shm memory mapped areas.
2242 * pinfo.h: Declare fixup_shms_after_fork().
2243 * security.h: Declare alloc_sd().
2244 * tty.cc: Additonal includes to support cygserver.
2245 (tty::common_init): Don't allow others to open us if the cygserver is running.
2246 * winsup.h: Declare cygserver_running.
2247 * cygserver.cc: New file.
2248 * cygserver_client.cc: New file.
2249 * cygserver_shm.cc: New file.
2250 * cygserver_shm.h: New file.
2251 * cygserver_transport.cc: New file.
2252 * cygserver_transport_pipes.cc: New file.
2253 * ipc.cc: New file.
2254 * shm.cc: New file.
2255 * include/cygwin/cygserver.h: New file.
2256 * include/cygwin/cygserver_transport.h: New file.
2257 * include/sys/ipc.h: New file.
2258 * include/sys/shm.h: New file.
2259
062401c9
RC
22602002-02-28 Robert Collins <rbtcollins@hotmail.com>
2261
2262 * thread.cc (semaphore::TryWait): Set errno as required by posix 1003.1.
2263 (__sem_wait): Ditto.
2264 (__sem_trywait): Ditto.
2265
d1f50ae5
CF
22662002-02-27 Christopher Faylor <cgf@redhat.com>
2267
2268 * include/cygwin/version.h: Bump DLL minor number.
2269
acb56175
CV
22702002-02-23 Corinna Vinschen <corinna@vinschen.de>
2271
2272 * cygwin.din (fstat64): New symbol.
2273 (ftruncate64): Ditto.
2274 (lseek64): Ditto.
2275 (lstat64): Ditto.
2276 (mmap64): Ditto.
2277 (seekdir64): Ditto.
2278 (stat64): Ditto.
2279 (telldir64): Ditto.
2280 (truncate64): Ditto.
2281 * dir.cc (telldir64): New function.
2282 (telldir): Call telldir64().
2283 (seekdir64): New function.
2284 (seekdir): Call seekdir64().
2285 * fhandler.h: Redefine all methods using __off32_t to use __off64_t.
2286 * fhandler.cc: Use __off64_t and struct __stat64 throughout.
2287 * fhandler_clipboard.cc: Ditto.
2288 * fhandler_disk_file.cc: Ditto.
2289 * fhandler_dsp.cc: Ditto.
2290 * fhandler_floppy.cc: Ditto.
2291 * fhandler_mem.cc: Ditto.
2292 * fhandler_random.cc: Ditto.
2293 * fhandler_socket.cc: Ditto.
2294 * fhandler_tape.cc: Ditto.
2295 * fhandler_zero.cc: Ditto.
2296 * pipe.cc: Ditto.
2297 * glob.c: Ditto, call lstat64 and stat64 in Cygwin.
2298 * mmap.cc: Use __off64_t throughout.
2299 (mmap64): New function.
2300 * sec_acl.cc (acl_worker): Use struct __stat64, call stat64 and lstat64.
2301 * syscalls.cc (lseek64): New function.
2302 (stat64_to_stat32): Ditto.
2303 (fstat64): Ditto.
2304 (stat64): Ditto.
2305 (lstat64): Ditto.
2306 (ftruncate64): Ditto.
2307 (truncate64): Ditto.
2308 (_fstat): Call fstat64.
2309 (_stat): Call stat64.
2310 (cygwin_lstat): Rename to avoid declaration problem. Call lstat64.
2311 (stat_worker): Use struct __stat64.
2312 (access): Ditto.
2313 (ftruncate): Call ftruncate64.
2314 (truncate): Call truncate64.
2315 * wincap.cc: Set flag has_64bit_file_access appropriately.
2316 * wincap.h: Add flag has_64bit_file_access.
2317 * winsup.h (ILLEGAL_SEEK): Define as __off64_t.
2318 (stat_dev): Declare using struct __stat64.
2319 (stat_worker): Ditto.
2320 * include/cygwin/stat.h (struct __stat32): Define if compiling Cygwin.
2321 (struct __stat64): Ditto.
2322 (struct stat): Revert definition with explicitly sized datatypes.
2323 Eliminate sized field names.
2324 * include/cygwin/types.h (blksize_t): New type.
2325 (__blkcnt32_t): Ditto.
2326 (__blkcnt64_t): Ditto.
2327 (blkcnt_t): Ditto.
2328
083abe54
CF
23292002-02-22 Christopher Faylor <cgf@redhat.com>
2330
2331 * sync.h (new_muto): Just accept an argument which denotes the name of
2332 the muto. Use this argument to construct static storage.
2333 * cygheap.cc (cygheap_init): Reflect above change.
2334 * exceptions.cc (events_init): Ditto.
2335 * malloc.cc (malloc_init): Ditto.
2336 * path.cc (cwdstuff::init): Ditto.
2337 * cygheap.h (cwdstuff): Change name of lock element to make it less
2338 generic.
2339 * path.cc (cwdstuff::get_hash): Ditto.
2340 (cwdstuff::get_initial): Ditto.
2341 (cwdstuff::set): Ditto.
2342 (cwdstuff::get): Ditto.
2343 * sigproc.cc (proc_subproc): Ditto.
2344
2345 * debug.cc (lock_debug): Change to method. Use method rather than
2346 macro throughout.
2347
2348 * tty.h (tty_min::kill_pgrp): Declare new method.
2349 * fhandler_termios.cc (tty_min::kill_pgrp): New method.
2350 (fhandler_termios::line_edit): Use new method for killing process.
2351 * dcrt0.cc (do_exit): Ditto.
2352
2353 * dtable.cc (dtable::get_debugger_info): New method for inheriting
2354 dtable info from a debugger.
2355 * tty.cc (tty_init): Attempt to grab file handle info from parent
2356 debugger, if appropriate.
2357
2358 # dtable.cc (dtable::stdio_init): Make this a method.
2359 (dtable::init_std_file_from_handle): Don't set fd unless it's not open.
2360 (dtable::build_fhandler_from_name): Move name setting to
2361 dtable::build_fhandler.
2362 (dtable::build_fhandler): Add win32 name parameter.
2363 * dcrt0.cc (dll_crt0_1): Change to use dtable stdio_init.
2364 * dtable.h (dtable): Reflect build_fhandler parameter change.
2365 * mmap.cc (mmap_record::alloc_fh): Don't set name parameter in
2366 build_fhandler.
2367 * net.cc (fdsock): Remove set_name call since it is now handled by
2368 build_fhandler.
2369
2370 * sigproc.cc (proc_subproc): Release muto as early as possible.
2371
a6790c5f
CV
23722001-02-22 Corinna Vinschen <corinna@vinschen.de>
2373
2374 * smallprint.c (rn): Allow long long values.
2375 (__small_vsprintf): Add 'D', 'U' and 'X' formats for long long
2376 parameters.
2377
aa6df8d7
CF
23782002-02-19 Christopher Faylor <cgf@redhat.com>
2379
2380 * fhandler.cc (fhandler_base::puts_readahead): Remove default parameter
2381 setting. Newer gcc's complain about this.
2382 (fhandler_base::set_readahead_valid): Ditto.
2383 * fhandler_dsp.cc (Audio::open): Ditto.
2384 (fhandler_dev_dsp::open): Ditto.
2385
cecb74ae
CF
23862002-02-19 Christopher Faylor <cgf@redhat.com>
2387
2388 * fork.cc (fork_parent): Use sec_user_nih to control process/thread
2389 inheritance/permission.
2390 * spawn.cc (spawn_guts): Ditto.
2391 * security.cc (create_token): Initialize token so that it is not tested
2392 for bogus value later. Use sec_user to control process/thread
2393 creation.
2394 * security.h (__sec_user): Rename declaration from sec_user.
2395 (sec_user_nih): Declare here as inline function wrapper for __sec_user.
2396 (sec_user): Ditto.
2397 * sigproc.cc (czombies): Allocate a character array for zombies to
2398 avoid constructor overhead
2399 (extremely hackish, I know).
2400 (cpchildren): Ditto.
2401 (pchildren): New define.
2402 (zombies): Ditto.
2403 (getsem): Use sec_user_nih to control semaphore inheritance/permission.
2404
2bd22312
CF
24052002-02-16 Christopher Faylor <cgf@redhat.com>
2406
2407 * times.cc (hires::prime): Restore thread priority on failure
2408 condition.
2409
2410 * uinfo.cc (uinfo_init): Use more robust method for determining if
2411 process was invoked from a non-cygwin process.
2412
2413 * sync.h (muto::init): Eliminate "inheritance" parameter.
2414 (new_muto): Reflect removal of parameter.
2415 * sync.cc (muto::init): Ditto.
2416 * cygheap.cc (cygheap_init): Ditto.
2417 * debug.cc (threadname_init): Ditto.
2418 * exceptions.cc (events_init): Ditto.
2419 * malloc.cc (malloc_init): Ditto.
2420 * path.cc (cwdstuff::init): Ditto.
2421 * sigproc.cc (sigproc_init): Ditto.
2422
4c761646
CF
2423 * grp.cc (group_lock): Use different method for locking with static
2424 member.
2bd22312 2425 (read_etc_group): REALLY ensure that read lock mutex is released.
4c761646
CF
2426 * passwd.cc (passwd_lock): Use different method for locking with static
2427 member.
2428 (read_etc_passwd): REALLY ensure that read lock mutex is released.
2bd22312
CF
2429
2430 * shared.cc (sec_user): Correct reversed inheritance test.
2431
60b68f0d
CF
24322002-02-15 Christopher Faylor <cgf@redhat.com>
2433
2434 * hires.h (hires::usecs): Rename from utime. Accept an argument.
2435 * strace.cc (strace::microseconds): Use hires class for calculating
2436 times.
2437 * sync.h (new_muto): Use NO_COPY explicitly in declaration.
2438 * times.cc (gettimeofday): Reflect change in usecs argument.
2439 (hires::usecs): Ditto. Changed name from utime.
2440 * winsup.h (NO_COPY): Add nocommon attribute to force setting aside
2441 space for variable.
2442 * regcomp.c (REQUIRE): Add a void cast to bypass a warning.
2443
dce87b21
CF
24442002-02-15 Christopher Faylor <cgf@redhat.com>
2445
2446 * hires.h: New file.
2447 * times.cc (gettimeofday): Use hires class for calculating current time.
2448 (hires::prime): New method.
2449 (hires::utime): Ditto.
2450
3d456520
CF
24512002-02-14 Christopher Faylor <cgf@redhat.com>
2452
2453 * include/sys/cygwin.h (cygwin_getinfo_types): New CW_STRACE_ACTIVE.
2454 * external.cc (cygwin_internal): Handle CW_STRACE_ACTIVE.
2455
907dc7d0
CF
24562002-02-14 Christopher Faylor <cgf@redhat.com>
2457
2458 * exceptions.cc (unused_sig_wrapper): Eliminate unused parameter to
2459 asm.
2460 * external.cc (cygwin_internal): Change CW_STRACE_ON to
2461 CW_STRACE_TOGGLE.
2462 * strace.cc (strace::hello): Toggle strace on and off.
2463 * sync.cc (muto::init): Renamed from constructor.
2464 * sync.h (muto::new): Delete.
2465 (muto::delete): Ditto.
2466 (new_muto): Simplify. Use muto.init for nearly everything.
2467 * uinfo.cc (uinfo_init): Avoid closing a NULL handle.
2468 * include/sys/cygwin.h (cygwin_getinfo_types): Rename CW_STRACE_OFF to
2469 CW_STRACE_TOGGLE. Delete CW_STRACE_OFF.
2470 * include/sys/strace.h (strace): Add "inited" field.
2471
4753a17b
CV
24722001-02-12 Corinna Vinschen <corinna@vinschen.de>
2473
2474 * include/cygwin/acl.h: Fix definition of aclent_t.
2475
909acaf6
CF
24762002-02-10 Christopher Faylor <cgf@redhat.com>
2477
2478 * Makefile.in (DLL_OFILES): Consolidate object files.
2479
de4e0d30
CV
24802002-02-10 Corinna Vinschen <corinna@vinschen.de>
2481
b31c68c4
CV
2482 * child_info.h, cygheap.h, fhandler_clipboard.cc, fhandler_dsp.cc,
2483 fhandler_floppy.cc, fhandler_mem.cc, fhandler_random.cc,
2484 fhandler_tape.cc, fhandler_zero.cc, grp.cc, mmap.cc, passwd.cc,
2485 pinfo.cc, pinfo.h, pipe.cc, sec_acl.cc, sec_helper.cc, security.cc,
2486 security.h, thread.h, uinfo.cc, include/cygwin/acl.h: Fix copyright.
2487
24882002-02-10 Corinna Vinschen <corinna@vinschen.de>
2489
2490 * child_info.h, cygheap.h, dcrt0.cc, dir.cc, fhandler.cc, fhandler.h,
de4e0d30
CV
2491 fhandler_clipboard.cc, fhandler_disk_file.cc, fhandler_dsp.cc,
2492 fhandler_floppy.cc, fhandler_mem.cc, fhandler_random.cc,
2493 fhandler_tape.cc, fhandler_zero.cc, grp.cc, mmap.cc, passwd.cc,
2494 pinfo.cc, pinfo.h, pipe.cc, sec_acl.cc, sec_helper.cc, security.cc,
b31c68c4 2495 security.h, spawn.cc, syscalls.cc, thread.h, uinfo.cc, winsup.h:
de4e0d30
CV
2496 Change usage of uid_t to __uid16_t, gid_t to __gid16_t and
2497 off_t to __off32_t throughout. Use INVALID_UID, INVALID_GID and
2498 INVALID_SEEK instead casting -1 to the appropriate type.
2499 * winsup.h: Define INVALID_UID, INVALID_GID and INVALID_SEEK.
2500 * include/cygwin/acl.h: Define internal __aclent16_t and __aclent32_t
2501 types. Don't declare acl functions when compiling Cygwin.
2502 * include/cygwin/grp.h: Declare getgrgid() and getgrnam() with
2503 correct types for internal usage.
2504
39b553b8
CV
25052002-02-10 Corinna Vinschen <corinna@vinschen.de>
2506
2507 Patch suggested by Pierre A. Humblet <Pierre.Humblet@ieee.org>:
2508 * uinfo.cc (internal_getlogin): Try evaluating user by SID even if
2509 ntsec is off.
2510 (uinfo_init): Set primary group even if ntsec is off.
2511
52296b85
CV
25122002-02-09 Corinna Vinschen <corinna@vinschen.de>
2513
2514 * include/cygwin/grp.h: New file.
2515 * include/cygwin/stat.h: Ditto.
2516 * include/cygwin/types.h: Add definitions for __off32_t,
2517 __off64_t, off_t, __uid16_t, __uid32_t, uid_t, __gid16_t,
2518 __gid32_t and gid_t.
2519 * include/sys/cygwin.h: Use correct uid and gid types.
2520
ff86860b
CV
25212002-02-09 Corinna Vinschen <corinna@vinschen.de>
2522
2523 * dtable.cc (dtable::dup2): Revert previous patch.
2524 * fhandler.h: Ditto.
2525 (fhandler_socket::recv): Define new method.
2526 (fhandler_socket::send): Ditto.
2527 * fhandler_socket.cc (fhandler_socket::recv): New method.
2528 (fhandler_socket::send): Ditto.
2529 (fhandler_socket::read): Call fhandler_socket::recv() now.
2530 (fhandler_socket::write): Call fhandler_socket::send() now.
2531 * net.cc (class wsock_event): Move definition to wsock_event.h.
2532 (fdsock): Revert previous patch.
2533 (cygwin_recv): Move implementation to fhandler_socket::recv().
2534 (cygwin_send): Move implementation to fhandler_socket::send().
2535 * wsock_event.h: New file.
2536
d0672acc
CV
25372002-02-06 Alexander Gottwald <Alexander.Gottwald@s1999.tuchemnitz.de>
2538
2539 * net.cc (get_2k_ifconf): Create interface entries for tokenring cards.
2540
fae28904
CV
25412002-02-08 Corinna Vinschen <corinna@vinschen.de>
2542
2543 * dtable.cc (dtable::dup2): Store fd for fhandler_socket.
2544 * fhandler.h (fhandler_base::set_fd): New virtual method.
2545 (fhandler_base::get_fd): Ditto.
2546 (fhandler_socket::set_fd): Ditto.
2547 (fhandler_socket::get_fd): Ditto.
2548 * fhandler_socket.cc (fhandler_socket::read): Call cygwin_recv instead
2549 of native Winsock recv.
2550 (fhandler_socket::write): Call cygwin_send instead of native Winsock
2551 send.
2552 * net.cc (fdsock): Store fd in fhandler_socket.
2553
1f64102f
CV
25542002-02-07 Corinna Vinschen <corinna@vinschen.de>
2555
2556 * net.cc (cygwin_getsockname): Fix handling of NULL sun_path.
2557
562d9745
CV
25582002-01-29 Corinna Vinschen <corinna@vinschen.de>
2559
2560 * net.cc (getdomainname): Fix registry key for 9x systems, too.
2561
94ee02fa
CV
25622002-01-29 Corinna Vinschen <corinna@vinschen.de>
2563
2564 * net.cc (getdomainname): Fix registry key for NT systems.
2565
494a66d9
CF
25662002-01-28 Christopher Faylor <cgf@redhat.com>
2567
2568 * external.cc (cygwin_internal): Initialize various internal settings
2569 if required to allow use of some things from user loaded DLL.
2570 (CW_STRACE_ON): Add new feature.
2571 (CW_CYGWIN_PID_TO_WINPID): Ditto.
2572 * pinfo.cc (set_myself): Call "strace.hello" to initiate possible
2573 strace session.
2574 (pinfo::init): Guard against dereferencing uninitialized myself.
2575 * sigproc.cc (wait_sig): Call strace.hello() when __SIGTRACE "signal"
2576 received.
2577 * strace.cc (strace::hello): New method.
2578 * wincap.cc (wincapc::init): Avoid initializing if already initialized.
2579 * wincap.h (wincapc::wincapc): New method.
2580 * include/sys/cygwin.h: Add new CW_ enums. Kludge typedefs of
2581 {g,u}id_t if required.
2582 * strace.h (strace::hello): Declare new method.
2583
6616e6cf
CF
25842002-01-28 Earnie Boyd <earnie@users.sf.net>
2585
2586 * include/sys/strace.h (_STRACE_ON): Define.
2587 (_STRACE_OFF): Ditto.
2588
dfb4c347
CF
25892002-01-24 Christopher Faylor <cgf@redhat.com>
2590
2591 * speclib: Ensure that temporary def file is removed.
2592
3c07fbeb
CF
25932002-01-23 Christopher Faylor <cgf@redhat.com>
2594
2595 * speclib: Use rm -f to remove temp file just to quiet any potential
2596 warnings.
2597
f6fc31e1
CV
25982002-01-23 Corinna Vinschen <corinna@vinschen.de>
2599
2600 * security.cc (create_token): Use sec_user() to create
be6d8567
CV
2601 SECURITY_ATTRIBUTES structure for primary token. Use
2602 MAXIMUM_ALLOWED access rights instead of TOKEN_ALL_ACCESS.
f6fc31e1 2603
adbd01af
CV
26042002-01-23 Corinna Vinschen <corinna@vinschen.de>
2605
2606 * path.cc (symlink): Fix check for already existing file.
2607
aed69a5b
CF
26082002-01-21 Christopher Faylor <cgf@redhat.com>
2609
2610 * cygmagic: Suppress error output when figuring out if sum takes an
2611 option.
2612
f3647dd7
CF
26132002-01-21 Christopher Faylor <cgf@redhat.com>
2614
2615 * cygmagic: Attempt to figure out if sum takes an option.
2616
51076b73
CF
26172002-01-21 DJ Delorie <dj@redhat.com>
2618
2619 * Makefile.in (libpthread.a): Pass the assembler also.
291be307 2620 (libm.a): Ditto.
51076b73
CF
2621 (libc.a): Ditto.
2622 * speclib: Specify the assembler to dlltool.
2623
0ac2abea
CF
26242002-01-21 Christopher Faylor <cgf@redhat.com>
2625
2626 * include/cygwin/version.h: Bump DLL minor number.
2627
ac11ec88
CV
26282002-01-21 Corinna Vinschen <corinna@vinschen.de>
2629
28982aa8 2630 * grp.cc (getgrgid): Don't return default gid entry when ntsec is on.
ac11ec88
CV
2631 * syscalls.cc (setegid): Don't set primary group in process token.
2632
8ef47135
CF
26332002-01-21 Christopher Faylor <cgf@redhat.com>
2634
2635 * speclib: Don't use /dev/null as DLL name. Just default to what's
2636 already in .def file.
2637
26382002-01-21 Christopher Faylor <cgf@redhat.com>
2639
2640 * exceptions.cc (sig_handle): Remove last vestiges of SA_NOCLDSTOP code
2641 which caused SIGCHLD to be ignored.
2642
07cc1f1f
CF
26432002-01-20 Christopher Faylor <cgf@redhat.com>
2644
2645 * include/cygwin/version.h: Bump DLL minor number.
2646
385437d4
CF
26472002-01-20 Christopher Faylor <cgf@redhat.com>
2648
2649 * syscalls.cc (regfree): Make dll_export.
2650
d7c16d8d
CF
26512002-01-20 Christopher Faylor <cgf@redhat.com>
2652
2653 * exceptions.cc (ctrl_c_handler): Convert windows pid to cygwin pid
2654 when detecting if we should actually handle CTRL-C.
2655
216109a8
CF
26562002-01-19 Christopher Faylor <cgf@redhat.com>
2657
2658 * Makefile.in (new-cygwin1.dll): Revert previous change. libsupc++.a
2659 is only available in libstdc++-v3.
2660
9e73b339
CF
26612002-01-19 Christopher Faylor <cgf@redhat.com>
2662
2663 * exceptions.cc (sig_handle_tty_stop): Don't send SIGCHLD if parent
2664 doesn't want it.
2665 (sig_handle): Don't check for SA_NOCLDSTOP here. We don't have enough
2666 information.
2667
5946622e
CF
26682002-01-19 Christopher Faylor <cgf@redhat.com>
2669
2670 * include/cygwin/version.h: Bump DLL minor number.
2671
994fe87b
CF
26722002-01-19 Christopher Faylor <cgf@redhat.com>
2673
2674 * Makefile.in (new-cygwin1.dll): Just use -lsupc++ for link.
2675 * sigproc.cc (proc_exists): Change existence criteria.
2676 * sync.h (new_muto): Add volatile to definition to avoid gcc
2677 optimization problems.
2678
df3af773
CV
26792002-01-19 Corinna Vinschen <corinna@vinschen.de>
2680
2681 * include/cygwin/version.h: Bump API minor version to 51.
2682
7d6be0d6
CV
26832002-01-19 Mark Bradshaw <bradshaw@staff.crosswalk.com>
2684
291be307
CF
2685 * cygwin.din: Add recvmsg and sendmsg.
2686 * net.cc: Add cygwin_recvmsg and cygwin_sendmsg.
2687 * /usr/include/sys/socket.h: Add recvmsg and sendmsg.
7d6be0d6 2688
2d3dab2e
CV
26892002-01-19 Corinna Vinschen <corinna@vinschen.de>
2690
2691 * security.cc (create_token): Close processes token handle as soon
2692 as it's not used anymore.
2693
104c3be6
CV
26942002-01-17 Corinna Vinschen <corinna@vinschen.de>
2695
2696 * Makefile.in: Add fnmatch.o to DLL_OFILES.
2697 * cygwin.din: Add fnmatch export symbol.
2698 * fnmatch.c: New file.
2699 * include/fnmatch.h: Ditto.
2700 * include/cygwin/version.h: Bump API minor version to 50.
2701
9a7e1562
CV
27022002-01-15 Corinna Vinschen <corinna@vinschen.de>
2703
2704 * path.cc (fchdir): Call chdir with full windows path.
2705
7eddac1b
CV
27062002-01-14 Corinna Vinschen <corinna@vinschen.de>
2707
2708 * dir.cc: Use INVALID_FILE_ATTRIBUTES instead of "(DWORD) -1"
2709 for file attributes throughout.
2710 * fhandler.cc: Ditto.
2711 * fhandler_disk_file.cc: Ditto.
2712 * path.cc: Ditto.
2713 * path.h: Ditto.
2714 * syscalls.cc: Ditto.
2715 * times.cc (utimes): Use path_conv::isdir() instead of explicit
2716 GetFileAttributes() call.
2717
5daa0835
CF
27182002-01-13 Christopher Faylor <cgf@redhat.com>
2719
2720 * dcrt0.cc (multiple_cygwin_problem): Clarify logic and make
2721 CYGWIN_MISMATCH_OK more powerful.
2722
06486d9e
CF
27232002-01-10 Christopher Faylor <cgf@redhat.com>
2724
2725 * exceptions.cc (sig_handle): Accept a second argument indicating
2726 whether the signal came from this process or not.
2727 * sigproc.h: Reflect sig_handle arg change.
2728 * signal.cc (kill_pgrp): Add sigframe info.
2729 (abort): New function. Eliminates newlib function of same name.
2730 * sigproc.cc (wait_sig): Pass "signal from this process" value as arg
2731 2.
2732
bb5225c2
CV
27332002-01-10 Corinna Vinschen <corinna@vinschen.de>
2734
2735 * syscalls.cc (pathconf): Guard _PC_PATH_MAX branch against invalid
2736 file parameter.
2737
c0a8e8d0 27382002-01-09 Christopher Faylor <cgf@redhat.com>
291be307 2739 Robert Collins <rbtcollins@hotmail.com>
c0a8e8d0
CF
2740
2741 * exceptions.cc (early_stuff_init): Rename from misnamed
2742 set_console_handler.
2743 (ctrl_c_handler): Attempt to work around potential signal duplication
2744 during process startup.
2745 (sig_handle): Ignore SIGINT when we're just an "exec stub".
2746 * spawn.cc (spawn_guts): Store pid of spawned process in global for use
2747 by ctrl_c_handler.
2748 * dcrt0.cc (dll_crt0_1): Call renamed initialization function.
2749 * winsup.h: Reflect function name change.
2750
fe37dd79
CV
27512002-01-08 Corinna Vinschen <corinna@vinschen.de>
2752
2753 * net.cc (cygwin_accept): Set sun_path for newly connected socket.
2754
cbf7a9eb
CF
27552002-01-07 Ralf Habacker <Ralf.Habacker@freenet.de>
2756
2757 * Makefile.in: Add uninstall target.
2758
a2e12d0c
CF
27592002-01-07 Christopher Faylor <cgf@redhat.com>
2760
2761 * sigproc.cc (getsem): Clean up debugging output.
2762
4a08cbfe
CF
27632002-01-07 Christopher Faylor <cgf@redhat.com>
2764
2765 * sigproc.cc (getsem): Set errno when unable to create own semaphore.
2766 Reorganize to make clearer that error should only come from initial
2767 creation of process semaphore.
2768
10dedaaa
CF
27692002-01-06 Christopher Faylor <cgf@redhat.com>
2770
2771 * dtable.cc (dtable::init_std_file_from_handle): Add some defensive
2772 code to invalid handle case.
2773
d6154fb7
CV
27742002-01-06 Corinna Vinschen <corinna@vinschen.de>
2775
2776 * ioctl.cc (ioctl): Make third argument optional.
2777 * include/sys/ioctl.h: Ditto in declaration.
2778 * dtable.cc (dtable::init_std_file_from_handle): Revert previous
2779 bogus patch.
2780 * window.cc (WndProc): Raise SIGURG instead of SIGIO in case of FD_OOB
2781 message.
2782
9125cbd7 27832002-01-05 Christopher Faylor <cgf@redhat.com>
fcb76c5d 2784
9125cbd7
CF
2785 * dir.cc (opendir): Guarantee release of alloced fhandler structure on
2786 error.
fcb76c5d 2787
9125cbd7
CF
27882002-01-05 Corinna Vinschen <corinna@vinschen.de>
2789
2790 * exceptions.cc (sig_handle): Set default action for SIGURG to SIG_IGN.
2791
27922002-01-05 Corinna Vinschen <corinna@vinschen.de>
2edba236
CV
2793
2794 * dtable.cc (dtable::init_std_file_from_handle): Don't treat NULL
2795 handle as errorneous.
2796
acf05df7
CF
27972002-01-04 Christopher Faylor <cgf@redhat.com>
2798
2799 * cygmagic: Change logic for equality test.
2800
7acba971
CF
28012002-01-04 Christopher Faylor <cgf@redhat.com>
2802
2803 * dir.cc (opendir): Don't attempt to call sub-opendir if ENOENT.
2804
9125cbd7 28052002-01-04 Corinna Vinschen <corinna@vinschen.de>
dc63cea5
CV
2806
2807 * net.cc: Replace usage of AF_UNIX by Posix compliant AF_LOCAL
2808 throughout.
2809 (socketpair): Explicitly allow SOCK_STREAM and SOCK_DGRAM socket types
2810 in families AF_UNIX and AF_LOCAL. Explicitly allow PF_UNSPEC, PF_LOCAL
2811 and PF_INET protocols. Return error otherwise. Implement datagram
2812 socketpairs.
2813
3b789217
CF
28142002-01-01 Christopher Faylor <cgf@redhat.com>
2815
291be307 2816 * speclib: Remove temp files automatically.
3b789217 2817
2fe27909 28182002-01-01 Corinna Vinschen <corinna@vinschen.de>
2fe27909
CV
2819 * fhandler.h (fhandler_socket::sun_path): New private member.
2820 (fhandler_socket::set_sun_path): New method.
2821 (fhandler_socket::get_sun_path): Ditto.
2822 * fhandler_socket.cc (fhandler_socket::fhandler_socket): Initialize
2823 sun_path to NULL.
2824 (fhandler_socket::~fhandler_socket): Free sun_path if needed.
2825 (fhandler_socket::set_sun_path): New method.
2826 * net.cc (cygwin_bind): Set sun_path to path of local socket file.
2827 (cygwin_getsockname): Add code to return correct sockaddr for unix
2828 domain sockets.
This page took 0.338537 seconds and 5 git commands to generate.