]> sourceware.org Git - newlib-cygwin.git/blame - winsup/cygwin/ChangeLog
Patch by Joe Buehler <jbuehler@hekimian.com>:
[newlib-cygwin.git] / winsup / cygwin / ChangeLog
CommitLineData
b7e66454
CV
12002-08-08 Joe Buehler <jbuehler@hekimian.com
2
3 * sec_helper.cc (sec_acl): remove extraneous arg to debug_printf.
4
235d9fda
CV
52002-08-07 Conrad Scott <conrad.scott@dsl.pipex.com>
6
7 * fhandler_socket.cc (fhandler_socket::accept): Fix FIONBIO call.
8
772f6c3e
CF
92002-08-06 Christopher Faylor <cgf@redhat.com>
10
11 * cygheap.cc (_csbrk): Avoid !cygheap considerations.
12 (cygheap_init): Deal with unintialized cygheap issues here.
88de60e4 13 (cheap_init): Move cygheap_max setting here.
772f6c3e 14
e851d2fe
CF
152002-08-06 Christopher Faylor <cgf@redhat.com>
16 Conrad Scott <conrad.scott@dsl.pipex.com
17
18 * cygheap.cc (_csbrk): Allocate some slop initially. Don't erroneously
19 add sbrk amount to returned value in initial case.
20
115a0885
CF
212002-08-06 Christopher Faylor <cgf@redhat.com>
22
23 * spawn.cc (spawn_guts): Don't set mount_h here.
24 * sigproc.cc (init_child_info): Set it here instead.
25 * shared.cc (cygwin_mount_h): Make NO_COPY.
26
1524ae42
CF
272002-08-06 Christopher Faylor <cgf@redhat.com>
28
29 * cygthread.cc (cygthread::stub): Accept flag to pass info structure to
30 thread function.
31 (cygthread::operator new): Add defense debugging output.
32 (cygthread::cygthread): Add debugging output. Set name after thread
33 has been awakened to avoid a race.
34 (cygthread::exit_thread): Use handle operator rather than using ev
35 directly.
36 (cygthread::exit_thread): Reorganize to provide debugging. Set __name
37 to NULL.
38 * cygthread.h (cygself): Define.
39 * fhandler_tty.cc (fhandler_tty_master::init): Use cygself as argument
40 so that invoked thread can access its own info.
41 (process_output): Derive cygthread info of thread from thread argument.
42 * sigproc.cc (sigproc_init): Use cygself as argument so that invoked
43 thread can access its own info.
44 (wait_sig): Derive cygthread info of thread from thread argument.
45
ffebb4fe
CS
462002-08-06 Conrad Scott <conrad.scott@dsl.pipex.com>
47
48 * debug.h (handle_list::allocated): Remove field.
49 * debug.cc (newh): Don't malloc extra entries.
50 (add_handle): Downgrade strace message level.
51 (delete_handle): Remove case for `allocated' entries.
52
8d0bc156
CF
532002-08-05 Christopher Faylor <cgf@redhat.com>
54
55 * cygthread.cc (cygthread::stub): Change event creation to manual
56 reset. Set __name after calling SetEvent to prevent races.
57 (cygthread::detach): Always reset event here to prevent races.
58
245e4e87
CS
592002-08-03 Conrad Scott <conrad.scott@dsl.pipex.com>
60
61 * debug.h (WaitForMultipleObjects): Correct typo.
62
23d93d8d
CV
632002-08-01 Pierre Humblet <Pierre.Humblet@ieee.org>
64
65 * security.cc (verify_token): Do not reject a token just because
66 the supplementary group list is missing Everyone or a groupsid
67 equal to usersid, or because the primary group is not in the token,
68 as long as it is equal to the usersid.
69 * syscalls.cc (seteuid32): Use common code for all successful returns.
70 * grp.cc (getgroups32): Never includes Everyone in the output.
71
6b2a9a2f
CF
722002-08-01 Christopher Faylor <cgf@redhat.com>
73
74 * cygthread.cc (cygthread::exit_thread): Define new method.
75 * cygthread.h (cygthread::exit_thread): Declare new method.
76 * fhandler.h (fhandler_tty_master::hThread): Delete.
77 (fhandler_tty_master::output_thread): Define.
78 * fhandler_tty.cc (fhandler_tty_master::fhandler_tty_master): Adjust
79 constructor.
80 (fhandler_tty_master::init): Use cygthread rather than handle.
81 (process_output): Use cygthread method to exit.
82 (fhandler_tty_master::fixup_after_fork): Set output_thread to NULL
83 after fork.
84 (fhandler_tty_master::fixup_after_exec): Set output_thread to NULL
85 after spawn/exec.
86 * tty.cc (tty_list::terminate): Detach from output_thread using
87 cygthread method.
88
8a19897f
CF
892002-08-01 Christopher Faylor <cgf@redhat.com>
90
91 * syscalls.cc (_link): Revert previous change and just always
92 dereference the oldpath.
93
e51cfd31
CF
942002-08-01 Christopher Faylor <cgf@redhat.com>
95
96 * syscalls.cc (link): Properly deal with a link to a symlink.
97
92655eab
CF
982002-08-01 Christopher Faylor <cgf@redhat.com>
99
100 * cygthread.cc: Remove cruft.
101
b6bd7037
CF
1022002-08-01 Christopher Faylor <cgf@redhat.com>
103
104 * Makefile.in (DLL_OFILES): Add cygthread.o.
105 * dcrt0.cc (dll_crt0_1): Eliminate various thread initialization
106 functions in favor of new cygthread class.
107 * debug.cc: Remove thread manipulation functions.
108 * debug.h: Ditto.
109 * external.cc (cygwin_internal): Use cygthread method for determining
110 thread name. Remove capability for setting thread name.
111 * fhandler_console.cc (fhandler_console::read): Use cygthread method
112 rather than iscygthread function.
113 * fhandler_tty.cc (fhandler_tty_master::fhandler_tty_master): Use
114 cygthread methods to create threads.
115 (fhandler_tty_common::__acquire_output_mutex): Use cygthread method to
116 retrieve thread name.
117 * select.cc (pipeinf): Use cygthread pointer rather than handle.
118 (start_thread_pipe): Ditto.
119 (pipe_cleanup): Ditto.
120 (serialinf): Ditto.
121 (start_thread_serial): Ditto.
122 (serial_cleanup): Ditto.
123 (socketinf): Ditto.
124 (start_thread_socket): Ditto.
125 (socket_cleanup): Ditto.
126 * sigproc.cc (hwait_sig): Ditto.
127 (hwait_subproc): Ditto.
128 (proc_terminate): Ditto.
129 (sigproc_terminate): Ditto.
130 (sigproc_init): Initialize cygthread hwait_sig pointer.
131 (subproc_init): Initialize cygthread hwait_subproc pointer.
132 (wait_sig): Rely on cygthread HANDLE operator.
133 * strace.cc (strace::vsprntf): Use cygthread::name rather than threadname.
134 * window.cc (gethwnd): Use cygthread method to initialize thread.
135
afcd48e6
CV
1362002-07-31 Conrad Scott <conrad.scott@dsl.pipex.com>
137
138 * fhandler.h (fhandler_base::get_r_no_interrupt): Make non-virtual.
139 * net.cc (fdsock): Call set_r_no_interrupt.
140
deaa100b
CF
1412002-07-30 Christopher Faylor <cgf@redhat.com>
142
143 * syscalls.cc (_read): Clarify debugging output.
144
c91a9a9b
CF
1452002-07-30 Christopher Faylor <cgf@redhat.com>
146
147 * fhandler.h (fhandler_base::get_r_no_interrupt): Make virtual.
148
5ba08a92
CF
1492002-07-30 Christopher Faylor <cgf@redhat.com>
150
151 * fhandler_disk_file.cc (fhandler_cygdrive::set_drives): Incorporate .
152 and .. processing here.
153 (fhandler_cygdrive::readdir): Assume . and .. are already in pdrive.
154 (fhandler_cygdrive::seekdir): Ditto.
155
c6ed5790
CF
1562002-07-29 Christopher Faylor <cgf@redhat.com>
157
158 * dcrt0.cc (dll_crt0_1): Move debug_fixup_after_fork_exec.
159 * cygheap.cc (cygheap_fixup_in_child): Call debug_fixup_after_fork_exec
4f9cdc93 160 immediately after cygheap has been set up.
c6ed5790 161
5519d543
CV
1622002-07-29 Corinna Vinschen <corinna@vinschen.de>
163
164 * security.cc: Change some formatting.
165 * include/cygwin/version.h: Bump API minor version.
166
1672002-07-28 Pierre Humblet <Pierre.Humblet@ieee.org>
168
c6ed5790
CF
169 * cygheap.h (class cygheap_user): Add member groups.
170 * security.h (class cygsidlist): Add members type and maxcount, methods
171 position, addfromgr, alloc_sids and free_sids and operator+= (const
172 PSID psid). Modify contains () to call position () and optimize add ()
173 to use maxcount.
174 (class user_groups): Create. Update declarations of verify_token and
175 create_token.
176 * security.cc (cygsidlist::alloc_sids): New.
177 (cygsidlist::free_sids): New.
178 (get_token_group_sidlist): Create from get_group_sidlist.
179 (get_initgroups_sidlist): Create from get_group_sidlist.
180 (get_group_sidlist): Suppress.
181 (get_setgroups_sidlist): Create.
182 (verify_token): Modify arguments. Add setgroups case.
183 (create_token): Modify arguments. Call get_initgroups_sidlist and
184 get_setgroups_sidlist as needed. Set SE_GROUP_LOGON_ID from auth_pos
185 outside of the loop. Rename the various group sid lists consistently.
186 * syscalls.cc (seteuid32): Modify to use cygheap->user.groups.
187 (setegid32): Call cygheap->user.groups.update_pgrp.
188 * grp.cc (setgroups): Create.
189 (setgroups32): Create.
190 * uinfo.cc (internal_getlogin): Initialize and update
191 user.groups.pgsid.
192 * cygwin.din: Add setgroups and setgroups32.
5519d543 193
eb5720f2
CF
1942002-07-28 Christopher Faylor <cgf@redhat.com>
195
196 * fhandler_console.cc (fhandler_console::read): Use appropriate
197 kill_pgrp method.
198 * select.cc (peek_console): Ditto.
199 * fhandler_termios.cc (fhandler_termios::bg_check): Send "stopped"
200 signal to entire process group as dictated by SUSv3.
201 * termios.cc (tcsetattr): Detect when stopped signal sent and force a
202 stop before setting anything.
203
667f875d
CF
2042002-07-26 Christopher Faylor <cgf@redhat.com>
205
206 * include/cygwin/version.h: Bump API version to indicate that ntsec is
207 on by default now.
208
6b3c247d
CF
2092002-07-26 Conrad Scott <conrad.scott@dsl.pipex.com>
210
211 * fhandler_registry.cc (fhandler_registry::close): Return any error
212 result to the caller.
213 * syscalls.cc (_close): Return result of fhandler::close to the caller.
214
68fb3cca
CF
2152002-07-25 Christopher Faylor <cgf@redhat.com>
216
217 * security.cc (allow_ntsec): Default to on.
218 (allow_smbntsec): Default to off.
219
be18721e
CF
2202002-07-24 David MacMahon <davidm@smartsc.com>
221
222 * times.cc (to_time_t): Always round time_t down to nearest second.
223
b9e8058d
ED
2242002-07-25 Egor Duda <deo@logos-m.ru>
225
c6ed5790 226 * Makefile.in: Check if API version is updated when exports are
b9e8058d
ED
227 changed and stop if not so.
228
bf47141f
CV
2292002-07-24 Egor Duda <deo@logos-m.ru>
230
231 * include/cygwin/version.h: Bump minor API version.
232
0a73fce0
CV
2332002-07-24 Corinna Vinschen <corinna@vinschen.de>
234
235 * fhandler_serial.cc: Change 'must_init_serial_line capability'
236 to 'supports_reading_modem_output_lines' throughout (negated meaning).
237 * wincap.cc: Ditto.
238 * wincap.h: Ditto.
239
f72a851f
CV
2402002-07-23 Nicholas Wourms <nwourms@netscape.net>
241
242 * cygwin.din (fcloseall): Add symbol for export.
243 (fcloseall_r): Ditto.
244
99138976
CF
2452002-07-24 Christopher Faylor <cgf@redhat.com>
246
247 * path.cc (path_conv::check): Always set fileattr when component == 0.
248 (readlink): Use path_conv method rather than field.
249 * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Ditto,
250 throughout.
251 * path.h (path_conv): Make fileattr private.
252 * exceptions.cc (try_to_debug): Default to idle priority when looping.
253
010bb8a4
CV
2542002-07-23 Corinna Vinschen <corinna@vinschen.de>
255
256 * fhandler_serial.cc: Use must_init_serial_line capability throughout.
257 * wincap.cc: Set flag must_init_serial_line appropriately.
258 * wincap.h: Add flag must_init_serial_line.
259
fdb93cd2
CV
2602002-07-23 Corinna Vinschen <corinna@vinschen.de>
261
262 * security.cc (get_group_sidlist): Create group list from /etc files
263 even if DC is available but access fails.
264
08e2551c
CF
2652002-07-22 Christopher Faylor <cgf@redhat.com>
266
267 * fhandler_serial.cc: Fix formatting problems introduced by below
268 changes.
269
780c42b4
CV
2702002-07-22 Jacek Trzcinski <jacek@certum.pl>
271
08e2551c
CF
272 * fhandler.h (class fhandler_serial): Add new members of the class -
273 rts,dtr and method ioctl(). Variables rts and dtr important for Win 9x
274 only.
275 * fhandler_serial.cc (fhandler_serial::open): Add initial setting of
276 dtr and rts. Important for Win 9x only.
277 (fhandler_serial::ioctl): New function. Implements commands TIOCMGET,
780c42b4
CV
278 TIOCMSET and TIOCINQ.
279 (fhandler_serial::tcflush): Fixed found error.
08e2551c 280 (fhandler_serial::tcsetattr): Add settings of rts and dtr. Important
780c42b4 281 for Win 9x only.
08e2551c
CF
282 * termios.h: Add new defines as a support for ioctl() function on
283 serial device.
780c42b4 284
5ec1dcc5
CF
2852002-07-20 Christopher Faylor <cgf@redhat.com>
286
287 * autoload.cc (LoadDLLprime): Add jmp call to allow streamlining of
288 later jmp rewrite.
289 (doit): Avoid use of cx register. Just change one word to avoid races.
290
095a1272
CV
2912002-07-18 Pierre Humblet <pierre.humblet@ieee.org>
292
293 * security.cc (get_unix_group_sidlist): Create.
294 (get_supplementary_group_sidlist): Evolve into get_unix_group_sidlist.
295 (get_user_local_groups): Add check for duplicates.
296 (get_user_primary_group): Suppress.
297 (get_group_sidlist): Silently ignore PDC unavailability.
298 Call get_unix_group_sidlist() before get_user_local_groups().
299 Remove call to get_supplementary_group_sidlist(). Never call
300 get_user_primary_group() as the passwd group is always included.
301 Add well_known_authenticated_users_sid in only one statement.
302
86620e8f
CF
3032002-07-19 Christopher Faylor <cgf@redhat.com>
304
305 * fhandler_serial.cc (fhandler_serial::tcflush): Fix typo.
306
315fb3af
CV
3072002-07-15 Corinna Vinschen <corinna@vinschen.de>
308
309 * security.cc (get_group_sidlist): Fix formatting.
310
56a42791
CF
3112002-07-14 Christopher Faylor <cgf@redhat.com>
312
313 * dcrt0.cc (initial_env): Force path and CYGWIN_DEBUG contents to lower
314 case.
315 * exceptions.cc (error_start_init): Use the name derived from
316 GetModuleName rather than myself->progname.
317
3d0ba393
CF
3182002-07-14 Christopher Faylor <cgf@redhat.com>
319
320 * dcrt0.cc (dll_crt0_1): Move debug_init call back to here. Avoid a
321 compiler warning.
322 * shared.cc (memory_init): Remove debug_init call.
323 * debug.h (handle_list): Change "clexec" to "inherited".
324 * debug.cc: Remove a spurious declaration.
325 (setclexec): Conditionalize away since it is currently unused.
326 (add_handle): Use inherited field rather than clexec.
327 (debug_fixup_after_fork_exec): Ditto. Move debugging output to
328 delete_handle.
329 (delete_handle): Add debugging output.
330 * fhandler.cc (fhandler_base::set_inheritance): Don't bother setting
331 inheritance in debugging table since the handle was never protected
332 anyway.
333 (fhandler_base::fork_fixup): Ditto.
334
335 * exceptions.cc (debugger_command): Revert.
336
f5c3d180
CF
3372002-07-14 Conrad Scott <conrad.scott@dsl.pipex.com>
338
339 * debug.cc (clexec): Add missing `hl = hl->next'.
340
e8a6396f
CF
3412002-07-14 Christopher Faylor <cgf@redhat.com>
342
343 * Makefile.in (cygrun.exe): Add a -lcygwin on the end.
344
fea4c29f
CF
3452002-07-14 Christopher Faylor <cgf@redhat.com>
346
347 * Makefile.in (cygserver.exe): Add -lstdc++.
348 (cygrun.exe): Move -lgcc last.
349
c03dba93
CF
3502002-07-13 Christopher Faylor <cgf@redhat.com>
351
352 * dcrt0.cc (dll_crt0_1): Delay closing of some handles until cygheap
353 has been set up.
354 (break_here): New function, for debugging.
355 (initial_env): Add program name to "Sleeping" message. Implement new
356 "CYGWIN_DEBUG" environment variable option.
357 * exceptions.cc (debugger_command): Add argument to dumper call.
358 * strace.cc (strace::hello): Use winpid if cygwin pid is unavailable.
359 (strace::vsprntf): Ditto.
360
0301bfd0
CF
3612002-07-13 Christopher Faylor <cgf@redhat.com>
362
363 * debug.h (handle_list): Move here from debug.cc. Add "inherit" flag
364 functionality.
365 * cygheap.cc (init_cheap): Move cygheap_max calculation to _csbrk.
366 (_csbrk): Reorganize to not assume first allocation is <= 1 page.
367 (cygheap_setup_for_child): Mark protected handle as inheritable.
368 * cygheap.h (cygheap_debug): New struct.
369 (init_cygheap): Add new structure when debugging.
370 * dcrt0.cc (dll_crt0_1): Remove call to debug_init. Close ppid_handle
371 here, if appropriate. Don't protect subproc_ready, since it is already
372 protected in the parent. Call memory_init prior to ProtectHandle to
373 ensure that cygheap is set up. Call debug_fixup_after_fork_exec when
374 appropriate.
375 (_dll_crt0): Don't close ppid_handle here.
376 * debug.cc: Use cygheap debug structure rather than static elements
377 throughout.
378 (add_handle): Don't issue a warning if attempt to protect handle in
379 exactly the same way from exactly the same place. Add pid info to
380 warning output. Accept additional argument controlling whether handle
381 is to be inherited. Add pid to stored information.
382 (debug_fixup_after_fork_exec): Renamed from debug_fixup_after_fork.
383 Reorganize to avoid erroneously skipping handles.
384 (mark_closed): Add pid info to warning output.
385 (setclexec): Rename from setclexec_pid.
386 * fhandler.cc (fhandler_base::get_default_fmode): Minor reorg.
387 (fhandler_base::fstat): Add debugging output.
388 (fhandler_base::set_inheritance): Call setclexec rather than
389 setclexec_pid.
390 (fhandler_base::fork_fixup): Ditto.
391 * fhandler_console.cc (get_tty_stuff): Mark protected handle as
392 inheritable.
393 * fhandler_tty.cc (fhandler_tty_slave::open): Ditto.
394 * tty.cc (tty::make_pipes): Ditto.
395 (tty::common_init): Ditto.
396 * fork.cc (fork_parent): Ditto.
397 (fork_child): Close protected handles with correct name. Remove
398 debug_fixup_after_fork call.
399 * fhandler_socket.cc (fhandler_socket::create_secret_event): Mark
400 protected handle as inheritable/non-inheritable, as appropriate.
401 * shared.cc (memory_init): Mark protected handle as inheritable.
402 Call debug_init here.
403 * sigproc.cc (wait_sig): Close protected handle with correct name.
404 * spawn.cc (spawn_guts): Rename spr to subproc_ready and mark it as
405 inheritable.
406
407 * exceptions.cc (debugger_command): Try to run dumper.exe, if found.
408
409 * syscalls.cc (fstat64): Don't follow symlinks for path_conv lookup
410 since path is already resolved.
411
e82f98d0
CF
4122002-07-12 Christopher Faylor <cgf@redhat.com>
413
37f7c64b 414 * cygwin.din: Change erroneous entries.
e82f98d0 415
472a8223
CV
4162002-07-11 Pavel Tsekov <ptsekov@gmx.net>
417
418 * fhandler_disk_file.cc (fhandler_disk_file::open): Don't
419 move the file pointer to the end of file if O_APPEND is
420 specified in the open flags.
421
1f5ff387
CF
4222002-07-09 Christopher Faylor <cgf@redhat.com>
423
424 * debug.cc: Avoid explicit zeroing of globals.
425 (lock_debug): Make locker a static member. Avoid unlocking when
426 already unlocked (from Conrad Scott).
427 (debug_init): Initialize lock_debug::locker here.
428 * fork.cc (fork_child): Fix up fdtab earlier to avoid some (but not
429 all) confusion with close-on-exec craziness.
430
6bb769ef
CV
4312002-07-05 Corinna Vinschen <corinna@vinschen.de>
432
433 * fhandler.h (fhandler_socket::is_unconnected): Constify.
434 (fhandler_socket::is_connect_pending): Ditto.
435 (fhandler_socket::is_connected): Ditto.
436 (fhandler_socket::set_connect_state): New method.
437 (struct select_record): Add member `except_on_write'.
438 (select_record::select_record): Initialize all bool values to `false'.
439 * fhandler_socket.cc: Use set_connect_state() method throughout.
440 (fhandler_socket::connect): Set state always to connected if connection
441 isn't pending.
442 * net.cc (cygwin_getsockopt): Revert erroneous previous patch.
443 * select.cc (set_bits): Check for `except_on_write'. Set fd in
444 write_fds if set. Set connect state to connected if fd has been
445 returned by WINSOCK_SELECT.
446 (peek_socket): Check for `except_on_write'.
447 (start_thread_socket): Ditto.
448 (fhandler_socket::select_write): Don't set `write_ready' if connect
449 is pending. Set `except_on_write' if connect is pending.
450
91a2f87b
CF
4512002-07-05 Christopher Faylor <cgf@redhat.com>
452
453 * ntdll.h (_SYSTEM_PROCESSOR_TIMES): Force eight byte alignment.
454 (_SYSTEM_TIME_OF_DAY_INFORMATION): Ditto.
455
6201dd26
CF
456 * path.cc (suffix_scan::has): Reorganize to eliminate double scanning
457 for for .exe (in the typical case).
458
d5591d9d
CV
4592002-07-05 Corinna Vinschen <corinna@vinschen.de>
460
461 * fhandler.h (UNCONNECTED): New define.
462 (CONNECT_PENDING): Ditto.
463 (CONNECTED): Ditto.
464 (class fhandler_socket): Add member `had_connect_or_listen'.
465 Add member functions `is_unconnected', `is_connect_pending' and
466 `is_connected'.
467 * fhandler_socket.cc (fhandler_socket::connect): Set member
468 `had_connect_or_listen' according to return code of WinSock
469 call.
470 (fhandler_socket::listen): Ditto.
471 * net.cc (cygwin_getsockopt): Modify SO_ERROR return value in
472 case of socket with pending connect().
473 * select.cc (peek_socket): Only add socket to matching fd_set
474 if it's not "ready". Call WINSOCK_SELECT only if at least one
475 socket is in one of the fd_sets.
476 (start_thread_socket): Only add socket to matching fd_set
477 if it's not "ready".
478 (fhandler_socket::select_write): Set write_ready to true also
479 if socket isn't connected or listening.
480
5cff62d6
CV
4812002-07-04 Corinna Vinschen <corinna@vinschen.de>
482
483 * fhandler_socket.cc (fhandler_socket::set_sun_path): Don't free
484 memory here. Allow NULL parameter.
485
e4894708
CV
4862002-07-04 Corinna Vinschen <corinna@vinschen.de>
487
488 * fhandler_socket.cc (fhandler_socket::dup): Add missing copy operation
489 on sun_path.
490
073aa681
CF
4912002-07-03 Christopher Faylor <cgf@redhat.com>
492
493 * include/cygwin/version.h: Bump DLL minor number.
494
a0ee9f75
CF
4952002-07-03 Christopher Faylor <cgf@redhat.com>
496
497 * include/sys/statfs.h: New header file.
498
58b43c8d
CF
4992002-07-03 Christopher Faylor <cgf@redhat.com>
500
501 * dtable.cc (cygwin_attach_handle_to_fd): Default to implicit bin mode
502 if none specified.
503 * fhandler.cc (fhandler_base::init): Make bin argument a guarantee
504 rather than a suggestion.
505 * path.cc (path_conv::check): Load flag returned from
506 cygwin_conv_to_win32_path into path_flags.
507
bd86408f
CS
5082002-07-03 Conrad Scott <conrad.scott@dsl.pipex.com>
509
510 * tty.cc (tty::common_init): Reverse logic of cygserver check in
511 call to SetKernelObjectSecurity.
512
3c6bd991
CV
5132002-07-03 Thomas Pfaff <tpfaff@gmx.net>
514
515 * autoload.cc (WSAEventSelect): Define new autoload function.
516 (WSAEnumNetworkEvents): Ditto.
517 * fhandler_socket.cc (fhandler_socket::accept): If socket is
518 in blocking mode wait for incoming connection and signal.
519
45586380
CF
5202002-07-02 Christopher Faylor <cgf@redhat.com>
521
522 * cygheap.cc (init_cheap): Rearrange error message.
523 (cygheap_fixup_in_child): Ditto.
524 * dtable.cc: Remove if 0'ed code.
525 * fhandler_dsp.cc (fhandler_dev_dsp::open): Force binmode.
526 * sec_helper.cc (cygsid::get_id): Use system_printf for error message.
527 * tty.cc (tty::common_init): Ditto.
528
5d230174
CF
5292002-07-02 Christopher Faylor <cgf@redhat.com>
530
531 * net.cc (cygwin_getpeername): Defend against NULL pointer dereference.
532
b7e51146
CV
5332002-07-02 Egor Duda <deo@logos-m.ru>
534
535 * include/cygwin/version.h: Bump API minor version.
536
891bb974
CV
5372002-07-01 Pierre Humblet <pierre.humblet@ieee.org>
538
539 * security.cc (get_logon_server): Interpret a zero length
540 domain as the local domain.
541 (get_group_sidlist): Add authenticated users SID to SYSTEM's group
542 list instead of SYSTEM itself.
543 (verify_token): Accept the primary group sid if it equals
544 the token user sid.
545
aeed87e8
CV
5462002-07-02 Corinna Vinschen <corinna@vinschen.de>
547
548 * cygwin.din (__fpclassifyd): Add symbol.
549 (__fpclassifyf): Ditto.
550 (__signbitd): Ditto.
551 (__signbitf): Ditto.
552
654bad37
CV
5532002-07-02 Corinna Vinschen <corinna@vinschen.de>
554
555 * security.h (DONT_INHERIT): Eliminate definition.
556 (INHERIT_ALL): Ditto.
557 (INHERIT_ONLY): Ditto.
558 * sec_acl.cc: Use appropriate defines from accctrl.h instead of the
559 above throughout.
560 * security.cc: Ditto.
561
e968058f
CF
5622002-07-01 Pierre Humblet <pierre.humblet@ieee.org>
563
564 * syscalls.c (seteuid32): Return immediately if the program is not
565 impersonated and both uid and gid are original.
566 (setegid32): Return immediately if the new gid is the current egid.
567
3434e0c8
CF
5682002-07-01 Christopher Faylor <cgf@redhat.com>
569
570 * syscalls.cc (seteuid32): Fix incorrect placement of Pierre's patch
571 below.
572
3557bbc1
CF
5732002-07-01 Christopher Faylor <cgf@redhat.com>
574
575 * syscalls.cc (seteuid32): Fix incorrect use of system_printf.
576
74fcdaec
CF
5772002-07-02 Christopher January <chris@atomice.net>
578
579 * autoload.cc (GetSecurityInfo): Define new autoload function.
580 (RegQueryInfoKeyA): Ditto.
581 * fhandler.h (fhandler_virtual::fill_filebuf): Change return type to
582 bool.
583 (fhandler_proc::fill_filebuf): Ditto.
584 (fhandler_registry::fill_filebuf): Ditto.
585 (fhandler_process::fill_filebuf): Ditto.
586 (fhandler_registry::value_name): Add new member.
587 (fhandler_registry::close): Add new method.
588 (fhandler_process::p): Remove member.
589 * fhandler_proc.cc (fhandler_proc::open): Add set_nohandle after
590 calling superclass method. Check return value of fill_filebuf.
591 (fhandler_proc::fill_filebuf): Change return type to bool. Add return
592 statement.
593 * fhandler_process.cc (fhandler_process::open): Add set_nohandle after
594 calling superclass method. Remove references to p. Check return value
595 of fill_filebuf.
596 (fhandler_process::fill_filebuf): Change return type to bool. Don't
597 use dereference operator on p. Add return statement.
598 (fhandler_process::format_process_stat): Fix typo.
599 * fhandler_registry.cc: Add static open_key declaration.
600 (fhandler_registry::exists): Assume path is already normalised. Try
601 opening the path as a key in its own right first, before reverting to
602 enumerating subkeys and values of the parent key.
603 (fhandler_registry::fstat): Add additional code to return more relevant
604 information about the registry key/value.
605 (fhandler_registry::readdir): Explicitly set desired access when
606 opening registry key. Remove output of buf from debug_printf format
607 string.
608 (fhandler_registry::open): Use set_io_handle to store registry key
609 handle. Set value_name member. Move code to read a value from the
610 registry to fill_filebuf. Add call to fill_filebuf.
611 (fhandler_registry::close): New method.
612 (fhandler_registry::fill_filebuf): Change return type to bool. Add
613 code to read a value from registry.
614 (fhandler_registry::open_key): Make function static. Use KEY_READ as
615 desired access unless this is the last path component. Check the
616 return value of RegOpenKeyEx for an error instead of hKey.
617 * fhandler_virtual.cc (fhandler_virtual::lseek): Check the return value
618 of fill_filebuf.
619 (fhandler_virtual::open): Remove call to set_nohandle.
620 (fhandler_virtual::fill_filebuf): Change return type to bool. Add
621 return statement.
622 * security.cc (get_nt_object_attribute): New function.
623 (get_object_attribute): New function.
624 * security.h (get_object_attribute): New function declaration.
625
6262002-07-01 Pierre Humblet <pierre.humblet@ieee.org>
96edd0a9
CF
627
628 * syscalls.c (seteuid32): Do not return an error when the token cannot
629 be created only because of a problem with the gid.
630
1bc9effd
CF
6312002-07-01 Christopher Faylor <cgf@redhat.com>
632
633 * fhandler_clipboard.c (fhandler_dev_clipboard::open): Force text mode.
634 * fhandler_console.cc (fhandler_console::open): *Really* force binary
635 mode rather than make it optional.
636 * fhandler_proc.cc (fhandler_proc::open): Ditto.
637 * fhandler_process.cc (fhandler_process::open): Ditto.
638 * fhandler_random.cc (fhandler_dev_random::fhandler_dev_random): Ditto.
639 * fhandler_raw.cc (fhandler_dev_raw::open): Ditto.
640 * fhandler_registry.cc (fhandler_registry::open): Ditto.
641 * fhandler_tty.cc (fhandler_tty_slave::open): Ditto.
642 * fhandler_virtual.cc (fhandler_virtual::open): Ditto.
643 * fhandler_windows.cc (fhandler_windows::open): Ditto.
644 * fhandler_zero.cc (fhandler_dev_zero::open): Ditto.
645 * net.cc (fdsock): Ditto.
646 * path.cc (set_flags): Add more debugging.
647
b5e1ec76
CF
6482002-07-01 Christopher Faylor <cgf@redhat.com>
649
650 * debug.cc (threads): Avoid initialization.
651 * uinfo.cc (cygheap_user::ontherange): (from Corinna Vinschen) Actually
652 make below changes work.
653
db57a363
CF
6542002-07-01 Christopher Faylor <cgf@redhat.com>
655
656 * uinfo.cc (cygheap_user::ontherange): Make cygwin root the last resort
657 for HOMEPATH/HOMEDRIVE for consistency with HOME.
658
73d97618
CV
6592002-07-01 Corinna Vinschen <corinna@vinschen.de>
660
661 * shared.cc (sec_none): Move to sec_helper.cc.
662 (sec_none_nih): Ditto.
663 (sec_all): Ditto.
664 (sec_all_nih): Ditto.
665 (get_null_sd): Ditto.
666 (sec_acl): Ditto.
667 (__sec_user): Ditto.
668 * sec_helper.cc (sec_none): Move from shared.cc to here.
669 (sec_none_nih): Ditto.
670 (sec_all): Ditto.
671 (sec_all_nih): Ditto.
672 (get_null_sd): Ditto.
673 (sec_acl): Ditto.
674 (__sec_user): Ditto.
675
8297bda0
CF
6762002-06-30 Christopher Faylor <cgf@redhat.com>
677
678 * uinfo.cc (cygheap_user::ontherange): Potentially set HOME from
679 existing homepath and homedrive cygheap_user fields (not currently used
680 yet). Set HOME to / if no other alternative.
681 (cygheap_user::test_uid): Simplify.
682
8a2ce995
CF
6832002-06-30 Christopher Faylor <cgf@redhat.com>
684
685 * environ.cc (parse_options): Use setenv to potentially replace CYGWIN
686 value on export. Fixes broken behavior since November 2000 changes.
687 (regopt): Return indication of whether or not something has been parsed
688 from the registry.
689 (environ_init): Only attempt to export CYGWIN variable when values were
690 set from the registry. It is exported automatically otherwise.
691
fdf0b5de
CF
6922002-06-30 Christopher Faylor <cgf@redhat.com>
693
694 * fhandler.h (fhandler_process::pid): New field.
695 (fhandler_process::fstat): Remove unneeded array. Set pid element.
696 (fhandler_process::open): Ditto.
697 (fhandler_process::fill_filebuf): Handle case where 'p' field is NULL.
698
ccacec81
CF
6992002-06-30 Christopher Faylor <cgf@redhat.com>
700
701 * fhandler.h (fhandler_process::p): New field.
702 (fhandler_process:fill_filebuf): Revert to same definition as virtual
703 in parent class.
704 (fhandler_process::open): Fill out p field rather than passing as an
705 argument.
706 (fhandler_process::fill_filebuf): Use p pointer rather than argument.
707
fad1c3a8 7082002-06-29 Pierre Humblet <pierre.humblet@ieee.org>
c6d90e84
CV
709
710 * security.cc (extract_nt_dom_user): Check for all buffer overflows.
711 Call LookupAccountSid after trying to get domain & user from passwd.
712 (get_group_sidlist): Obtain the domain and user by calling
713 extract_nt_dom_user instead of LookupAccountSid.
714
839b2942
CF
7152002-06-29 Christopher Faylor <cgf@redhat.com>
716
717 * uinfo.cc (cygheap_user::test_uid): Use standard issetuid test.
718
efc1575e
CF
7192002-06-29 Christopher Faylor <cgf@redhat.com>
720
721 * autoload.cc (NetGetDCName): Change to make this an optional load
722 function.
723 * cygheap.h (cygheap_user::logsrv): Return NULL when operation fails.
724 (cygheap_user::winname): Ditto.
725 (cygheap_user::domain): Ditto.
726 * uinfo.cc (cygheap_user::env_logsrv): Save results in temp variable.
727 (cygheap_user::env_userprofile): Ditto.
728
638180f5
CF
7292002-06-29 Christopher Faylor <cgf@redhat.com>
730
731 * environ.cc (spenv::retrieve): Detect return of env_dontadd from
732 cygheap_user methods.
733 (build_env): Avoid incrementing environment pointer if not actually
734 adding to the environment. That could result in garbage in the
735 environment table. Be more defensive when reallocing envblock.
736
38bc1196
CF
7372002-06-29 Christopher Faylor <cgf@redhat.com>
738
739 * uinfo.cc (cygheap_user::test_uid): Return NULL or further tests are
740 sorta useless.
741 (cygheap_user::env_domain): Recalculate if name is missing.
742
664075a3
CF
7432002-06-29 Christopher Faylor <cgf@redhat.com>
744
745 * environ.cc (spenv::from_cygheap): Still need to take setuid into
746 consideration.
747
e97962b9
CF
7482002-06-28 Christopher Faylor <cgf@redhat.com>
749
750 * uinfo.cc (cygheap_user::env_logsrv): Return "almost_null" in case
751 where no domain or username is "SYSTEM".
752
094d5193
CF
7532002-06-28 Christopher Faylor <cgf@redhat.com>
754
755 * cygheap.h (cygheap_user): Reorg to accommodate environment caching.
756 (cygheap_user::logsrv): New method.
757 (cygheap_user::winname): Ditto.
758 (cygheap_user::domain): Ditto.
759 (cygheap_user::test_uid): Ditto.
760 * cygheap.cc (cygheap_user::set_name): Reflect name "pwinname" name
761 change.
762 * environ.cc (getwinenveq): New function.
664075a3 763 (penv::from_cygheap): penv::from_cygheap): Change arguments.
094d5193
CF
764 (spenv::retrieve): Ditto for call. Use getwinenveq to retrieve info
765 from environment. Always return value from cygwin environment, if it
766 exists.
767 * environ.h (getwinenveq): Declare.
768 * uinfo.cc (cygheap_user::ontherange): Use logsrv() rather than
769 env_logsrv().
770 (cygheap_user::test_uid): Define new method.
771 (cygheap_user::env_logsrv): Accept environment arguments. Use test_uid
772 to find info.
773 (cygheap_user::env_domain): Ditto.
774 (cygheap_user::env_userprofile): Ditto.
775 (cygheap_user::env_homepath): Ditto.
776 (cygheap_user::env_homedrive): Ditto.
777 (cygheap_user::env_name): Ditto.
778
179cae11
CF
7792002-06-27 Christopher Faylor <cgf@redhat.com>
780
781 * cygheap.cc (cfree_and_set): New function.
782 (cygheap_user::set_name): Use cfree_and_set to reset members.
783 * cygheap.h (cygheap_user): Delete static members.
784 (cygheap_user::puserprof): New member.
785 (cfree_and_set): Declare.
786 * dcrt0.cc (almost_null): Define.
bf75aae8 787 * environ.cc (env_dontadd): Redefine as "almost_null".
179cae11
CF
788 * winsup.h (almost_null): Declare.
789 * syscalls.cc (cfree_and_set): Remove unused variable.
790 * uinfo.cc (cygheap_user::homepath_env_buf): Eliminate.
791 (cygheap_user::homedrive_env_buf): Ditto.
792 (cygheap_user::userprofile_env_buf): Ditto.
793 (cygheap_user::ontherange): YA change to try to preserve existing
794 HOMEPATH and HOMEDRIVE. Return almost_null values when variables
795 should not actually exist.
796 (cygheap_user::env_logsrv): Ditto.
797 (cygheap_user::env_domain): Ditto.
798 (cygheap_user::env_userprofile): Ditto.
799
eba23038
CV
8002002-06-27 Corinna Vinschen <corinna@vinschen.de>
801
802 * dcrt0.cc (dll_crt0_1): Let __progname point to the applications
803 basename. Move eliminating ".exe" suffix from argv[0] so that it
804 always also affects __progname.
805
196cdd45
CF
8062002-06-27 Thomas Pfaff <tpfaff@gmx.net>
807
808 * thread.cc (pthread::create): Added trace printf to get CreateThread
809 LastError.
810
5b509758
CV
8112002-06-27 Corinna Vinschen <corinna@vinschen.de>
812
813 * mmap.cc (list::match): Check using pagesize aligned size.
814
75c6a983
CF
8152002-06-26 Christopher Faylor <cgf@redhat.com>
816
817 * fhandler_disk_file.cc (fhandler_disk_file::fstat_by_name): Force
818 FindFirstFile on first file of directory when asking for x:\ .
819
b3e2d035
CF
8202002-06-26 Christopher Faylor <cgf@redhat.com>
821
822 * cygheap.cc (cygheap_user::set_name): Correct thinko in below change.
823
c99902b9
CF
8242002-06-26 Christopher Faylor <cgf@redhat.com>
825
826 * cygheap.cc (cygheap_user::set_name): Avoid clearing things when just
827 setting name to itself or during first time initialization.
828
829 * environ.cc (check_case_init): Make case insensitive.
830
be5007aa
CV
8312002-06-26 Corinna Vinschen <corinna@vinschen.de>
832
833 * fhandler.h (fhandler_socket::bind): Add method definition.
834 (fhandler_socket::connect): Ditto.
835 (fhandler_socket::listen): Ditto.
836 (fhandler_socket::accept): Ditto.
837 (fhandler_socket::getsockname): Ditto.
838 (fhandler_socket::getpeername): Ditto.
839 (fhandler_socket::recvfrom): Ditto.
840 (fhandler_socket::recvmsg): Ditto.
841 (fhandler_socket::sendto): Ditto.
842 (fhandler_socket::sendmsg): Ditto.
843 (fhandler_socket::shutdown): Ditto.
844 * fhandler_socket.cc (get_inet_addr): Move here from net.cc.
845 (fhandler_socket::bind): New method.
846 (fhandler_socket::connect): Ditto.
847 (fhandler_socket::listen): Ditto.
848 (fhandler_socket::accept): Ditto.
849 (fhandler_socket::getsockname): Ditto.
850 (fhandler_socket::getpeername): Ditto.
851 (fhandler_socket::recvfrom): Ditto.
852 (fhandler_socket::recvmsg): Ditto.
853 (fhandler_socket::sendto): Ditto.
854 (fhandler_socket::sendmsg): Ditto.
855 (fhandler_socket::shutdown): Ditto.
856 * net.cc: Various formatting cleanups throughout.
857 (get_inet_addr): Move to fhandler_socket.cc.
858 (cygwin_bind): Move base functionality to appropriate fhandler_socket
859 method.
860 (cygwin_connect): Ditto.
861 (cygwin_listen): Ditto.
862 (cygwin_accept): Ditto.
863 (cygwin_getsockname): Ditto.
864 (cygwin_getpeername): Ditto.
865 (cygwin_recvfrom): Ditto.
866 (cygwin_recvmsg): Ditto.
867 (cygwin_sendto): Ditto.
868 (cygwin_sendmsg): Ditto.
869 (cygwin_shutdown): Ditto.
870
303af157
CV
8712002-06-26 Corinna Vinschen <corinna@vinschen.de>
872
873 * pwdgrp.h (pwdgrp_read::~pwdgrp_read): Avoid compiler warning.
874
8698edb8
CF
8752002-06-26 Christopher Faylor <cgf@redhat.com>
876
877 * dcrt0.cc (_dcrt0): Be more defensive when reserved block is used and
878 it's not cygwin info.
879
f279e522
CF
8802002-06-26 Christopher Faylor <cgf@redhat.com>
881
882 * autoload (noload): Avoid clobbering bx register.
883
884 * environ.cc (codepage_init): Use case insensitive match.
885
886 * fhandler_console.cc (cp_get_internal): Delete.
887 (con_to_str): Use get_cp to derive code page.
888 (str_to_con): Ditto.
889 * miscfuncs.cc (get_cp): New function.
890 (sys_wcstombs): New function. Converted from macro.
891 (sys_mbstowcs): Ditto.
892 * winsup.h: Reflect above changes.
893
109e4822
CF
8942002-06-26 Christopher Faylor <cgf@redhat.com>
895
896 * winsup.h: Minor cleanup.
897 * path.h (path_conv::[]): New operator.
898 * syscalls.cc (_link): Use path_conv operators rather than methods,
899 where appropriate. Minor white space cleanup.
900
9012002-06-26 Christopher Faylor <cgf@redhat.com>
902
903 * include/cygwin/version.h: Bump DLL minor number.
904
a635af7c
CF
9052002-06-25 Thomas Pfaff <tpfaff@gmx.net>
906
c6ed5790 907 * include/pthread.h (PTHREAD_CANCELED): Defined a reasonable value.
a635af7c
CF
908 * pthread.cc (pthread_exit): Call method instead of function.
909 (pthread_setcancelstate): Ditto.
910 (pthread_setcanceltype): Ditto.
911 (pthread_testcancel): Ditto.
912 * thread.h (pthread::cancel_event): New member.
c6ed5790 913 (__pthread_cancel_self): New prototype.
a635af7c
CF
914 (pthread::exit): New Method.
915 (pthread::cancel): Ditto.
916 (pthread::testcancel): Ditto.
917 (pthread::cancel_self): Ditto.
918 (pthread::static_cancel_self): Ditto.
919 (pthread::setcancelstate): Ditto.
920 (pthread::setcanceltype): Ditto.
921 (__pthread_cancel): Give c++ linkage.
922 (__pthread_exit): Remove.
923 (__pthread_setcancelstate): Ditto.
924 (__pthread_setcanceltype): Ditto.
925 (__pthread_testcancel): Ditto.
c6ed5790 926 * thread.cc (pthread::pthread): Inititialize cancel_event.
a635af7c
CF
927 (pthread::~pthread): Close cancel_event if needed.
928 (pthread::create): Create cancel_event.
c6ed5790 929 (pthread::exit): New method. Replacement for __pthread_exit.
a635af7c
CF
930 (pthread::cancel): New method.
931 (pthread::testcancel): Ditto.
932 (pthread::static_cancel_self); New static method.
c6ed5790 933 (pthread::setcancelstate): New method. Replacement for
a635af7c 934 __pthread_setcancelstate.
c6ed5790 935 (pthread::setcanceltype): New method. Replacement for
a635af7c
CF
936 __pthread_setcanceltype.
937 (pthread::pop_cleanup_handler): Added lock for async cancel safe
938 cancellation.
939 (pthread::thread_init_wrapper): Change __pthread_exit to
940 thread->exit().
941 (__pthread_cancel): Call method thread->cancel().
942 (__pthread_exit): Remove.
943 (__pthread_setcancelstate): Ditto.
944 (__pthread_setcanceltype): Ditto.
945 (__pthread_testcancel): Ditto.
946
109e4822
CF
9472002-06-25 Christopher Faylor <cgf@redhat.com>
948
949 * dcrt0.cc (sm): Make NO_COPY.
950
6331b658
CV
9512002-06-25 Corinna Vinschen <corinna@vinschen.de>
952
953 * syscalls.cc (chown): Convert uid to 32 bit.
954 (lchown): Ditto.
955 (fchown): Ditto.
956
e773b7cf
CF
9572002-06-24 Christopher Faylor <cgf@redhat.com>
958
959 * dtable.cc (dtable::find_unused_handle): Avoid coercion.
960
4c78be52
CF
9612002-06-24 Christopher Faylor <cgf@redhat.com>
962
963 * dtable.cc (fhandler_base::dup2): Cleanup. Ensure that lock is turned
964 off in error condition.
965
1fd072b6
CV
9662002-06-24 Corinna Vinschen <corinna@vinschen.de>
967
968 * uinfo.cc (internal_getlogin): Set myself->uid and myself->gid instead
969 of user.real_uid and user.real_gid.
970 (uinfo_init): Evaluate orig_uid and real_uid from myself->uid. Ditto
971 for gid.
972
de0557f7
CF
9732002-06-23 Pierre Humblet <pierre.humblet@ieee.org>
974
975 * security.cc (get_group_sidlist): Add pw argument and use pw->pw_name
976 in call to get_supplementary_group_sidlist.
977 (create_token): Add pw argument and use it in call to
978 get_group_sidlist.
979 * security.h: Add pw argument in declaration of create_token.
980 * syscalls.cc (seteuid32): Add pw argument in call to create_token.
981
035bfbdd
CF
9822002-06-23 Conrad Scott <conrad.scott@dsl.pipex.com>
983
984 * fhandler.cc (fhandler_base::fstat): Set S_IFIFO for pipes.
985 * fhandler_socket.cc (fhandler_socket.cc::fstat): Set S_IFSOCK.
986
eecef29f
CF
9872002-06-23 Christopher Faylor <cgf@redhat.com>
988
989 * lib/_cygwin_S_IEXEC.cc: Remove obsolete file.
990
85b995d4
CF
9912002-06-23 Christopher Faylor <cgf@redhat.com>
992
993 Use cygwin_{shm,ipc}.h instead of /sys/{shm,ipc}.h throughout.
994 * sys/ipc.h: Remove.
995 * sys/shm.h: Remove.
996 * cygwin_ipc.h: New file.
997 * cygwin_shm.h: New file.
998
6bda8def
CF
9992002-06-23 Christopher Faylor <cgf@redhat.com>
1000
1001 * cygwin.sc: Add recent changes from ld sources.
1002
10032002-06-23 Conrad Scott <conrad.scott@dsl.pipex.com>
1004
1005 * winsup.h: Move #ifdef EXPCGF code into "winbase.h".
1006 * winbase.h: #ifdef EXPCGF code moved here from "winsup.h".
1007
f6709c07
RC
10082002-06-12 Thomas Pfaff <tpfaff@gmx.net>
1009
1010 * thread.h (pthread::cleanup_stack): Renamed cleanup_handlers to
1011 cleanup_stack.
1012 * thread.cc (pthread::pthread): Ditto.
1013 (pthread::create): Fixed mutex verification.
1014 (pthread::push_cleanup_handler): Renamed cleanup_handlers to
1015 cleanup_stack.
1016 Mutex calls removed, used InterlockedExchangePointer instead.
1017 (pthread::pop_cleanup_handler): Renamed cleanup_handlers to
1018 cleanup_stack.
1019 (pthread::pop_all_cleanup_handlers): Ditto.
1020 (__pthread_once): Check state first and return if already done.
1021 (__pthread_join): DEADLOCK test reverted to __pthread_equal
1022 call.
1023 (__pthread_detach): Unlock mutex before deletion.
1024
0278e3a3
CF
10252002-06-21 Christopher Faylor <cgf@redhat.com>
1026
1027 * Makefile.in (cygrun.exe): Move -lgcc where it will do some good.
1028
1a7cb557
CV
10292002-06-21 Corinna Vinschen <corinna@vinschen.de>
1030
1031 * syscalls.cc (stat64_to_stat32): Correctly evaluate st_rdev.
1032 (fstat64): Set st_rdev to same value as st_dev.
1033 (stat_worker): Ditto.
1034
49056987
CV
10352002-06-21 Corinna Vinschen <corinna@vinschen.de>
1036
1037 * security.cc (alloc_sd): Carefully check owner_sid again after trying
1038 SIDs from cygheap.
1039
dd0208eb
CV
10402002-06-21 Corinna Vinschen <corinna@vinschen.de>
1041
1042 * security.cc (alloc_sd): Remove unnecessary retrieval of owner name.
1043 Check uid for current user first and use SIDs from cygheap if so.
1044 Set errno to EINVAL if user SID isn't retrievable. Just print user SID
1045 as debug output.
1046 Don't bail out if group SID isn't retrievable. Change debug output
1047 appropriately.
1048
d7c2bd8e
CF
10492002-06-21 Christopher Faylor <cgf@redhat.com>
1050
1051 * errno.cc: Change text description for EBADF throughout.
1052
7c02f861
CF
10532002-06-20 Pierre Humblet <pierre.humblet@ieee.org>
1054
1055 * uinfo.cc (cygheap_user::ontherange): Use env_name for NetUserGetInfo.
1056 (cygheap_user::env_logsrv): Verify env_domain is valid.
1057 * environ.cc: Include child_info.h and keep spenvs[] sorted.
1058 (environ_init): Check child_proc_info instead of myself->ppid_handle.
1059
c25ebbaf
CF
10602002-06-19 Christopher Faylor <cgf@redhat.com>
1061
1062 * fhandler.cc (fhandler_base::set_flags): Change priority of "linked
1063 in" default binmode setting so that it has priority over optional
1064 setting.
1065
03a2ce9a
CF
10662002-06-19 Christopher Faylor <cgf@redhat.com>
1067
d70b993f 1068 Use hMainProc where appropriate, throughout.
03a2ce9a
CF
1069 * environ.cc (spenv::retrieve): Add debugging statements.
1070
1071 * pinfo.cc (set_myself): Don't call strace.hello if already stracing.
1072 * strace.cc (strace): Move NO_COPY keyword so that it will actually
1073 take effect.
1074
834224ab
CV
10752002-06-19 Corinna Vinschen <corinna@vinschen.de>
1076
1077 * uinfo.cc (cygheap_user::ontherange): Call NetUserGetInfo() only with
1078 non-NULL logserver parameter.
1079
e40670ee
CF
10802002-06-16 Christopher Faylor <cgf@redhat.com>
1081
1082 * cygheap.h (cygheap_user::issetuid): New method.
1083 * dtable.cc (dtable::vfork_child_dup): Use new method to determine if
1084 we are in "setuid mode."
1085 * fork.cc (fork_parent): Ditto.
1086 * spawn.cc (spawn_guts): Ditto.
1087 * syscalls.cc (seteuid32): Ditto.
1088 (setegid32): Ditto.
1089 * environ.cc (spenv::retrieve): (Suggested by Pierre Humblet) Do
1090 potential recalculation of cygheap_user stuff when in setuid mode.
00a9e8a0
CF
1091 Return special value when environment variable should be calculated but
1092 not added.
e40670ee
CF
1093 (build_env): Don't add retrieved value to dstp if it is 'dont_add'.
1094
a05a9e01
CF
10952002-06-16 Christopher Faylor <cgf@redhat.com>
1096
1097 Changes suggested by Pierre Humblet.
1098 * environ.cc (NL): New macro.
1099 (conv_envvars): Use NL macro to fill in name and namelen.
1100 (spenv::namelen): New field.
1101 (spenvs): Use NL to fill in name and namelen.
1102 (spenv::retrieve): Eliminate length argument. Instead, use namelen
1103 throughout.
1104 (build_env): Don't calculate length of initial FOO= part of
1105 environment. Accommodate spenv::retrive argument change.
1106
5f25e1d1
CF
11072002-06-16 Christopher Faylor <cgf@redhat.com>
1108
1109 * cygheap.h (cygheap_user::winname): New field.
1110 * cygheap.cc (cygheap_user::set_name): Clear winname when name changes.
1111 * uinfo.cc (cygheap_user::env_logsrv): Avoid calculating server when
1112 Windows user == SYSTEM.
1113 (cygheap_user::env_domain): Set winname here too.
1114 (cygheap_user::env_userprofile): Eliminate superfluous tests.
1115 (cygheap_user::env_name): Seed winname by calling env_domain().
1116
5c8bce24
CF
11172002-06-12 Pierre Humblet <pierre.humblet@ieee.org>
1118
1119 * spawn.cc (spawn_guts): Revert removal of ciresrv.moreinfo->uid =
1120 ILLEGAL_UID.
1121
6ea3e429
CF
11222002-06-15 Christopher Faylor <cgf@redhat.com>
1123
1124 * child_info.h (child_proc_info): Declare as base class.
1125 (spawn_info): Declare as alias of child_proc_info to aid debugging.
1126 (fork_info): Ditto.
1127 * cygheap.cc (cygheap_fixup_in_child): Use child_proc_info global
1128 rather than parameter.
1129 * cygheap.h (cygheap_fixup_in_child): Reflect above change in
1130 declaration.
1131 * dcrt0.cc (_dll_crt0): Move 'si' definition here. Assign
1132 child_proc_info.
1133 (dll_crt0_1): Accommodate cygheap_fixup_in_child and *_info changes.
1134 * environ.cc (spenv::retrieve): Make regparm.
1135 * environ.h (environ_init): Ditto.
1136 (win_env::add_cache): Ditto.
1137 (build_env): Ditto.
1138 (getwinenv): Ditto.
1139 * fork.cc (sync_with_parent): Use fork_info global.
1140 (fork_child): Ditto.
1141
cff111a6
CF
11422002-06-14 Christopher Faylor <cgf@redhat.com>
1143
1144 * uinfo.cc (cygheap_user::ontherange): Don't set HOMEDRIVE or HOMEPATH
1145 unless one or the other is specified.
1146
6d171b44
CF
11472002-06-14 Christopher Faylor <cgf@redhat.com>
1148
1149 * cygheap.h (cygheap_user::userprofile_env_buf): New static member.
1150 * environ.cc (build_env): Add debugging statement.
1151 (spenvs): Switch functions for USERDOMAIN and USERNAME.
1152 * spawn.cc (spawn_guts): Move environment initialization prior to
1153 cygheap_setup_for_child or environment info will never be copied to
1154 child.
1155
a77d35f7
CF
11562002-06-14 Christopher Faylor <cgf@redhat.com>
1157
1158 * cygheap.h (cygheap_user): Add static members to hold home{drive,path}
1159 info.
1160 * uinfo.cc (cygheap_user::ontherange): Use static class members for
1161 local HOME* storage.
1162
9a771b29
CF
11632002-06-14 Christopher Faylor <cgf@redhat.com>
1164
1165 * cygheap.cc (cygheap_user::set_logsrv): Remove.
1166 (cygheap_user::set_domain): Ditto.
1167 * cygheap.h (cygheap_user::set_logsrv): Remove declaration.
1168 (cygheap_user::set_domain): Ditto.
1169 (cygheap_user::env_domain): Declare new method.
1170 (cygheap_user::env_name): Ditto.
1171 * environ.cc (spenvs): Add two environment variables.
1172 * spawn.cc (spawn_guts): Call build_env after RevertToSelf. Always set
1173 ciresrv.mount_h.
1174 (cygheap_user::ontherange): Recalculate homedrive/homepath if they are
1175 empty. Use env_logsrv to get logon server.
1176 (cygheap_user::env_logsrv): Calculate server name here rather than
1177 relying on it having been previously calculated.
1178 (cygheap_user::env_domain): Ditto for domain name.
1179 (cygheap-user::env_name): New method.
1180
11812002-06-12 Pierre Humblet <pierre.humblet@ieee.org>
1182
1183 * syscalls.cc (seteuid32): Do not get or set the environment. Do not
1184 call LookupAccountSid nor internal_getlogin. Set cygheap->user name
1185 and sid from the passwd entry.
1186 * uinfo.cc (uinfo_init): Only call internal_getlogin when starting from
1187 a non Cygwin process and use the values returned in user.
1188 (internal_getlogin): Simplify to case where starting from a non Cygwin
1189 process. Store return values in user and return void. Do not set the
1190 Windows default environment.
1191 * dcrt0.cc (dll_crt0_1): Call uinfo_init only when needed. Do not set
1192 myself->uid nor reset user.sid.
1193 * spawn.cc (spawn_guts): Get the sid from cygheap->user. Always
1194 RevertToSelf(). Don't set uid in impersonated case.
1195 * cygheap.cc (cygheap_user::set_sid): Do not set orig_sig.
1196 (cygheap_user::set_orig_sid): New.
1197 * cygheap.h: Declare cygheap_user::set_sid.
1198 * winsup.h: Add argument to uinfo_init().
1199
470e8c46
CV
12002002-06-14 Corinna Vinschen <corinna@vinschen.de>
1201
1202 * environ.cc (build_env): If realloc moves envblock, move s with it.
1203
39be53dc
CF
12042002-06-13 Nicholas S. Wourms <nwourms@netscape.net>
1205
1206 * winver.rc: Add more words to copyright.
1207
0e6d80e4
CV
12082002-06-13 Corinna Vinschen <corinna@vinschen.de>
1209
1210 * cygheap.cc (cygheap_user::set_name): Revert previous change.
1211 * environ.cc (spenv::retrieve): Check return value of call to
1212 cygheap->user.*from_cygheap().
1213
5682a6dd
CV
12142002-06-13 Corinna Vinschen <corinna@vinschen.de>
1215
1216 * cygheap.cc (cygheap_user::set_name): Remove setting homedrive and
1217 homepath to NULL.
1218 (cygheap_user::set_logsrv): Fix free'ing of plogsrv.
1219 * cygheap.h (cygheap_user::cygheap_user): Initialize homedrive and
1220 homepath to NULL.
1221
5f74ae83
CF
12222002-06-13 Christopher Faylor <cgf@redhat.com>
1223
1224 * security.cc (get_logon_server): Use strcasematch rather than
1225 strcasecmp.
1226
4863867a
CF
12272002-06-12 Christopher Faylor <cgf@redhat.com>
1228
1229 * path.cc (chdir): Minor cleanup.
1230
12a2ef44
CF
12312002-06-12 Christopher Faylor <cgf@redhat.com>
1232
1233 * environ.cc (build_env): Correctly fill out windows environment block
1234 with win32 paths rather than posix paths.
1235
da086d02
CF
12362002-06-12 Christopher Faylor <cgf@redhat.com>
1237
1238 * cygheap.cc (cygheap_user::set_name): Set homedrive and homepath to
1239 NULL on user name change.
1240 (cygheap_user::set_logsrv): Allocate enough space for leading \\ so
1241 that we can put this in the environment, if needed.
1242 * cygheap.h (homebodies): New enum.
1243 (cygheap_user::homedrive): New field.
1244 (cygheap_user::homepath): Ditto.
1245 (cygheap_user::env_logsrv): New method.
1246 (cygheap_user::env_homepath): New method.
1247 (cygheap_user::env_homedrive): New method.
1248 (cygheap_user::env_userprofile): New method.
1249 (cygheap_user::ontherange): New method.
1250 * environ.cc (envsize): Eliminate debugging argument.
1251 (environ_init): Assume that envc counts number of elments not total
1252 size.
1253 (spenv): New class.
1254 (spenvs): New array, renamed from forced_winenv_vars, using spenv.
1255 (spenv::retrieve): New method.
1256 (build_env): Rename from 'winenv' -- one stop shopping for building new
1257 environment blocks for both windows and "unix".
1258 * environ.h (build_env: Declare.
1259 (winenv): Delete declaration.
1260 (envsize): Ditto.
1261 * spawn.cc (spawn_guts): Use build_env to build windows and cygwin
1262 environment blocks.
1263 * uinfo.cc (internal_getlogin): Eliminate environment manipulation.
1264 Default to info from GetUserName if it exists. Move HOMEPATH and
1265 HOMEDRIVE stuff elsewhere. Move HOME setting elsewhere. Only set HOME
1266 environment variable in processes that are not parented by a cygwin
1267 process.
1268 (cygheap_user::ontherange): Define new method.
1269 (cygheap_user::env_logsrv): Ditto.
1270 (cygheap_user::env_homepath): Ditto.
1271 (cygheap_user::env_homedrive): Ditto.
1272 (cygheap_user::env_userprofile): Ditto.
1273
077d8b23
CF
12742002-06-11 Christopher Faylor <cgf@redhat.com>
1275
1276 * spawn.cc (spawn_guts): More hToken removal cleanup.
1277
d5377829
CF
12782002-06-09 Pierre Humblet <pierre.humblet@ieee.org>
1279
1280 * spawn.cc (spawn_guts): Define sec_attribs and call sec_user_nih()
1281 only once.
1282
380aaf2d
CF
12832002-06-10 Christopher Faylor <cgf@redhat.com>
1284
1285 * Makefile.in: Ensure that -MD gets added to CFLAGS regardless of
1286 CFLAGS command-line setting.
1287
1288 * cygwin.din: Export sexec* functions as function which returns ENOSYS
1289 (i.e., sexec* is deprecated).
1290 * dtable.cc (dtable::vfork_child_dup): Ensure that impersonation is
1291 restored even on failure.
1292 * exec.cc: Throughout, remove references to sexec* and _spawnve.
1293 * pinfo.h: Remove _spawnve declaration.
1294 * spawn.cc: Rename _spawnve to spawnve and use throughout.
1295 (spawn_guts): Eliminate hToken argument and processing of same. Just
1296 perform special actions if impersonating.
1297 (spawnve): Rename from _spawnve.
1298
b01cbd5d
CF
12992002-06-10 Christopher Faylor <cgf@redhat.com>
1300
1301 * include/sys/strace.h (strace): Avoid use of constructor.
1302
fe4283af
CF
13032002-06-10 Christopher Faylor <cgf@redhat.com>
1304
1305 * dcrt0.cc (dll_crt0_1): Initialize wincap and check for sanity before
1306 running global ctors.
1307 * wincap.h (wincap): Eliminate constructor. Default is to zero memory,
1308 anyway.
1309 * wincap.cc (wincap): Copy this on fork to avoid initialization in
1310 forked processes.
1311
3d78e129
CV
13122002-06-10 Corinna Vinschen <corinna@vinschen.de>
1313
1314 * fhandler.h (fhandler_socket::fixup_after_fork): Revert patch from
1315 2002-06-04.
1316 * fhandler_socket.cc (fhandler_socket::fixup_after_fork): Ditto.
1317 (fhandler_socket::dup): Ditto.
1318 * net.cc (fdsock): Make sockets explicitely noninheritable on NT.
1319
c2102631
CF
13202002-06-09 Christopher Faylor <cgf@redhat.com>
1321
1322 * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Correctly
1323 set number of links for directory, if appropriate.
1324
43c3c4e3
RC
13252002-06-10 Robert Collins <rbtcollins@hotmail.com>
1326
1327 * thread.cc: Variation of a patch from Thomas Pffaf.
d70b993f 1328 (__pthread_detach): Cleanup thread object if the thread has terminated.
43c3c4e3
RC
1329 (__pthread_join): Change order of error checks, and lock against
1330 join/detach/exit races.
1331 (__pthread_exit): Lock object against join/detach/exit races.
1332 (pthread::thread_init_wrapper): Ditto.
1333 (thread_init_wrapper): Rename to pthread::thread_init_wrapper.
1334 (pthread::create): Check that the mutex initialized correctly.
1335 (pthread::push_cleanup_handler): Lock against potential cancellation
1336 race. NB: this may not be required if pthread_cleanup_push is non-
1337 cancelable.
1338 * thread.h (pthread::mutex): New member.
1339 (thread_init_wrapper): Rename to pthread::thread_init_wrapper.
1340 (pthread::thread_init_wrapper_: New static member.
1341
007276b3
RC
13422002-06-10 Robert Collins <rbtcollins@hotmail.com>
1343
1344 * cygwin.din: Add _pthread_cleanup_push and _pthread_cleanup_pop.
1345 * pthread.cc: Change __pthread_self to pthread::self() thruoghout.
1346 (_pthread_cleanup_push): New function.
1347 (_pthread_cleanup_pop): Ditto.
1348 * thread.cc: Thanks to Thomas Pfaff for the pthread cleanup_push,_pop
1349 patch, this work is derived from that.
1350 Change __pthread_self to pthread::self() thruoghout.
1351 (__pthread_self): Rename to pthread::self.
1352 (pthread::self): New method.
1353 (pthread::pthread): Initialize new member.
1354 (pthread::push_cleanup_handler): New method.
1355 (pthread::pop_cleanup_handler): New method.
1356 (pthread::pop_all_cleanup_handlers): New method.
1357 (__pthread_exit): Pop all cleanup handlers.
1358 * thread.h (pthread::push_cleanup_handler): Declare.
1359 (pthread::pop_cleanup_handler): Ditto.
1360 (pthread::pop_all_cleanup_handlers): Ditto.
1361 (pthread::self): New static method.
1362 (__pthread_exit): Give C++ linkage.
1363 (__pthread_join): Ditto.
1364 (__pthread_detach): Ditto.
1365 (__pthread_self): Remove.
1366
13672002-04-24 Thomas Pfaff <tpfaff@gmx.net>
1368
c2102631
CF
1369 * include/pthread.h (__pthread_cleanup_handler): New structure.
1370 (pthread_cleanup_push): Rewritten.
007276b3
RC
1371 (pthread_cleanup_pop): Ditto.
1372 (_pthread_cleanup_push): New prototype.
c2102631 1373 (_pthread_cleanup_pop): Ditto.
007276b3
RC
1374
13752002-04-24 Thomas Pfaff <tpfaff@gmx.net>
1376
1377 * thread.cc (thread_init_wrapper): Check if thread is already joined.
1378 (__pthread_join): Set joiner first.
1379 (__pthread_detach): Ditto.
1380
fec98ec9
RC
13812002-06-10 Robert Collins <rbtcollins@hotmail.com>
1382
1383 * cygserver_transport.cc (create_server_transport): Finish the split
1384 out of sockets code from transport_layer_base. Thanks to Nicholas
1385 Wourms and Conrad Scott for catching this.
1386
7ac66bdd
CF
13872002-06-08 Christopher Faylor <cgf@redhat.com>
1388
1389 * pinfo.cc (pinfo_dummy): Initialize to correct size.
1390
a004a5b8
CF
13912002-06-08 Christopher Faylor <cgf@redhat.com>
1392
1393 * path.cc: Change MOUNT_AUTO to MOUNT_CYGDRIVE throughout.
1394 * shared_info.h (CURR_MOUNT_MAGIC): Update.
1395
50484e8e
CF
13962002-06-08 Christopher Faylor <cgf@redhat.com>
1397
1398 * external.cc (cygwin_internal): Make v1 mount table access invalid.
1399 * path.cc (mount_info::init): Remove had_to_create_mount_areas initialization.
1400 (mount_info::from_registry): Remove v1 table import.
1401 (mount_info::read_v1_mounts): Eliminate.
1402 (mount_info::import_v1_mounts): Ditto.
1403 * shared_info.h (mount_info): Ditto for both of above.
1404 * sys/mount.h (MOUNT_DEVFS): New enum.
1405 (MOUNT_PROC): Ditto.
1406
2e2dcba3
CF
14072002-06-08 Christopher Faylor <cgf@redhat.com>
1408
1409 * include/wchar.h: Define __need_size_t.
1410
9cde3cf3
CF
14112002-06-07 Christopher Faylor <cgf@redhat.com>
1412
1413 * fhandler_socket.cc (fhandler_socket::fstat): Don't assume that socket
1414 is unix-domain socket.
1415
14162002-06-07 Christopher Faylor <cgf@redhat.com>
1417
1418 * times.cc (hires_ms::prime): Set init flag.
1419
14202002-06-07 Conrad Scott <conrad.scott@dsl.pipex.com>
1421
1422 * times.cc (hires_ms::prime): Adjust epoch of initime_us from 1601 to
1423 1970.
1424
9d0efbb3
CF
14252002-06-06 Christopher Faylor <cgf@redhat.com>
1426
1427 * autoload.cc (timeGetDevCaps): Define new autoload function.
1428 (timeGetTime): Ditto.
1429 (timeBeginPeriod): Ditto.
1430 (timeEndPeriod): Ditto.
1431 * hires.h (hires_base): New class. Renamed from hires.
1432 (hires_us): New class.
1433 (hires_ms): New class.
1434 * strace.cc (strace::microseconds): Use hires_us class.
1435 * times.cc (gettimeofday): Use hires-ms class.
1436 (hires_us::prime): Renamed from hires::prime.
1437 (hires_us::usecs): Renamed from hires:usecs.
1438 (hires_ms::prime): New method.
1439 (hires_ms::usecs): New method.
1440 (hires_ms::~hires_ms): New destructor.
1441
46b941fc
CF
14422002-06-06 Christopher Faylor <cgf@redhat.com>
1443
1444 * autoload.cc (noload): Correctly save argument count register.
1445
c4e6ff48
CV
14462002-06-05 Conrad Scott <conrad.scott@dsl.pipex.com>
1447
1448 * fhandler.cc (fhandler_base::fstat): Initialise tv_nsec member of
1449 st_atim, st_mtim, and st_ctim fields.
1450 * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Ditto.
1451 * fhandler_process.cc (fhandler_process::fstat): Ditto.
46b941fc
CF
1452 * glob.c (stat32_to_STAT): Copy across the whole st_atim, st_mtime, and
1453 st_ctim fields.
c4e6ff48
CV
1454 * syscalls.cc (stat64_to_stat32): Ditto.
1455 * times.cc (to_timestruc_t): New function.
1456 (time_as_timestruc_t): New function.
1457 * winsup.h: Add to_timestruc_t and time_as_timestruc_t functions.
46b941fc
CF
1458 * include/cygwin/stat.h: Replace time_t with timestruc_t throughout for
1459 all file times, removing the st_spare1, st_spare2, and st_spare3 fields
1460 in the process. Add macros to access tv_sec fields by old names.
1461 * include/cygwin/types.h: Typedef timespec_t and timestruc_t as struct
1462 timespec.
c4e6ff48 1463
2e8abfc1
CV
14642002-06-03 Pierre Humblet <pierre.humblet@ieee.org>
1465
1466 * sec_helper.cc (lookup_name): Suppress.
1467 * security.cc (alloc_sd): Remove logsrv argument.
1468 Remove two calls to lookup_name.
1469 (set_security_attribute): Remove logsrv argument.
1470 Remove logsrv argument in call to alloc_sd.
1471 (set_nt_attribute): Remove logsrv argument.
1472 Remove logsrv argument in call to set_security_attribute.
1473 (set_file_attribute): Remove logsrv argument.
1474 Remove logsrv argument in call to set_nt_attribute.
1475 (set_file_attribute): Remove logsrv argument.
1476 Remove logsrv argument in call to set_file_attribute.
1477 * syscalls.cc (chown_worker): Remove logserver argument in
1478 call to set_file_attribute.
1479 (chmod): Ditto.
1480 * shm.cc (shmget): Remove logsrv argument in call to alloc_sd.
1481 * uinfo.cc (internal_getlogin): Replace calls to
1482 lookup_name by call to LookupAccountName.
1483 * security.h: Remove logsrv in declarations of set_file_attribute
1484 and alloc_sd. Remove declaration of lookup_name.
1485
f7a7cc90
CF
14862002-06-05 Christopher Faylor <cgf@redhat.com>
1487
1488 * child_info.h (CHILD_INFO_MAGIC): Oops. Revert previous change. gcc
1489 3.1 bug?
1490
784e340c
CF
14912002-06-05 Christopher Faylor <cgf@redhat.com>
1492
1493 * child_info.h (CHILD_INFO_MAGIC): Update.
1494
58fcd93a
CF
14952002-06-05 Christopher Faylor <cgf@redhat.com>
1496
1497 * strace.cc (strace::hello): Set inited, when appropriate.
1498
ee964e2f
CF
14992002-06-05 Christopher Faylor <cgf@redhat.com>
1500
1501 * cygwin.din: Eliminate some newlib wrappers.
1502 * path.cc (get_devn): Only consider first 99 potential com devices.
1503 (get_device_number): Ditto.
1504 * times.cc (_times): Eliminate.
1505 (_times): Renamed from times().
1506
ea4e6ec8
CF
15072002-06-05 Christopher Faylor <cgf@redhat.com>
1508
1509 * dir.cc (rmdir): Streamline. Detect attempts to remove directories
1510 from "read-only" virtual devices. (Suggested by Pavel Tsekov)
46b941fc
CF
1511 * syscalls.cc (unlink): Detect attempts to remove directories from
1512 "read-only" virtual devices. (From Pavel Tsekov)
ea4e6ec8 1513
2bb6b3e5
CF
15142002-06-05 Christopher Faylor <cgf@redhat.com>
1515
1516 * dtable.cc (handle_to_fn): Check error return value from NtQueryObject
1517 first before seeing if name buffer is NULL.
1518
1519 * grp.cc (read_etc_group): Fix gcc warning regarding snprintf format.
1520 * passwd.cc (read_etc_passwd): Ditto.
1521
e9259cb2
RC
15222002-04-18 Thomas Pfaff <tpfaff@gmx.net>
1523
1524 * thread.h (pthread::joiner): New member.
1525 * thread.cc (pthread::pthread): Initialize joiner to NULL
1526 (pthread::create): Increment of thread counter moved from
1527 __pthread_create to this location.
1528 (__pthread_create): Increment thread counter removed.
1529 (thread_init_wrapper): Set joiner to self when thread was created
1530 detached.
1531 (__pthread_exit): delete thread when it is detached and not
1532 joined.
1533 (__pthread_join): Check for deadlock and delete thread when it has
1534 terminated.
1535 (__pthread_detach): Set joiner to self when thread state
1536 changed to detached.
1537
eceee297
CV
15382002-06-05 Corinna Vinschen <corinna@vinschen.de>
1539
1540 * grp.cc (read_etc_group): When emulating nonexisting group file on
1541 NT systems, read primary group SID from process token. Use that info
1542 to create correct group entry. On error or on 9x systems fallback
1543 to emulating Administrators group as before.
ae1ebb81 1544 * passwd.cc (read_etc_passwd): When emulating nonexisting passwd file
46b941fc 1545 on NT systems, read user and primary group SID from process token.
ae1ebb81
CV
1546 Use that info to create correct passwd entry. On error or on 9x
1547 systems fallback to emulating user with Administrator user id and
1548 Administrators group as before.
eceee297 1549
38f39368
CV
15502002-06-05 Corinna Vinschen <corinna@vinschen.de>
1551
1552 * grp.cc (etc_group): Removed.
1553 (parse_grp): Make line parameter nonconst. Don't copy data into new
1554 allocated memory. Check for CR instead of LF to accomodate new
1555 read method.
1556 (add_grp_line): Make line parameter nonconst.
1557 (read_etc_group): Rearrange using new pwdgrp_read class.
1558 * passwd.cc (parse_pwd): Don't copy data into new allocated memory.
1559 Check for CR instead of LF to accomodate new read method.
1560 (read_etc_passwd): Rearrange using new pwdgrp_read class.
1561 * pwdgrp.h (pwdgrp_check::set_last_modified): Use different
1562 parameters.
1563 (class pwdgrp_read): New class for opening and reading passwd and
1564 group files.
1565
ce006ffa
CF
15662002-06-04 Christopher Faylor <cgf@redhat.com>
1567
1568 * dtable.cc (handle_to_fn): Attempt to handle "raw" accesses to remote
1569 shares.
1570 * path.cc (mount_info::conv_to_win32_path): Set flags to binary when
1571 mount entry is not found.
1572 (mount_info::set_flags_from_win32_path): Ditto.
1573
147d2ab4
CF
15742002-06-04 Christopher Faylor <cgf@redhat.com>
1575
1576 * dtable.cc (handle_to_fn): Correct placement and length of name
ea4e6ec8 1577 buffer. (Suggested by Pavel Tsekov)
147d2ab4 1578
e35f391f
CF
15792002-06-04 Christopher Faylor <cgf@redhat.com>
1580
1581 Remove fcntl.h includes throughout.
1582 * fhandler.h: Move fcntl.h include here.
1583 (fhandler_base::set_flags): Accept supplied_bin argument. Make
1584 non-inlined.
1585 * dtable.cc (dtable::init_std_file_from_handle): Just use binmode from
1586 pc.
1587 (reset_to_open_binmode): Use set_flags.
1588 * cygwin.din (open): Avoid newlib wrapper.
1589 (read): Ditto.
1590 (unlink): Ditto.
1591 (write): Ditto.
1592 * fhandler.cc (fhandler_base::set_flags): Accept supplied_bin argument.
1593 Make binmode decisions here.
1594 (fhandler_base::open): Avoid using pc if it is NULL. Eliminate binmode
1595 logic. Just call set_flags with binmode argument.
1596 (fhandler_base::init): Call set_flags with binmode argument.
1597 * fhandler_clipboard.cc (fhandler_dev_clipboard::open): Ditto.
1598 * fhandler_console.cc (fhandler_console::open): Ditto.
1599 (fhandler_console::init): Force binary on open.
1600 * fhandler_disk_file.cc (fhandler_disk_file::open): Don't set binmode
1601 here. Let it happen in base class.
1602 * fhandler_dsp.cc (fhandler_dev_dsp::open): Force binmode open. Set
1603 return value appropriately if unable to open.
1604 * fhandler_proc.cc (fhandler_proc::open): Make sure flags are set
1605 before open_status.
1606 * fhandler_process.cc (fhandler_process::open): Ditto.
1607 * fhandler_registry.cc (fhandler_registry::open): Ditto.
1608 * fhandler_random.cc (fhandler_dev_random::fhandler_dev_random): Ditto.
1609 * fhandler_raw.cc (fhandler_dev_raw::open): Force O_BINARY by default.
1610 * fhandler_serial.cc (fhandler_serial::init): Ditto.
1611 * fhandler_tty.cc (fhandler_tty_slave::open): Ditto.
1612 (fhandler_pty_master::open): Ditto.
1613 * fhandler_virtual.cc (fhandler_virtual::open): Ditto.
1614 * fhandler_windows.cc (fhandler_windows::open): Ditto.
1615 * fhandler_zero.cc (fhandler_dev_zero::open): Ditto.
1616 * net.cc (fdsock): Ditto.
1617 * path.cc (path_conv::check): Avoid checking for executable extension
1618 when directory. (Suggested by Pavel Tsekov)
1619 (set_flags): Set PATH_TEXT explicitly, when appropriate.
1620 (mount_info::conv_to_win32_path): Use set_flags() to set path flags.
1621 * path.h (PATH_TEXT): New enum.
1622 (path_conv::binmode): Return appropriate constant based on binmode.
1623 * pipe.cc (make_pipe): Set binmode to O_TEXT xor O_BINARY.
1624 * syscalls.cc (setmode_helper): Make debugging message a little
1625 clearer.
1626 (setmode): Set binmode via set_flags.
1627
4e138847
CV
16282002-06-04 Corinna Vinschen <corinna@vinschen.de>
1629
1630 * fhandler.h (class fhandler_socket): Add private method
1631 fixup_after_fork (bool, HANDLE).
1632 * fhandler_socket.cc (fhandler_socket::fixup_after_fork): Move
1633 functionality to new private method. Add closing parent socket
1634 if not called from dup(). Create method new calling private method
1635 with appropriate parameter.
1636 (fhandler_socket::fixup_after_exec): Call private method
1637 fixup_after_fork with appropriate parameter.
1638 (fhandler_socket::dup): Ditto.
1639
16402002-06-04 Corinna Vinschen <corinna@vinschen.de>
6bfca3cc
CV
1641
1642 * fhandler_dsp.cc (fhandler_dev_dsp::open): Set errno to EACCES if
1643 requested mode isn't supported.
1644
e02f1e9c
CF
16452002-06-03 Christopher Faylor <cgf@redhat.com>
1646
1647 * fhandler.cc (fhandler_base::open): Don't set binmode if already set.
1648 Don't check for file. Files should already be set. Report on binary
1649 mode for debugging.
1650 (fhandler_base::fhandler_base): Don't set default binmode here. That's
1651 for later.
1652 * fhandler_console.cc (fhandler_console::output_tcsetattr): Don't set
1653 binmode, ever, for console.
1654 * fhandler_disk_file.cc (fhandler_disk_file::open): Always set the
1655 binary mode to the value derived from mount table.
1656 * path.cc (mount_info::conv_to_win32_path): Default to binmode if path
1657 does not translate into anything in the mount table.
1658
31b98a62
CV
16592002-06-03 Corinna Vinschen <corinna@vinschen.de>
1660
1661 * external.cc (cygwin_internal): Add CW_EXTRACT_DOMAIN_AND_USER
1662 handling to call extract_nt_dom_user() from applications.
1663 * include/sys/cygwin.h (cygwin_getinfo_types): Add
1664 CW_EXTRACT_DOMAIN_AND_USER.
1665
b3c29731
CV
16662002-06-03 Corinna Vinschen <corinna@vinschen.de>
1667
1668 * syscalls.cc (stat64_to_stat32): Transform st_dev correctly.
1669 (fstat64): Add evaluating st_ino and st_dev.
1670 (stat_worker): Evaluate st_dev as 32 bit value.
1671 * include/cygwin/stat.h: Use new dev_t definition throughout.
1672 * include/cygwin/types.h: Define __dev16_t and __dev32_t. Define
1673 dev_t according to __CYGWIN_USE_BIG_TYPES__ setting.
1674 * include/sys/sysmacros.h: Define major, minor and makedev
1675 according to __CYGWIN_USE_BIG_TYPES__ setting.
1676
656c3192
CV
16772002-06-03 Pierre Humblet <pierre.humblet@ieee.org>
1678
1679 * syscalls.cc (setegid32): Verify the correctness of the gid
1680 of the group returned by getgrgid32.
1681
1eb934b7
CV
16822002-06-03 Pierre Humblet <pierre.humblet@ieee.org>
1683
1684 * security.cc (lsa2wchar): Suppressed.
1685 (get_lsa_srv_inf): Suppressed.
1686 (get_logon_server_and_user_domain): Suppressed.
1687 (get_logon_server): Essentially new.
1688 (get_user_groups): Add "domain" argument. Only lookup the
1689 designated server and use "domain" in LookupAccountName.
1690 (is_group_member): Simplify the arguments.
1691 (get_user_local_groups): Simplify the arguments. Do only a
1692 local lookup. Use "BUILTIN" and local domain in LookupAccountName.
1693 (get_user_primary_group). Only lookup the designated server.
1694 (get_group_sidlist): Remove logonserver argument. Do not lookup
1695 any server for the SYSTEM account.
1696 (create_token): Delete logonserver and call to get_logon_server.
1697 Adjust arguments of get_group_sidlist, see above.
1698 * security.h: Delete declaration of get_logon_server_and_user_domain
e35f391f 1699 and add declaration of get_logon_server.
1eb934b7
CV
1700 * uinfo.cc (internal_get_login): Call get_logon_server instead of
1701 get_logon_server_and_user_domain.
1702
37be5a67
CF
17032002-06-02 Christopher Faylor <cgf@redhat.com>
1704
e35f391f
CF
1705 * dtable.cc (handle_to_fn): Use largest match for device. Correctly
1706 (?) deal with remote drive weirdness.
37be5a67 1707
97478fe6
CF
17082002-06-02 Christopher Faylor <cgf@redhat.com>
1709
1710 * fhandler_disk_file.cc (fhandler_disk_file::fstat_by_name): Check
1711 specifically for non-existent file, first.
1712 (fhandler_disk_file::fstat): Perform fd open on files with funny
1713 characters.
1714
47413f84
CF
17152002-06-02 Christopher January <chris@atomice.net>
1716
1717 * fhandler_process.cc (fhandler_process::open): Set fileid.
1718
6b7cd251
CF
17192002-06-02 Christopher Faylor <cgf@redhat.com>
1720
1721 Remove unneeded sigproc.h includes throughout.
1722 * fhandler.h (fhandler_proc::fill_filebuf): Take a pinfo argument.
1723 * fhandler_proc.cc (fhandler_proc::get_proc_fhandler): Simplify search
1724 for given pid.
1725 (fhandler_proc::readdir): Assume that pid exists if it shows up in the
1726 winpid list.
1727 * fhandler_process.cc (fhandler_process::open): Simplify search for
1728 given pid. Call fill_filebuf with pinfo argument.
1729 (fhandler_process::fill_filebuf): Pass pinfo here and assume that it
1730 exists.
1731 * pinfo.h (pinfo::remember): Define differently if sigproc.h is not
1732 included.
1733
17342002-06-02 Christopher Faylor <cgf@redhat.com>
1735
1736 * dll_init.cc (dll_list::detach): Don't run destructor on exit.
1737
e065a187
CF
17382002-06-01 Christopher Faylor <cgf@redhat.com>
1739
1740 * fhandler.cc (fhandler_base::fstat): Move dev and ino calculation into
1741 caller.
1742 * syscalls.cc (stat_worker): Calculate dev and ino calculation here, if
1743 zero.
1744 * fhandler_proc.cc (fhandler_proc::fhandler_proc): Minor reorg for
1745 debugging.
1746 * fhandler_process.cc (fhandler_process::exists): Return 0 on
1747 nonexistence.
1748 (fhandler_process::fstat): Simplify pid logic.
1749 * fhandler_tape.cc (fhandler_dev_tape::fstat): Minor reformatting.
1750
60abf1c4
CF
17512002-06-01 Christopher Faylor <cgf@redhat.com>
1752
1753 * path.cc (chdir): Don't allow cd'ing to a non-directory virtual path.
1754
28af03fa
CF
17552002-05-31 Christopher Faylor <cgf@redhat.com>
1756
1757 * fhandler_disk_file.cc (readdir): Move inode calculation into caller.
1758 (fhandler_cygdrive::readdir): Add "." and "..".
1759 * dir.cc (readdir): Move inode calculation here so that fhandler
1760 readdirs can benefit.
1761
8e74c320
CF
17622002-05-31 Christopher Faylor <cgf@redhat.com>
1763
1764 * fhandler_console.cc (fhandler_console::open): Reinstate setting of
1765 flags.
1766
30478f15
CF
1767 * dtable.cc (dtable::init_std_file_from_handle): Default to using
1768 binmode derived from path_conv, when required.
1769 * fhandler.h (fhandler_base::get_w_binary): Default to binmode if
1770 nothing else is specified.
1771 * fhandler.h (fhandler_base::get_r_binary): Ditto.
1772
1773 * fhandler_disk_file.cc (fhandler_disk_file::fstat_by_handle): Work
1774 around g++ warning.
1775
1776 * path.cc (path_conv::check): Remove a debugging statement.
1777
de86e35b
CF
17782002-05-31 Christopher Faylor <cgf@redhat.com>
1779
1780 * fhandler_console.cc (fhandler_console::open): Always default to
1781 binmode.
1782 (fhandler_console::write_normal): Don't honor binmode setting. There
1783 is already a termios setting for this.
1784 (fhandler_console::init): Correct argument order in init call.
1785
8461f41e
CF
17862002-05-31 Christopher Faylor <cgf@redhat.com>
1787
1788 * fhandler.cc (fhandler_base::open): Make default open mode == binmode.
1789 (fhandler_base::init): Set open flags based on derived binmode argument.
1790
bcd0ed9f
CF
17912002-05-31 Christopher Faylor <cgf@redhat.com>
1792
1793 * dll_init.cc (dll_list::init): Eliminate unneeded debugging statement.
1794
18c04cc4
CF
17952002-05-31 Christopher Faylor <cgf@redhat.com>
1796
1797 * fhandler_proc.cc (fhandler_proc::readdir): Set errno when no more
1798 files.
1799 * fhandler_process.cc (fhandler_process::readdir): Ditto.
1800 * fhandler_registry.cc (fhandler_registry::readdir): Ditto.
1801
69be001c
CF
18022002-05-30 Christopher Faylor <cgf@redhat.com>
1803
1804 * path.cc (path_conv::check): Set fileattr to INVALID_FILE_ATTRIBUTES
1805 for nonexistent virtual device path.
1806 (chdir): Set correct errno when attempt is made to cd to nonexistent
1807 virtual device path.
1808
5d8c7a56
CF
18092002-05-30 Christopher Faylor <cgf@redhat.com>
1810
1811 * fhandler_disk_file.cc (fhandler_disk_file::fstat): Always call
1812 fstat_by_name if fd is not opened to allow fstat_by_name to properly
1813 set errno.
1814
d74eced5
CV
18152002-05-30 Corinna Vinschen <corinna@vinschen.de>
1816
1817 * autoload.cc: Replace autoload statments for ZwXXX by NtXXX.
1818 Drop ZwQuerySystemInformation since NtQuerySystemInformation was
1819 already available.
1820 * fhandler_proc.cc (format_proc_uptime): Replace call to
1821 ZwQuerySystemInformation by call to NtQuerySystemInformation.
1822 (format_proc_stat): Ditto.
1823 * fhandler_process.cc (format_process_stat): Replace call to
1824 ZwQueryInformationProcess by call to NtQueryInformationProcess.
1825 (get_process_state): Ditto.
1826 (get_mem_values): Ditto. Replace call to ZwQueryVirtualMemory by
1827 call to NtQueryVirtualMemory.
1828 * ntdll.h: Cleanup. Drop ZwQuerySystemInformation since
1829 NtQuerySystemInformation was already available. Replace declarations
1830 of ZwXXX functions by declarations of NtXXX.
1831 * pinfo.cc (winpids::enumNT): Replace call to ZwQuerySystemInformation
1832 by call to NtQuerySystemInformation.
1833
5d8c7a56
CF
18342002-05-29 Christopher Faylor <cgf@redhat.com>
1835
1836 * fhandler.cc (binmode): Default to binmode when mode is not known.
1837
186637a5
CF
18382002-05-29 Christopher Faylor <cgf@redhat.com>
1839
1840 * include/sys/cygwin.h (EXTERNAL_PINFO_VERSION): Reinstate.
1841 * external.cc (fillout_pinfo): Use it.
1842
3a571063
CV
18432002-05-29 Corinna Vinschen <corinna@vinschen.de>
1844
1845 * external.cc (fillout_pinfo): Use new version define.
1846 * include/sys/cygwin.h (external_pinfo): Define
1847 EXTERNAL_PINFO_VERSION_16_BIT and EXTERNAL_PINFO_VERSION_32_BIT
1848 instead of just EXTERNAL_PINFO_VERSION.
1849
9fef0139
CF
18502002-05-29 Christopher Faylor <cgf@redhat.com>
1851
1852 * external.cc (fillout_pinfo): Set new version field in external_pinfo
1853 structure.
1854 * include/sys/cygwin.h (external_pinfo): Replace strace_file with
1855 version field.
1856
a8d7ae61
CV
18572002-05-29 Corinna Vinschen <corinna@vinschen.de>
1858
1859 Change internal uid datatype from __uid16_t to __uid32_t
1860 throughout.
1861 * cygwin.din: Export new symbols getpwuid32, getpwuid_r32, getuid32,
1862 geteuid32, setuid32, seteuid32.
1863 * passwd.cc (getpwuid32): New function.
1864 (getpwuid_r32): Ditto.
1865 * syscalls.cc (seteuid32): Ditto.
1866 (setuid32): Ditto.
1867 * uinfo.cc (getuid32): Ditto.
1868 (geteuid32): Ditto.
d4000bc4 1869 * winsup.h (uid16touid32): New macro, correct casting from __uid16_t
a8d7ae61
CV
1870 to __uid32_t.
1871 (gid16togid32): Ditto fir gids.
1872 (getuid32): Declare.
1873 (geteuid32): Ditto.
1874 (getpwuid32): Ditto.
1875 * include/sys/cygwin.h (struct external_pinfo): Add members uid32 and
1876 gid32.
1877
9854c44c
CV
18782002-05-29 Corinna Vinschen <corinna@vinschen.de>
1879
1880 * include/cygwin/socket.h: Protect some symbols against multiple
1881 definition.
1882 * include/netinet/ip.h: Ditto.
1883 * include/netinet/tcp.h: Ditto.
1884
18852002-05-29 Wu Yongwei <adah@netstd.com>
1886
1887 * include/netinet/ip.h: Replace by BSD derived version of the file.
1888 * include/netinet/tcp.h: Ditto.
1889 * include/netinet/udp.h: New file.
1890 * include/cygwin/ip.h: Remove.
1891
cef69559
CF
18922002-05-29 Christopher Faylor <cgf@redhat.com>
1893
1894 * dtable.cc (dtable::init_std_file_from_handle): Attempt stronger
1895 detection of invalid handle.
1896 (handle_to_fn): Detect pathological condition where NT resets the
1897 buffer pointer to NULL on an invalid handle.
1898
a761ad82
CF
18992002-05-28 Christopher Faylor <cgf@redhat.com>
1900
1901 * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Properly
1902 check for whether we should be opening the file to search for #!
654783b6
CF
1903 characters. Set path_conv structure execability, too, when
1904 appropriate.
a761ad82 1905
7ea70e99
CV
19062002-05-28 Corinna Vinschen <corinna@vinschen.de>
1907
1908 * security.cc (set_security_attribute): Call getegid32() instead of
1909 getegid().
1910 * include/cygwin/grp.h: Declare getegid32().
1911
57196405
CV
19122002-05-28 Corinna Vinschen <corinna@vinschen.de>
1913
1914 Change internal gid datatype from __gid16_t to __gid32_t
1915 throughout.
1916 * cygwin.din: Export new symbols chown32, fchown32, getegid32,
1917 getgid32, getgrgid32, getgrnam32, getgroups32, initgroups32, lchown32,
1918 setgid32, setegid32, getgrent32.
1919 * grp.cc (grp32togrp16): New static function.
1920 (getgrgid32): New function.
1921 (getgrnam32): Ditto.
1922 (getgrent32): Ditto.
1923 (getgroups32): Change name of internal function from getgroups.
1924 (getgroups32): New function.
1925 (initgroups32): Ditto.
1926 * syscalls.cc (chown32): Ditto.
1927 (lchown32): Ditto.
1928 (fchown32): Ditto.
1929 (setegid32): Ditto.
1930 (setgid32): Ditto.
1931 * uinfo.cc (getgid32): Ditto.
1932 (getegid32): Ditto.
1933 * include/cygwin/grp.h: Remove declaration of getgrgid() and getgrnam().
1934 Declare getgrgid32() and getgrnam32() instead. Declare getgid32().
1935
0c12979b
CF
19362002-05-27 Christopher Faylor <cgf@redhat.com>
1937
1938 * autoload.cc (noload): Properly mask low order word for determining
1939 number of bytes to pop.
1940
57e2ae68
CF
19412002-05-27 Christopher Faylor <cgf@redhat.com>
1942
1943 * fhandler_disk_file.cc (fhandler_disk_file::fstat): Minor logic
1944 cleanup.
1945
2402700d
CF
19462002-05-27 Christopher Faylor <cgf@redhat.com>
1947
1948 * autoload.cc (LoadFuncEx): Define via new LoadFuncEx2 macro.
1949 (LoadFuncEx2): Adapted from LoadFuncEx. Provides control of return
1950 value for nonexistent function.
1951 (NtQueryObject): Declare.
1952 (IsDebuggerPresent): Declare via LoadFuncEx2 and always return true if
1953 not available.
1954 * debug.h (being_debugged): Just rely on IsDebuggerPresent return
1955 value.
1956 * dtable.cc (handle_to_fn): New function.
1957 (dtable::init_std_file_from_handle): Attempt to derive std handle's
1958 name via handle_to_fn.
1959 (dtable::build_fhandler_from_name): Fill in what we can in path_conv
1960 structure when given a handle and path doesn't exist.
1961 * fhandler.cc (fhandler_base::open): Don't set the file pointer here.
1962 Use pc->exists () to determine if file exists rather than calling
1963 GetFileAttributes again.
1964 * fhandler.h (fhandler_base::exec_state_isknown): New method.
1965 (fhandler_base::fstat_helper): Add extra arguments to declaration.
1966 (fhandler_base::fstat_by_handle): Declare new method.
1967 (fhandler_base::fstat_by_name): Declare new method.
1968 * fhandler_disk_file (num_entries): Make __stdcall.
1969 (fhandler_base::fstat_by_handle): Define new method.
1970 (fhandler_base::fstat_by_name): Define new method.
1971 (fhandler_base:fstat): Call fstat_by_{handle,name} as appropriate.
1972 (fhandler_disk_file::fstat_helper): Accept extra arguments for filling
1973 out stat structure. Move handle or name specific stuff to new methods
1974 above.
1975 (fhandler_disk_file::open): Use real_path->exists rather than calling
1976 GetFileAttributes again.
1977 * ntdll.h (FILE_NAME_INFORMATION): Define new structure.
1978 (OBJECT_INFORMATION_CLASS): Partially define new enum.
1979 (OBJECT_NAME_INFORMATION): Define new structure.
1980 (NtQueryInformationFile): New declaration.
1981 (NtQueryObject): New declaration.
1982 * path.cc (path_conv::fillin): Define new method.
1983 * path.h (path_conv::fillin): Declare new method.
1984 (path_conv::drive_thpe): Rename from 'get_drive_type'.
1985 (path_conv::volser): Declare new method.
1986 (path_conv::volname): Declare new method.
1987 (path_conv::root_dir): Declare new method.
1988 * syscalls.cc (fstat64): Send real path_conv to fstat as second
1989 argument.
1990
74b2f73e
CV
19912002-05-24 Pierre Humblet <pierre.humblet@ieee.org>
1992
1993 * security.cc (lsa2str): New function.
1994 (get_priv_list): Call lsa2str instead of sys_wcstombs.
1995
75bf2931
CV
19962002-05-22 Pierre Humblet <pierre.humblet@ieee.org>
1997
1998 * syscalls.cc (seteuid): Do not take allow_ntsec into account.
1999 Attempt to use an existing or new token even when the uid
2000 matches orig_uid, but the gid is not in the process token.
2001 Major reorganization after several incremental changes.
2002 (setegid): Do not take allow_ntsec into account. Minor
2003 reorganization after several incremental changes.
2004
918a268c
CF
20052002-05-26 Christopher Faylor <cgf@redhat.com>
2006
2007 * debug.h (being_debugged): New macro.
2008 * dtable.cc (dtable::extend): Use new macro.
2009 * exceptions.cc (try_to_debug): Ditto.
2010 * strace.cc (strace::hello): Only output debugging info when we think
2011 we're being debugged.
2012
0cfbfc24
CF
20132002-05-25 Robert Collins <rbtcollins@hotmail.com>
2014
2015 * winsup.h: Remove duplicate declarations of malloc_lock and
2016 malloc_unlock.
2017
d7b4a300
CF
20182002-05-24 Christopher Faylor <cgf@redhat.com>
2019
2020 Remove unneeded sync.h, where appropriate, throughout.
2021 Remove unneeded heap.h, where appropriate, throughout.
2022 Remove unneeded exceptions.h, where appropriate, throughout.
2023 Remove unneeded perprocess.h, where appropriate, throughout.
2024
908f9b65
CV
20252002-05-22 Pierre Humblet <pierre.humblet@ieee.org>
2026
2027 * security.cc (create_token): Call __sec_user() instead of
2028 sec_user() to remove dependence on allow_ntsec. Verify that
2029 the returned sd is non-null.
2030
a6247be9
RC
20312002-05-25 Robert Collins <rbtcollins@hotmail.com>
2032
2033 * gmon.c (fake_sbrk): Correctly return -1 on failed malloc's.
2034
ff938546
CF
20352002-05-24 Christopher Faylor <cgf@redhat.com>
2036
2037 * dtable.cc (dtable::build_fhandler_from_name): Just pass posix path
2038 along to set_name via return_and_clear_normalized_path.
2039 (dtable::build_fhandler): New method with const char * argument.
2040 (dtable::reset_unix_path_name): Eliminate.
2041 (dtable::dup_worker): Use correct build_fhandler method.
2042 * mmap.cc (mmap_record::alloc_fh): Ditto.
2043 * dtable.h (dtable::build_fhandler): New method.
2044 (dtable::reset_unix_path_name): Eliminate.
2045 * fhandler.cc (fhandler_base::set_name): Assume that unix_name has
2046 already been cmalloced.
2047 (fhandler_base::reset_unix_path_name): Eliminate.
2048 (fhandler_base::~fhandler_base): Coercion for cfree.
2049 * fhandler.h (fhandler_base::unix_path_name): Make const char *.
2050 (fhandler_base::win32_path_name): Ditto.
2051 (fhandler_base::reset_unix_path_name): Eliminate.
2052 * fhandler_disk_file.cc (fhandler_cygdrive::set_drives): Accommodate
2053 const char *ness of win32_path_name.
2054 * fhandler_socket.cc (fhandler_socket::fstat): Accommodate new set_name
2055 requirements.
2056 * path.cc (path_conv::return_and_clear_normalized_path): New method.
2057 (path_conv::clear_normalized_path): Eliminate.
2058 (path_conv::~path_conv): Ditto.
2059 (path_conv::check): Accommodate new build_fhandler method.
2060 * path.h (path_conv::~path_conv): Eliminate.
2061 (path_conv::clear_normalized_path): Ditto.
2062 (path_conv::return_and_clear_normalized_path): Declare new method.
2063
b4bb31ad
CF
20642002-05-23 Christopher Faylor <cgf@redhat.com>
2065
2066 * path.cc (path_conv::check): Make sure any trailing path component is
2067 part of potential normalized posix path.
2068
b2f338e9
CF
20692002-05-23 Christopher Faylor <cgf@redhat.com>
2070
2071 * smallprint.c (__small_vsprintf): Implement '%o' after all these
2072 years.
2073
fc240f58
CF
20742002-05-22 Christopher Faylor <cgf@redhat.com>
2075
2076 * fhandler.h (fhandler_virtual::exists): Eliminate path argument.
2077 (fhandler_proc::exists): Ditto.
2078 (fhandler_registry::exists): Ditto.
2079 (fhandler_process::exists): Ditto.
2080 * fhandler_proc.cc (fhandler_proc::exists): Ditto. Use built-in name.
2081 * fhandler_process.cc (fhandler_process::exists): Ditto.
2082 (fstat): Ditto.
2083 * fhandler_registry.cc (fhandler_registry::exists): Ditto.
2084 (fhandler_registry::fstat): Ditto.
2085 * fhandler_virtual.cc (fhandler_virtual::opendir): Ditto.
2086 * path.cc (path_conv::check): Ditto. Add debugging.
2087
20882002-05-22 Christopher Faylor <cgf@redhat.com>
2089
2090 * syscalls.cc (dup): Always call dup2 for error handling.
2091
1d2b71d6
CV
20922002-05-22 Corinna Vinschen <corinna@vinschen.de>
2093
2094 * include/cygwin/types.h: Revert previous patch.
2095
36f86a55
CV
20962002-05-22 Corinna Vinschen <corinna@vinschen.de>
2097
2098 * include/cygwin/types.h: Define pthread stuff only if _POSIX_THREADS
2099 is defined.
2100
2d6ce5c2
CV
21012002-05-19 Pierre Humblet <pierre.humblet@ieee.org>
2102
fc240f58 2103 * security.cc (open_local_policy): Initialize lsa to
2d6ce5c2
CV
2104 INVALID_HANDLE_VALUE instead of NULL.
2105 (get_logon_server_and_user_domain): Test for INVALID_HANDLE_VALUE
2106 instead of NULL.
2107 (create_token): Both of the above.
2108
9ded8bd8
CF
21092002-05-18 Christopher Faylor <cgf@redhat.com>
2110
2111 * fhandler_disk_file.cc (fhandler_disk_file::fstat): Make handling of
2112 nlink consistent for remote files.
2113
2701126a
CF
21142002-05-18 Christopher Faylor <cgf@redhat.com>
2115
2116 * path.cc (path_conv::check): Always set executable bit for executable
2117 extension.
2118
b05b7d84
CF
21192002-05-17 Christopher Faylor <cgf@redhat.com>
2120
2121 * fhandler.cc (fhandler_base::lseek): Avoid calling SetFilePointer with
2122 high order part of 64 bit address on OS's which do not support that
2123 kind of operation. Otherwise Windows 95 will become confused.
2124
d6dc9825
CV
21252002-05-16 Pierre Humblet <pierre.humblet@ieee.org>
2126
2127 * fhandler_raw.cc (fhandler_dev_raw::open): Replace set_errno()
2128 by __seterrno_from_win_error().
2129 * security.cc (open_local_policy): Ditto.
2130 (get_lsa_srv_inf): Ditto.
2131 (get_user_groups): Ditto.
2132 (get_user_primary_group): Ditto.
2133 (create_token): Ditto.
2134 (subauth): Ditto.
2135
35a89cbe
CV
21362002-05-17 Corinna Vinschen <corinna@vinschen.de>
2137
2138 * times.cc (utimes): Use FILE_WRITE_ATTRIBUTES even on 9x/Me when
2139 opening file for writing timestamp.
2140 * wincap.cc: Remove flag has_specific_access_rights.
2141 * wincap.h: Ditto.
2142
ebbdc703
CV
21432002-05-13 Pierre Humblet <pierre.humblet@ieee.org>
2144
2145 * syscalls.cc (seteuid): Set default dacl in process token.
2146 Replace in-line code by call to verify_token().
2147 (setegid): Reverse change from 2002-01-21. Add call to
2148 RevertToSelf and set primary group in impersonation token.
2149 * security.cc (create_token): Store pgrpsid in token security
2150 descriptor, except if it already appears in my_grps.
2151 Use sec_acl() in place of get_dacl().
2152 (verify_token): Create from code in seteuid(), with tighter checks.
c2102631 2153 (get_dacl): Deleted.
ebbdc703
CV
2154 (get_group_sidlist): Add argument to indicate if pgrpsid is already
2155 in the groups.
2156 * security.h: Define verify_token().
2157 * autoload.cc: Load GetKernelObjectSecurity().
2158
feb7f1a9
CF
21592002-05-13 Mark Bradshaw <bradshaw@staff.crosswalk.com>
2160
2161 * cygwin.din: Add strlcat and strlcpy.
2162 * include/cygwin/version.h: Increment API minor version number.
2163
fc240f58 21642002-05-09 Pierre Humblet <pierre.humblet@ieee.org>
043bc3e1
CV
2165
2166 * shared.cc (__sec_user): Split into sec_acl() and call orig_sid().
2167 (sec_acl): Create from part of __sec_user(), except creator/owner.
2168 * security.h: Define sec_acl() and MAX_DACL_LEN.
2169
c8b20196
CF
21702002-05-12 Christopher Faylor <cgf@redhat.com>
2171
2172 * fhandler_disk_file.cc (fhandler_disk_file::open): Avoid using
2173 O_DIROPEN when OS doesn't support it. Return proper errno in that
2174 case.
2175
b4f8d31f
CF
21762002-05-12 Christopher Faylor <cgf@redhat.com>
2177
56caca1d
CF
2178 * syscalls.cc (_read): Change error to EBADF if attempt to read from a
2179 non-readable fd.
b4f8d31f 2180
29ee580d
CF
21812002-05-11 Christopher Faylor <cgf@redhat.com>
2182
2183 * fhandler.h (executable_states): For now, make dont_care_if_executable
2184 equivalent to not_executable.
2185 * sys/mount.h: Define MOUNT_NOTEXEC.
2186 * path.h (fs_info): New class.
2187 (path_conv): Move fs-specific fields to new 'fs' structure.
2188 (path_conv::update_fs_info): Move to fs_info and rename to just 'update'.
2189 * path.cc (fs_info::update): Ditto. Return 'true' if successful.
2190 (fillout_mntent): Add ',noexec' to list of reported options.
2191
b84621d2
CF
21922002-05-11 Christopher Faylor <cgf@redhat.com>
2193
2194 * fhandler_virtual.cc (fhandler_virtual::close): Quiet a compiler
2195 warning.
2196
9ba913a5
CF
21972002-05-10 Christopher January <chris@atomice.net>
2198
2199 * autoload.cc: Add dynamic load statements for
2200 'ZwQueryInformationProcess' and 'ZwQueryVirtualMemory'.
2201 * fhandler.h: Change type of bufalloc and filesize members of
2202 fhandler_virtual from int to size_t. Change type of position member
2203 from __off32_t to __off64_t. Add new fileid member to fhandler_virtual
2204 class. Make seekdir take an __off64_t argument. Make lseek take an
2205 __off64_t argument. Add fill_filebuf method to fhandler_virtual. Add
2206 fill_filebuf method to fhandler_proc. Add fill_filebuf method to
2207 fhandler_registry. Add fill_filebuf method to fhandler_process. Add
2208 saved_pid and saved_p members to fhandler_process.
2209 * fhandler_proc.cc (proc_listing_array): Add 'loadavg', 'meminfo', and 'stat'.
2210 (proc_fhandlers array): Ditto.
2211 (fhandler_proc::open): Use fill_filebuf to flesh out the file contents.
2212 (fhandler_proc::fill_filebuf): New method.
2213 (fhandler_proc::format_proc_meminfo): Ditto.
2214 (fhandler_proc::format_proc_stat): Ditto.
2215 (fhandler_proc::format_proc_uptime): Ditto.
2216 * fhandler_process.cc (process_listing): Add 'stat' and 'statm'.
2217 (fhandler_process::fstat): Find the _pinfo structure for the process
2218 named in the filename. Return ENOENT if the process is no longer
2219 around. Set the gid and uid fields of the stat structure.
2220 (fhandler_process::open): Store pid and pointer to _pinfo structure in
2221 saved_pid and saved_p respectively. Use fill_filebuf to flesh out file
2222 contents.
2223 (fhandler_proc::fill_filebuf): New method.
2224 (format_process_stat): New function.
2225 (format_process_status): Ditto.
2226 (format_process_statm): Ditto.
2227 (get_process_state): Ditto.
2228 (get_mem_values): Ditto.
2229 * fhandler_registry.cc (fhandler_registry::seekdir): Change argument
2230 type from __off32_t to __off64_t.
2231 (fhandler_registry::fill_filebuf): New method.
2232 * fhandler_virtual.cc (fhandler_virtual::seekdir): Change argument type
2233 from __off32_t to __off64_t.
2234 (fhandler_virtual::lseek): Ditto.
2235 (fhandler_virtual::fill_filebuf): New method.
2236 (fhandler_virtual::fhandler_virtual): Initialise fileid to -1.
2237 * wincap.cc: Set flag has_process_io_counters appropriately.
2238 * wincap.h: Add flag has_process_io_counters.
2239
22402002-05-09 Christopher Faylor <cgf@redhat.com>
f561f644
CF
2241
2242 * syscalls.cc (_write): Change error to EBADF if attempt to write to a
56caca1d 2243 non-writeable fd.
f561f644 2244
6327de5f
CV
22452002-05-08 Corinna Vinschen <corinna@vinschen.de>
2246
2247 * cygheap.h (class cygheap_user): Add member `orig_psid'.
2248 Add method `orig_sid()'.
2249 * cygheap.cc (cygheap_user::set_sid): Maintain orig_psid.
2250
795b46cf
CV
22512002-04-28 Norbert Schulze <norbert.schulze@web.de>
2252
2253 * localtime.cc (tzsetwall): Use wildabbr if generated timezone name
2254 length < 3.
2255
a9917779
CV
22562002-05-05 Pierre Humblet <pierre.humblet@ieee.org>
2257
2258 * spawn.cc (spawn_guts): Move call to set_process_privilege()
2259 to load_registry_hive().
2260 * registry.cc (load_registry_hive): ditto.
2261 * fork.cc (fork_parent): Call sec_user_nih() only once.
2262
22632002-05-04 Christopher January <chris@atomice.net>
13ee3618
CF
2264
2265 * path.h (path_conv::path_conv): Initialise normalized_path to NULL.
2266
8761c1dc
CF
22672002-05-03 Christopher Faylor <cgf@redhat.com>
2268
2269 * net.cc (getdomainname): Change second argument of getdomainname to
2270 size_t.
2271
22722002-05-03 Christopher January <chris@atomice.net>
2273
2274 * fhandler_proc.cc (proc_listing): Add '.' and '..' to directory
2275 listing.
2276 (fhandler_proc::open): Change use of mode to flags. If the file does
2277 not exist already, fail with EROFS if O_CREAT flag is set. Change
2278 EROFS error to EACCES error when writing to a file. Use cmalloc to
2279 allocate memory for filebuf.
2280 (fhandler_proc::close): Use cfree to free filebuf.
2281 (fhandler_proc::get_proc_fhandler): Properly detect attempts to access
2282 unknown subdir.
2283 * fhandler_process.cc (process_listing): Add '.' and '..' to directory
2284 listing.
2285 (fhandler_process::open): Use cmalloc to allocate memory for filebuf.
2286 (fhandler_process::close): Use cfree to free filebuf.
2287 * fhandler_registry.cc (registry_listing): Add . and '..' to directory
2288 listing.
2289 (fhandler_registry::open): Move check for open for writing before
2290 open_key. Use cmalloc to allocate memory for filebuf.
2291 (fhandler_registry::close): Use cfree to free filebuf.
2292 (fhandler_registry::telldir): Use lower 16 bits of __d_position as
2293 position in directory.
2294 (fhandler_registry::seekdir): Ditto.
2295 * fhandler_virtual.cc (fhandler_virtual::write): Change EROFS error to
2296 EACCES error.
2297 (fhandler_virtual::open): Set the NOHANDLE flag.
2298 (fhandler_virtual::dup): Add call to fhandler_base::dup. Allocate
2299 child's filebuf using cmalloc. Copy filebuf from parent to child.
2300 (fhandler_virtual::close): Use cfree to free filebuf.
2301 (fhandler_virtual::~fhandler_virtual): Ditto.
2302 (from Chris Faylor <cgf@redhat.com>).
2303 (fhandler_registry::readdir): Add support for '.' and '..' files in
2304 subdirectories of /proc/registry.
2305 * path.cc (path_conv::check): Do not return ENOENT if a file is not
2306 found in /proc.
2307
335c87f9
CF
23082002-05-02 Christopher Faylor <cgf@redhat.com>
2309
2310 * fhandler_proc.cc (fhandler_proc::fstat): Use fhandler name rather
2311 than path_conv name.
2312 (fhandler_proc::open): Ditto.
2313 * fhandler_process.cc (fhandler_process::fstat): Use fhandler name
2314 rather than path_conv name.
2315 (fhandler_process::open): Ditto.
2316 * fhandler_registry.cc (fhandler_registry::fstat): Use fhandler name
2317 rather than path_conv name.
2318 (fhandler_registry::open): Ditto.
2319 * path.cc (path_conv::check): Don't copy posix path when virtual.
2320 (mount_info::conv_to_win32_path): Don't zero string when isproc. Just
2321 derive normal windows path.
2322
2323 * path.h (path_conv::clear_normalized_path): Declare new method.
2324 * path.cc (path_conv::clear_normalized_path): Define new method.
2325 * dtable.cc (build_fhandler_from_name): Clear normalized path when
2326 finished to conserve space.
2327
3bb7eb44
CF
23282002-05-02 Christopher Faylor <cgf@redhat.com>
2329
2330 * fhandler_proc.cc (fhandler_proc::fstat): Prime with information from
2331 fhandler_base::fstat. Use defines rather than constants for permission
2332 settings.
2333
d055ecb0
CV
23342002-04-30 Eric Blake <ebb9@email.byu.edu>
2335
2336 * path.cc (hash_path_name): Improve hash function strength.
2337
37143995
RC
23382002-05-02 Robert Collins <rbtcollins@hotmail.com>
2339
2340 * thread.cc (__pthread_cond_dowait): Fix a race on signalling from a
2341 thread woken by the same condition variable it's signalling on. Thanks
2342 to Michael Beach for the report and test case.
2343
291be307
CF
23442002-05-02 Christopher Faylor <cgf@redhat.com>
2345
2346 * path.h (pathconv_arg): Add PC_POSIX.
2347 (path_conv): Add normalized_path field.
2348 * path.cc (path_conv::~path_conv): New destructor.
2349 (path_conv::check): Set normalized_path, where appropriate.
2350 * dtable.cc (build_fhandler_from_name): Use normalized path from
2351 path_conv.
2352 * syscalls.cc (chroot): Ditto.
2353
2354 * cygheap.h: Remove path_prefix_p declaration.
2355
23562002-02-26 Christopher January <chris@atomice.net>
2357 Christopher Faylor <cgf@redhat.com> (minor fixups)
2358
2359 * Makefile.in: Add fhandler_proc.o, fhandler_registry.o,
2360 fhandler_process.o and fhandler_virtual.o.
2361 * dtable.cc (dtable::build_fhandler): Add entries for FH_PROC,
2362 FH_REGISTRY and FH_PROCESS. Set unix_name to the normalized posix
2363 path.
2364 * fhandler.h: Add constants for FH_PROC, FH_REGISTRY and FH_PROCESS.
2365 Add class declarations for fhandler_virtual, fhandler_proc,
2366 fhandler_registry and fhandler_virtual. Update fhandler_union
2367 accordingly.
2368 * fhandler_proc.cc: New file. Add implementation for fhandler_proc.
2369 * fhandler_virtual.cc: New file. Add implementation for
2370 fhandler_virtual.
2371 * fhandler_process.cc: New file. Add implementation for
2372 fhandler_process.
2373 * fhandler_registry.cc: New file. Add implementation for
2374 fhandler_registry.
8761c1dc
CF
2375 * path.cc (isproc): New macro.
2376 (isvirtual_dev): Ditto.
291be307
CF
2377 * path.cc (path_conv::check): Add check for virtual devices.
2378 * path.cc (mount_info::conv_to_win32_path): Convert paths in /proc to
2379 empty Win32 paths.
2380 * path.cc (chdir): Replace check for FH_CYGDRIVE with more generic
2381 isvirtual_dev macro. Force setting of posix path for virtual
2382 fhandlers.
8761c1dc 2383 * path.h (path_prefix_p): Declare.
291be307
CF
2384
2385
fee93846
CF
2386Wed May 1 16:06:02 2002 Jason Tishler <jason@tishler.net>
2387
2388 * include/cygwin/types.h: Include <sys/sysmacros.h>.
2389
9b15f5fa
CV
2390Wed Apr 17 11:27:04 2002 Jason Tishler <jason@tishler.net>
2391
2392 * security.cc (get_lsa_srv_inf): Prevent extraneous backslashes for
2393 the NT Domain case.
2394
4deace13
CV
23952002-04-12 Corinna Vinschen <corinna@vinschen.de>
2396
2397 * net.cc (cygwin_accept): Set socket type for accepted socket.
2398 (socketpair): Set socket type for both sockets.
2399
24002002-04-12 Egor Duda <deo@logos-m.ru>
2401
291be307 2402 * fhandler.h (class fhandler_socket): New member to store socket type.
4deace13
CV
2403 (fhandler_socket::get_socket_type): Access it.
2404 (fhandler_socket::set_socket_type): Ditto.
2405 * net.cc (cygwin_socket): Store socket type.
2406 (cygwin_connect): Disable security checks for connectionless sockets.
2407 (cygwin_accept): Ditto.
2408
dbe67a81
CF
24092002-04-09 Mark Bradshaw <bradshaw@staff.crosswalk.com>
2410
2411 * cygwin.din: Add strptime.
2412 * include/cygwin/version.h: Increment API version number.
2413
464b3e80
CV
24142002-04-09 Corinna Vinschen <corinna@vinschen.de>
2415
2416 * fork.cc (fork_child): Call fixup_mmaps_after_fork() somewhat earlier.
2417
d78bda7b
CV
24182002-04-09 Corinna Vinschen <corinna@vinschen.de>
2419
2420 * fhandler.cc (fhandler_base::open): Set read-only bit in
2421 file_attributes when adequate.
2422
8996623b
CF
24232002-03-28 Christopher Faylor <cgf@redhat.com>
2424
2425 * times.cc (gettimeofday): Fix typo in previous patch.
2426
7d7524e5
CF
24272002-03-27 Wu Yongwei <adah@netstd.com>
2428
2429 * times.cc (gettimeofday): Revert to setting timezone info if tz !=
2430 NULL.
2431
2f3126f6
CF
24322002-03-21 Christopher Faylor <cgf@redhat.com>
2433
2434 * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Always set
2435 st_[ug]id to value derived from get_file_attributes.
2436
45d2ea8a
CF
24372002-03-21 Christopher Faylor <cgf@redhat.com>
2438
2439 * spawn.cc (find_exec): Return input if file not found.
2440
99dbafac
CV
24412002-03-19 Boris Schaeling <boriss@web.de>
2442
291be307 2443 * poll.cc (poll): Add support for invalid descriptors.
99dbafac 2444
b0359971
RC
24452002-03-15 Robert Collins <rbtcollins@hotmail.com>
2446
2447 * fhandler.h (fhandler_termios::lseek): Override lseek.
2448 * fhandler_termios.cc (fhandler_termios::lseek): Implement this.
2449
59a2339f
CF
24502002-03-15 Christopher Faylor <cgf@redhat.com>
2451
2452 * cygserver.cc: Include stdlib.h for exit declaration.
2453 * threaded_queue.cc: Ditto.
2454
ca175377
CF
24552002-03-15 Christopher Faylor <cgf@redhat.com>
2456
2457 * pinfo.cc (pinfo::init): Use PID_ALLPIDS flag to control when a
2458 redirected block should be marked as nonexistent.
2459 (winpids::add): Use PID_ALLPIDS when looking for all pids.
2460 * cygwin.h (PID_ALLPIDS): New enum element.
2461
d78bda7b 24622002-03-15 Corinna Vinschen <corinna@vinschen.de>
2f263187 2463
291be307 2464 * glob.c (stat32_to_STAT): New function.
2f263187
CV
2465 (g_lstat): Call user space functions always with 32 bit struct stat
2466 as a workaround.
2467 (g_stat): Ditto.
2468 * include/glob.h (struct glob): Don't prototype function pointers
2469 when compiling Cygwin.
2470
4af6d4a9
CF
24712002-03-14 Christopher Faylor <cgf@redhat.com>
2472
2473 * pinfo.cc (pinfo::init): Properly handle execed process stub when
2474 PID_NOREDIR is specified.
2475
6ea9c716
CV
24762002-03-13 Boris Schaeling <boriss@web.de>
2477
e10c087b
CF
2478 * poll.cc (poll): Remove variable open_fds. Rearrange and add code to
2479 fix settings of revents.
6ea9c716 2480
d78bda7b 24812002-03-13 Corinna Vinschen <corinna@vinschen.de>
bbe09139
CV
2482
2483 * mmap.cc (mmap_record::map_map): Return -1 if VirtualProtect fails.
2484 (list::erase): New method with no argument. Erase latest record
2485 added.
2486 (mmap64): Fail if map_map() fails.
2487
d78bda7b 24882002-03-12 Corinna Vinschen <corinna@vinschen.de>
cb4589f4
CV
2489
2490 * sysconf.cc (sysconf): Fix condition.
2491
d78bda7b 24922002-03-11 Corinna Vinschen <corinna@vinschen.de>
2817e0dc
CV
2493
2494 * mmap.cc (msync): Check area given by addr and len for being a
2495 contigeous mmap'd region.
2496
d78bda7b 24972002-03-11 Corinna Vinschen <corinna@vinschen.de>
713fb38b
CV
2498
2499 * fork.cc (fork_child): Call fixup_mmaps_after_fork() before
2500 closing parent process handle. Call fixup_mmaps_after_fork()
2501 with parent process handle as parameter.
2502 * mmap.cc (mmap_record::access): New method.
2503 (fixup_mmaps_after_fork): Take process handle as parameter.
2504 In case of FILE_MAP_COPY access, copy valid memory regions to child.
2505 * pinfo.h (fixup_mmaps_after_fork): Change prototype accordingly.
2506
d78bda7b 25072002-03-07 Corinna Vinschen <corinna@vinschen.de>
c8c3824d
CV
2508
2509 * autoload.cc (NetGetDCName): Add symbol.
2510 (NetServerEnum): Remove symbol.
2511 * security.cc (get_lsa_srv_inf): Call NetGetDCName() instead of
2512 NetServerEnum() since it's faster. Don't call it at all if machine
2513 is not a domain member.
2514
9420d2b8
CF
25152002-03-06 Christopher Faylor <cgf@redhat.com>
2516
2517 * path.cc (normalize_posix_path): Avoid runs of '.'s > 2.
2518
07a21bce
CF
25192002-03-05 Christopher Faylor <cgf@redhat.com>
2520
2521 * errno.cc: Change EPERM associated text to "Operation not permitted"
2522 throughout.
2523
eeac69d8
CF
25242002-03-05 Christopher Faylor <cgf@redhat.com>
2525
2526 * fhandler_socket.cc (fhandler_socket::close): Respond to signals while
2527 looping, waiting for socket to close. Superstitiously clear last error
2528 when WSAEWOULDBLOCK.
2529
241a7c5a
RC
25302002-03-05 Robert Collins <rbtcollins@hotmail.com>
2531
291be307 2532 * cygserver_transport_pipes.cc (transport_layer_pipes::transport_layer_pipes):
241a7c5a
RC
2533 Always init - until static members work correctly.
2534 * shm.cc (shmget): Initialize the security descriptor - thanks Corinna!
291be307 2535 * include/sys/ipc.h: Make the ipc control constants partitioned off from the sem
241a7c5a
RC
2536 control constants.
2537
ad2864f4
CV
25382002-03-04 Christian Lestrade <christian.lestrade@free.fr>
2539
2540 * include/sys/termios.h: Define _POSIX_VDISABLE. Define CCEQ macro.
2541 * fhandler_termios.cc: Include <sys/termios.h>.
2542 (line_edit): Recognize disabled c_cc[] chars. Ignore VDISCARD when
2543 not in ICANON mode.
2544
59149930
CV
25452002-03-04 Dmitry Timoshkov <dmitry@baikal.ru>
2546
2547 * syscalls.cc (truncate64): Use ftruncate64 directly to not lose
2548 upper 32 bits.
2549
7c3617cc
RC
25502002-03-04 Robert Collins <rbtcollins@hotmail.com>
2551
2552 * cygserver_shm.cc (delete_shmnode): New function.
2553 (client_request_shm::serve): Use it.
2554
038c71f1
RC
25552002-03-04 Robert Collins <rbtcollins@hotmail.com>
2556
2557 * cygserver_shm.cc (client_request_shm::serve): Implement SHM_DETACH.
2558 * shm.cc (shmdt): Implement.
2559
67be0adb
RC
25602002-03-04 Robert Collins <rbtcollins@hotmail.com>
2561
2562 * cygserver_shm.cc: Run indent.
2563 (deleted_head): New global for storing shm id's pending deletion.
2564 (client_request_shm::serve): Return ENOSYS for invalid request types.
2565 Implement SHM_DEL - delete a shm id.
2566 * cygserver_shm.h (SHM_DEL): New type value.
2567 * shm.cc (delete_inprocess_shmds): New function, does what it's name implies.
2568 (shmctl): Implement shm_rmid control type.
2569
74c3173a
RC
25702002-03-04 Robert Collins <rbtcollins@hotmail.com>
2571
2572 * Makefile.in (install): Remove install-bin to allow make install to work.
2573
009314a4
RC
25742002-03-03 Robert Collins <rbtcollins@hotmail.com>
2575
2576 * shm.cc (shmat): Prevent a compile error.
2577 (shmdt): Set errno as this function is incomplete.
2578
e7729287
CF
25792002-02-28 Christopher Faylor <cgf@redhat.com>
2580
2581 * times.cc: Remove if 0'd code. Clean up slightly.
2582
f449bfef
RC
25832002-02-28 Robert Collins <rbtcollins@hotmail.com>
2584
2585 * Merged cygwin_daemon into head minus the new shm and ipc exports.
2586
25872002-02-28 Robert Collins <rbtcollins@hotmail.com>
2588
2589 * fhandler_tty.cc (fhandler_tty_slave::open): More debugging.
2590 (fhandler_tty_slave::read): Fix printf type for the handle.
2591 * tty.cc (tty::common_init): Add a FIXME for security.
2592
25932002-01-29 Robert Collins <rbtcollins@hotmail.com>
2594
2595 * Makefile.in (OBJS): Remove duplicate localtime.o.
2596
25972002-01-17 Robert Collins <rbtcollins@hotmail.com>
2598
291be307 2599 * cygserver.cc (check_and_dup_handle): Consolidate the two variants for
f449bfef
RC
2600 simplicity.
2601 Add Some basic debug output.
2602 (client_request_attach_tty::serve): Use the new debug_printf for clarity.
2603 Mark the duplicated handles as inheritable - fixup_after_fork() doesn't reopen
2604 tty's.
2605
26062002-01-16 Robert Collins <rbtcollins@hotmail.com>
2607
2608 * cygserver.cc (transport): Correct scope.
2609 (client_request_attach_tty::serve): Add more debug information.
2610 Fix erroneous use of transport instead of conn.
2611 * cygserver_transport_pipes.cc (transport_layer_pipes::close): More debug.
2612 (transport_layer_pipes::read): Ditto.
2613 (transport_layer_pipes::write): Ditto.
2614 (transport_layer_pipes::impersonate_client): Ditto.
2615
2616Mon Oct 8 7:41:00 2001 Robert Collins <rbtcollins@hotmail.com>
2617
2618 * cygserver.cc (server_request::process): Rename client_request_shm_get to
2619 client_request_shm.
2620 * cygserver_process.cc (process_cache::add): Rename to add_task.
2621 Use process_cleanup instead of process_request.
2622 (process_cache::remove_process): New method.
2623 (process::process): Initialize new members.
2624 (process::~process): New member.
2625 (process::cleanup): New method.
2626 (process::add_cleanup_routine): New method.
2627 (process_request::process): Rename to process_cleanup.
2628 Call the process object's cleanup method and then delete it.
2629 (process_process_param::request_loop): Remove the signalling process.
2630 * cygserver_shm.cc: Globally rename client_request_shm_get to client_request_shm.
2631 (client_request_shm_get::serve): Handle attach request counting.
2632 * cygserver_shm.h: Globally rename client_request_shm_get to client_request_shm.
2633 (class shm_cleanup): New class.
2634 * shm.cc: Globally rename client_request_shm_get to client_request_shm.
2635 (client_request_shm::client_request_shm): New constructor for attach requests.
2636 (shmat): Use it.
291be307 2637 * include/cygwin/cygserver_process.h (class process_request): Rename to
f449bfef
RC
2638 process_cleanup.
2639 (class cleanup_routine): New class.
2640 (class process): New members and methods to allow calling back when the process
2641 terminates.
2642
2643Thu Oct 4 14:12:00 2001 Robert Collins <rbtcollins@hotmail.com>
2644 * cygserver.cc (request_loop): Make static.
2645 (main): Use new cache constructor syntax.
2646 Start cache worker threads.
2647 Cleanup the cache at shutdown.
2648 * cygserver_process.cc: Run indent.
2649 (process_cache::process_cache): Add a trigger to use when adding a process.
2650 (process_cache::process): Move process_entry to process.
2651 Insert at the end of the list.
2652 Trigger the request loop when new process's inserted.
2653 (process_cache::process_requests): Do it.
2654 (process_cache::add): New method.
2655 (process_cache::handle_snapshot): New method.
2656 (process::process): Merge in the process_entry fields.
2657 (process::handle): Make a stub function.
2658 (process::exit_code): New method.
2659 (process_request::process): New method.
2660 (process_process_param::request_loop): New method.
2661 * cygserver_shm.cc: New header dependency - threaded_queue.h.
2662 * threaded_queue.cc (threaded_queue::cleanup): Clearer messages.
2663 (queue_process_param::stop): Short spinlock on interruptible threads.
2664 * threaded_queue.h (class threaded_queue): New constructor.
2665 * include/cygwin/cygserver_process.h (process_request): New class.
2666 (process_entry): Remove.
2667 (process): Merge in process_entry.
2668 (process_cache): Inherit from threaded_queue.
2669
2670Tue Oct 2 23:24:00 2001 Robert Collins <rbtcollins@hotmail.com>
2671
2672 * cygserver.cc (class server_process_param): Use new constructor syntax.
2673 * cygserver_process.cc (process_cache::~process_cache): New function.
2674 * threaded_queue.cc: Define condition debug_printf.
2675 Run indent.
2676 (threaded_queue::cleanup): Move queue_process_param guts to a method.
2677 (threaded_queue::process_requests): Ditto.
2678 (queue_process_param::queue_process_param): New method.
2679 (queue_process_param::~queue_process_param): Ditto.
2680 (queue_process_param::start): Ditto.
2681 (queue_process_param::stop): Ditto.
291be307 2682 * threaded_queue.h (class queue_process_param): Add support for
f449bfef
RC
2683 interruptible request loops.
2684 * cygwin/include/cygwin/cygserver_process.h (class process_cache): Add
2685 destructor.
2686
2687Tue Oct 2 23:24:00 2001 Robert Collins <rbtcollins@hotmail.com>
2688
2689 * cygserver_client.cc: New flag allow_daemon to disable the daemon completely.
2690 (cygserver_request): Check it.
2691 (cygserver_init): Ditto.
2692 * environ.cc (parse_thing): Add (no)daemon option.
2693
2694Tue Oct 2 23:00:00 2001 Robert Collins <rbtcollins@hotmail.com>
2695
2696 * shm.cc: Update to handle include changes from HEAD.
2697
2698Tue Oct 2 16:06:00 2001 Robert Collins <rbtcollins@hotmail.com>
2699
291be307 2700 * Makefile.in: Remove cygserver_shm.o from cygwin1.dll.
f449bfef
RC
2701 Rename cygserver_shm_outside.o to cygserver_shm.o.
2702 * cygserver.cc (server_request::process): Use the new client_request
2703 constructor.
2704 * cygserver_client.cc: Remove the #ifdef's stubs for the server method
2705 within cygwin.
2706 (client_request_attach_tty::client_request_attach_tty): Use the new
2707 client_request constructor.
2708 (client_request_shutdown::client_request_shutdown): Ditto.
2709 (client_request::client_request): Ditto.
291be307 2710 * cygserver_shm.cc (client_request_shm_get::serve): Remove the
f449bfef
RC
2711 #ifdef'd stub for in-cygwin builds.
2712 (client_request_shm_get::client_request_shm_get): Use the new
2713 client_request constructor, and remove the in-cygwin variants.
2714 * cygserver_shm.h (class client_request_shm_get): #ifndef test the
2715 serve method - it's only used in cygserver.
2716 * shm.cc (client_request_shm_get::client_request_shm_get): New function.
2717 * include/cygwin/cygserver.h (request_header): New constructor.
291be307 2718 (class client_request): Use it.
f449bfef
RC
2719 New constructor accepting the header size.
2720 #ifndef test the server method - it's only used within cygserver.
2721 (client_request_get_version): #ifdef test the server method.
2722 (client_request_shutdown): Ditto.
2723 (client_request_attach_tty): Ditto.
2724
2725Tue Oct 2 9:57:00 2001 Robert Collins <rbtcollins@hotmail.com>
2726
2727 * Makefile.in: add threaded_queue.o to cygserver.exe.
2728 * cygserver.cc: Include threaded_queue.h
2729 (class server_request): Inherit from queue_request.
2730 (class server_process_param): Inherit from queue_process_param.
2731 (class server_request_queue): Inherit from threaded_queue.
2732 (request_loop): Adjust for new types.
291be307 2733 (server_request_queue::process_requests): Remove guts to
f449bfef
RC
2734 threaded_queue::process_requests.
2735 (server_request::server_request): Adjust for new types.
2736 (worker_function): Delete.
2737 (server_request_queue::create_workers): Delete.
2738 (server_request_queue::cleanup): Delete.
2739 (server_request_queue::add): Move guts to threaded_queue::add.
2740 * threaded_queue.cc: New file.
2741 * threaded_queue.h: New file.
2742
2743Mon Oct 1 12:38:00 2001 Robert Collins <rbtcollins@hotmail.com>
2744
2745 * cygserver.cc (client_request::serve): New function.
2746 * cygserver_process.cc: Inlude <pthread.h> for pthread_once.
2747 (process_cache::process_cache): Initialise a crtiical section for write access.
291be307 2748 (process_cache::process): Use the critical section. Also add missing entries to
f449bfef
RC
2749 the cache.
2750 (do_process_init): New function to initalise class process static variables.
291be307 2751 (process::process): Ensure that the process access critical section is
f449bfef
RC
2752 initialised.
2753 (process::handle): Close the handle of old process's when they have terminated
2754 and we are returning the handle for a process with the same pid.
2755 * cygserver_shm.cc: Run indent.
2756 Include cygserver_process.h to allow process cache functionality.
2757 (client_request_shm_get::serve): New parameter for process cache support.
2758 Use the process cache, not OpenProcess to get a handle to the originating process.
2759 Fix a handle leak with token_handle.
291be307 2760 * cygserver_shm.h (class client_request_shm_get): Update ::serve for process
f449bfef
RC
2761 cache support.
2762 * cygserver_transport_pipes.cc: Redefine debug_printf to be conditional on DEBUG.
291be307 2763 * include/cygwin/cygserver.h: Do not implement client_request::serve in the
f449bfef 2764 header.
291be307
CF
2765 * include/cygwin/cygserver_process.h (class process_cache): Add a write access
2766 critical section to prevent races when requests from a multithreaded
f449bfef
RC
2767 application arrive.
2768
2769Sun Sep 30 23:41:00 2001 Robert Collins <rbtcollins@hotmail.com>
2770
2771 * Makefile.in: Add cygserver_process.o to cygserver.exe.
2772 * cygserver.cc: Include signal.h and cygwin_version.h.
2773 Define debug_printf as a macro.
2774 Define DEBUG to a value.
2775 (client_request_attach_tty::serve): Add beginning of process cache support.
2776 Change from #ifdef DEBUG to work with new DEBUG style.
2777 (client_request_get_version::serve): Add beginning of process cache support.
2778 (class server_request): New prototype for support of process cache.
2779 (class queue_process_param): New class to allow request loop threading.
2780 (class server_request_queue): Add beginning of process cache support.
2781 Allow request loop threading.
2782 (request_loop): Thread function for request loops.
2783 (server_request_queue::process_requests): Initiator for threaded request loops.
2784 (client_request_shutdown::serve): Add beginning of process cache support.
2785 (server_request::server_request): Ditto.
291be307 2786 (server_request::process): Use debug_printf. Add beginning of process cache
f449bfef
RC
2787 support.
2788 (server_request_queue::cleanup): Kill off any request loop threads.
2789 (server_request_queue::add): Add beginning of process cache support.
2790 (handle_signal): Trigger a shutdown.
2791 (main): Print out some useful info at startup - version, date time.
2792 Add process cache support.
2793 Spawn a separate thread for the transport request loop, thus allowing concurrent
2794 support for multiple transports.
291be307 2795 * cygserver_client.cc (client_request_get_version::serve): Add process cache
f449bfef
RC
2796 support.
2797 (client_request_attach_tty::serve): Add process cache support.
2798 (client_request_shutdown::serve): Add process cache support.
2799 * cygsserver_process.cc: New file with the process cache support.
2800 * cygserver_shm.cc: Redefine debug_printf to allow conditional output.
2801 * cygwin.din: Export shmdt().
2802 * shm.cc: Run indent.
2803 Update FIXME's.
2804 (shmdt): New function.
2805 * include/cygwin/cygserver.h (class client_request): Add process cache support.
2806 (class client_request_get_version): Ditto.
2807 (class client_request_shutdown): Ditto.
2808 (class client_request_attach_tty): Ditto.
2809 * include/cygwin/cygserver_process.h: New header for process cache support.
2810
2811Sun Sep 30 8:52:00 2001 Robert Collins <rbtcollins@hotmail.com>
2812
2813 * include/cygwin/cygserver_transport.h: Add copyright header.
2814 * include/cygwin/cygserver_transport_pipes.h: Ditto.
2815 * include/cygwin/cygserver_transport_sockets.h: Ditto.
2816
2817Sat Sep 29 20:40:00 2001 Robert Collins <rbtcollins@hotmail.com>
2818
2819 * Makefile.in: Add cygserver_transport_sockets.o to DLL_OFILES.
2820 Add cygserver_transport_sockets_outside.o to cygserver.exe.
2821 * cygserver.cc: Include new include files.
2822 * cygserver_client.cc: Ditto.
2823 * cygserver_shm.h: No need to include <sys/socket.h> now.
2824 * cygerver_transport.cc: Include new include files.
2825 (transport_layer_base::transport_layer_base): Strip back to a stub.
2826 (transport_layer_base::listen): Ditto.
2827 (transport_layer_base::accept): Ditto.
2828 (transport_layer_base::close): Ditto.
2829 (transport_layer_base::read): Ditto.
2830 (transport_layer_base::write): Ditto.
2831 (transport_layer_base::connect): Ditto.
291be307 2832 * cygserver_transport_pipes.cc: Include new header
f449bfef
RC
2833 "cygwin/cygserver_transport_pipes.h".
2834 * cygserver_transport_sockets.cc: New file.
2835 * dcrt0.cc: No need to include <sys/socket.h> now.
2836 * fhandler_tty.cc: Ditto.
2837 * tty.cc: Ditto.
2838 * include/cygwin/cygserver_transport.h: Strip the base class to a stub.
2839 Remove the cygserver_transport_pipes class.
2840 * include/cygwin/cygserver_transport_pipes.h: New file.
2841 * include/cygwin/cygserver_transport_sockets.h: New file.
2842
2843Tue Sep 25 16:22:00 2001 Robert Collins <rbtcollins@hotmail.com>
2844
2845 * autoload.cc: Add dynamic load statement for 'ImpersonateNamedPipeClient'.
2846 * Makefile.in: Add new object files, and build instructions for cygserver.exe.
2847 * cygwin.din: Export ftok, shmat, shmctl and shmget.
2848 * dcrt0.cc: Additional includes for cygserver support.
2849 (dll_crt0_1): Initialise the cygserver client.
2850 * fhandler.h (fhandler_tty): New method cygserver_attach_tty.
2851 * fhandler_tty.cc: Additional includes for cygserver support.
2852 (fhandler_tty_slave::open): Attempt to use the cygserver when obtaining
2853 handles from the parent process. On failure or 9x use the current method.
2854 (fhandler_tty_slave::cygserver_attach_tty): New function.
2855 * fork.cc (fork_child): Fixup shm memory mapped areas.
2856 * pinfo.h: Declare fixup_shms_after_fork().
2857 * security.h: Declare alloc_sd().
2858 * tty.cc: Additonal includes to support cygserver.
2859 (tty::common_init): Don't allow others to open us if the cygserver is running.
2860 * winsup.h: Declare cygserver_running.
2861 * cygserver.cc: New file.
2862 * cygserver_client.cc: New file.
2863 * cygserver_shm.cc: New file.
2864 * cygserver_shm.h: New file.
2865 * cygserver_transport.cc: New file.
2866 * cygserver_transport_pipes.cc: New file.
2867 * ipc.cc: New file.
2868 * shm.cc: New file.
2869 * include/cygwin/cygserver.h: New file.
2870 * include/cygwin/cygserver_transport.h: New file.
2871 * include/sys/ipc.h: New file.
2872 * include/sys/shm.h: New file.
2873
062401c9
RC
28742002-02-28 Robert Collins <rbtcollins@hotmail.com>
2875
2876 * thread.cc (semaphore::TryWait): Set errno as required by posix 1003.1.
2877 (__sem_wait): Ditto.
2878 (__sem_trywait): Ditto.
2879
d1f50ae5
CF
28802002-02-27 Christopher Faylor <cgf@redhat.com>
2881
2882 * include/cygwin/version.h: Bump DLL minor number.
2883
acb56175
CV
28842002-02-23 Corinna Vinschen <corinna@vinschen.de>
2885
2886 * cygwin.din (fstat64): New symbol.
2887 (ftruncate64): Ditto.
2888 (lseek64): Ditto.
2889 (lstat64): Ditto.
2890 (mmap64): Ditto.
2891 (seekdir64): Ditto.
2892 (stat64): Ditto.
2893 (telldir64): Ditto.
2894 (truncate64): Ditto.
2895 * dir.cc (telldir64): New function.
2896 (telldir): Call telldir64().
2897 (seekdir64): New function.
2898 (seekdir): Call seekdir64().
2899 * fhandler.h: Redefine all methods using __off32_t to use __off64_t.
2900 * fhandler.cc: Use __off64_t and struct __stat64 throughout.
2901 * fhandler_clipboard.cc: Ditto.
2902 * fhandler_disk_file.cc: Ditto.
2903 * fhandler_dsp.cc: Ditto.
2904 * fhandler_floppy.cc: Ditto.
2905 * fhandler_mem.cc: Ditto.
2906 * fhandler_random.cc: Ditto.
2907 * fhandler_socket.cc: Ditto.
2908 * fhandler_tape.cc: Ditto.
2909 * fhandler_zero.cc: Ditto.
2910 * pipe.cc: Ditto.
2911 * glob.c: Ditto, call lstat64 and stat64 in Cygwin.
2912 * mmap.cc: Use __off64_t throughout.
2913 (mmap64): New function.
2914 * sec_acl.cc (acl_worker): Use struct __stat64, call stat64 and lstat64.
2915 * syscalls.cc (lseek64): New function.
2916 (stat64_to_stat32): Ditto.
2917 (fstat64): Ditto.
2918 (stat64): Ditto.
2919 (lstat64): Ditto.
2920 (ftruncate64): Ditto.
2921 (truncate64): Ditto.
2922 (_fstat): Call fstat64.
2923 (_stat): Call stat64.
2924 (cygwin_lstat): Rename to avoid declaration problem. Call lstat64.
2925 (stat_worker): Use struct __stat64.
2926 (access): Ditto.
2927 (ftruncate): Call ftruncate64.
2928 (truncate): Call truncate64.
2929 * wincap.cc: Set flag has_64bit_file_access appropriately.
2930 * wincap.h: Add flag has_64bit_file_access.
2931 * winsup.h (ILLEGAL_SEEK): Define as __off64_t.
2932 (stat_dev): Declare using struct __stat64.
2933 (stat_worker): Ditto.
2934 * include/cygwin/stat.h (struct __stat32): Define if compiling Cygwin.
2935 (struct __stat64): Ditto.
2936 (struct stat): Revert definition with explicitly sized datatypes.
2937 Eliminate sized field names.
2938 * include/cygwin/types.h (blksize_t): New type.
2939 (__blkcnt32_t): Ditto.
2940 (__blkcnt64_t): Ditto.
2941 (blkcnt_t): Ditto.
2942
083abe54
CF
29432002-02-22 Christopher Faylor <cgf@redhat.com>
2944
2945 * sync.h (new_muto): Just accept an argument which denotes the name of
2946 the muto. Use this argument to construct static storage.
2947 * cygheap.cc (cygheap_init): Reflect above change.
2948 * exceptions.cc (events_init): Ditto.
2949 * malloc.cc (malloc_init): Ditto.
2950 * path.cc (cwdstuff::init): Ditto.
2951 * cygheap.h (cwdstuff): Change name of lock element to make it less
2952 generic.
2953 * path.cc (cwdstuff::get_hash): Ditto.
2954 (cwdstuff::get_initial): Ditto.
2955 (cwdstuff::set): Ditto.
2956 (cwdstuff::get): Ditto.
2957 * sigproc.cc (proc_subproc): Ditto.
2958
2959 * debug.cc (lock_debug): Change to method. Use method rather than
2960 macro throughout.
2961
2962 * tty.h (tty_min::kill_pgrp): Declare new method.
2963 * fhandler_termios.cc (tty_min::kill_pgrp): New method.
2964 (fhandler_termios::line_edit): Use new method for killing process.
2965 * dcrt0.cc (do_exit): Ditto.
2966
2967 * dtable.cc (dtable::get_debugger_info): New method for inheriting
2968 dtable info from a debugger.
2969 * tty.cc (tty_init): Attempt to grab file handle info from parent
2970 debugger, if appropriate.
2971
2972 # dtable.cc (dtable::stdio_init): Make this a method.
2973 (dtable::init_std_file_from_handle): Don't set fd unless it's not open.
2974 (dtable::build_fhandler_from_name): Move name setting to
2975 dtable::build_fhandler.
2976 (dtable::build_fhandler): Add win32 name parameter.
2977 * dcrt0.cc (dll_crt0_1): Change to use dtable stdio_init.
2978 * dtable.h (dtable): Reflect build_fhandler parameter change.
2979 * mmap.cc (mmap_record::alloc_fh): Don't set name parameter in
2980 build_fhandler.
2981 * net.cc (fdsock): Remove set_name call since it is now handled by
2982 build_fhandler.
2983
2984 * sigproc.cc (proc_subproc): Release muto as early as possible.
2985
a6790c5f
CV
29862001-02-22 Corinna Vinschen <corinna@vinschen.de>
2987
2988 * smallprint.c (rn): Allow long long values.
2989 (__small_vsprintf): Add 'D', 'U' and 'X' formats for long long
2990 parameters.
2991
aa6df8d7
CF
29922002-02-19 Christopher Faylor <cgf@redhat.com>
2993
2994 * fhandler.cc (fhandler_base::puts_readahead): Remove default parameter
2995 setting. Newer gcc's complain about this.
2996 (fhandler_base::set_readahead_valid): Ditto.
2997 * fhandler_dsp.cc (Audio::open): Ditto.
2998 (fhandler_dev_dsp::open): Ditto.
2999
cecb74ae
CF
30002002-02-19 Christopher Faylor <cgf@redhat.com>
3001
3002 * fork.cc (fork_parent): Use sec_user_nih to control process/thread
3003 inheritance/permission.
3004 * spawn.cc (spawn_guts): Ditto.
3005 * security.cc (create_token): Initialize token so that it is not tested
3006 for bogus value later. Use sec_user to control process/thread
3007 creation.
3008 * security.h (__sec_user): Rename declaration from sec_user.
3009 (sec_user_nih): Declare here as inline function wrapper for __sec_user.
3010 (sec_user): Ditto.
3011 * sigproc.cc (czombies): Allocate a character array for zombies to
3012 avoid constructor overhead
3013 (extremely hackish, I know).
3014 (cpchildren): Ditto.
3015 (pchildren): New define.
3016 (zombies): Ditto.
3017 (getsem): Use sec_user_nih to control semaphore inheritance/permission.
3018
2bd22312
CF
30192002-02-16 Christopher Faylor <cgf@redhat.com>
3020
3021 * times.cc (hires::prime): Restore thread priority on failure
3022 condition.
3023
3024 * uinfo.cc (uinfo_init): Use more robust method for determining if
3025 process was invoked from a non-cygwin process.
3026
3027 * sync.h (muto::init): Eliminate "inheritance" parameter.
3028 (new_muto): Reflect removal of parameter.
3029 * sync.cc (muto::init): Ditto.
3030 * cygheap.cc (cygheap_init): Ditto.
3031 * debug.cc (threadname_init): Ditto.
3032 * exceptions.cc (events_init): Ditto.
3033 * malloc.cc (malloc_init): Ditto.
3034 * path.cc (cwdstuff::init): Ditto.
3035 * sigproc.cc (sigproc_init): Ditto.
3036
4c761646
CF
3037 * grp.cc (group_lock): Use different method for locking with static
3038 member.
2bd22312 3039 (read_etc_group): REALLY ensure that read lock mutex is released.
4c761646
CF
3040 * passwd.cc (passwd_lock): Use different method for locking with static
3041 member.
3042 (read_etc_passwd): REALLY ensure that read lock mutex is released.
2bd22312
CF
3043
3044 * shared.cc (sec_user): Correct reversed inheritance test.
3045
60b68f0d
CF
30462002-02-15 Christopher Faylor <cgf@redhat.com>
3047
3048 * hires.h (hires::usecs): Rename from utime. Accept an argument.
3049 * strace.cc (strace::microseconds): Use hires class for calculating
3050 times.
3051 * sync.h (new_muto): Use NO_COPY explicitly in declaration.
3052 * times.cc (gettimeofday): Reflect change in usecs argument.
3053 (hires::usecs): Ditto. Changed name from utime.
3054 * winsup.h (NO_COPY): Add nocommon attribute to force setting aside
3055 space for variable.
3056 * regcomp.c (REQUIRE): Add a void cast to bypass a warning.
3057
dce87b21
CF
30582002-02-15 Christopher Faylor <cgf@redhat.com>
3059
3060 * hires.h: New file.
3061 * times.cc (gettimeofday): Use hires class for calculating current time.
3062 (hires::prime): New method.
3063 (hires::utime): Ditto.
3064
3d456520
CF
30652002-02-14 Christopher Faylor <cgf@redhat.com>
3066
3067 * include/sys/cygwin.h (cygwin_getinfo_types): New CW_STRACE_ACTIVE.
3068 * external.cc (cygwin_internal): Handle CW_STRACE_ACTIVE.
3069
907dc7d0
CF
30702002-02-14 Christopher Faylor <cgf@redhat.com>
3071
3072 * exceptions.cc (unused_sig_wrapper): Eliminate unused parameter to
3073 asm.
3074 * external.cc (cygwin_internal): Change CW_STRACE_ON to
3075 CW_STRACE_TOGGLE.
3076 * strace.cc (strace::hello): Toggle strace on and off.
3077 * sync.cc (muto::init): Renamed from constructor.
3078 * sync.h (muto::new): Delete.
3079 (muto::delete): Ditto.
3080 (new_muto): Simplify. Use muto.init for nearly everything.
3081 * uinfo.cc (uinfo_init): Avoid closing a NULL handle.
3082 * include/sys/cygwin.h (cygwin_getinfo_types): Rename CW_STRACE_OFF to
3083 CW_STRACE_TOGGLE. Delete CW_STRACE_OFF.
3084 * include/sys/strace.h (strace): Add "inited" field.
3085
4753a17b
CV
30862001-02-12 Corinna Vinschen <corinna@vinschen.de>
3087
3088 * include/cygwin/acl.h: Fix definition of aclent_t.
3089
909acaf6
CF
30902002-02-10 Christopher Faylor <cgf@redhat.com>
3091
3092 * Makefile.in (DLL_OFILES): Consolidate object files.
3093
de4e0d30
CV
30942002-02-10 Corinna Vinschen <corinna@vinschen.de>
3095
b31c68c4
CV
3096 * child_info.h, cygheap.h, fhandler_clipboard.cc, fhandler_dsp.cc,
3097 fhandler_floppy.cc, fhandler_mem.cc, fhandler_random.cc,
3098 fhandler_tape.cc, fhandler_zero.cc, grp.cc, mmap.cc, passwd.cc,
3099 pinfo.cc, pinfo.h, pipe.cc, sec_acl.cc, sec_helper.cc, security.cc,
3100 security.h, thread.h, uinfo.cc, include/cygwin/acl.h: Fix copyright.
3101
31022002-02-10 Corinna Vinschen <corinna@vinschen.de>
3103
3104 * child_info.h, cygheap.h, dcrt0.cc, dir.cc, fhandler.cc, fhandler.h,
de4e0d30
CV
3105 fhandler_clipboard.cc, fhandler_disk_file.cc, fhandler_dsp.cc,
3106 fhandler_floppy.cc, fhandler_mem.cc, fhandler_random.cc,
3107 fhandler_tape.cc, fhandler_zero.cc, grp.cc, mmap.cc, passwd.cc,
3108 pinfo.cc, pinfo.h, pipe.cc, sec_acl.cc, sec_helper.cc, security.cc,
b31c68c4 3109 security.h, spawn.cc, syscalls.cc, thread.h, uinfo.cc, winsup.h:
de4e0d30
CV
3110 Change usage of uid_t to __uid16_t, gid_t to __gid16_t and
3111 off_t to __off32_t throughout. Use INVALID_UID, INVALID_GID and
3112 INVALID_SEEK instead casting -1 to the appropriate type.
3113 * winsup.h: Define INVALID_UID, INVALID_GID and INVALID_SEEK.
3114 * include/cygwin/acl.h: Define internal __aclent16_t and __aclent32_t
3115 types. Don't declare acl functions when compiling Cygwin.
3116 * include/cygwin/grp.h: Declare getgrgid() and getgrnam() with
3117 correct types for internal usage.
3118
39b553b8
CV
31192002-02-10 Corinna Vinschen <corinna@vinschen.de>
3120
3121 Patch suggested by Pierre A. Humblet <Pierre.Humblet@ieee.org>:
3122 * uinfo.cc (internal_getlogin): Try evaluating user by SID even if
3123 ntsec is off.
3124 (uinfo_init): Set primary group even if ntsec is off.
3125
52296b85
CV
31262002-02-09 Corinna Vinschen <corinna@vinschen.de>
3127
3128 * include/cygwin/grp.h: New file.
3129 * include/cygwin/stat.h: Ditto.
3130 * include/cygwin/types.h: Add definitions for __off32_t,
3131 __off64_t, off_t, __uid16_t, __uid32_t, uid_t, __gid16_t,
3132 __gid32_t and gid_t.
3133 * include/sys/cygwin.h: Use correct uid and gid types.
3134
ff86860b
CV
31352002-02-09 Corinna Vinschen <corinna@vinschen.de>
3136
3137 * dtable.cc (dtable::dup2): Revert previous patch.
3138 * fhandler.h: Ditto.
3139 (fhandler_socket::recv): Define new method.
3140 (fhandler_socket::send): Ditto.
3141 * fhandler_socket.cc (fhandler_socket::recv): New method.
3142 (fhandler_socket::send): Ditto.
3143 (fhandler_socket::read): Call fhandler_socket::recv() now.
3144 (fhandler_socket::write): Call fhandler_socket::send() now.
3145 * net.cc (class wsock_event): Move definition to wsock_event.h.
3146 (fdsock): Revert previous patch.
3147 (cygwin_recv): Move implementation to fhandler_socket::recv().
3148 (cygwin_send): Move implementation to fhandler_socket::send().
3149 * wsock_event.h: New file.
3150
d0672acc
CV
31512002-02-06 Alexander Gottwald <Alexander.Gottwald@s1999.tuchemnitz.de>
3152
3153 * net.cc (get_2k_ifconf): Create interface entries for tokenring cards.
3154
fae28904
CV
31552002-02-08 Corinna Vinschen <corinna@vinschen.de>
3156
3157 * dtable.cc (dtable::dup2): Store fd for fhandler_socket.
3158 * fhandler.h (fhandler_base::set_fd): New virtual method.
3159 (fhandler_base::get_fd): Ditto.
3160 (fhandler_socket::set_fd): Ditto.
3161 (fhandler_socket::get_fd): Ditto.
3162 * fhandler_socket.cc (fhandler_socket::read): Call cygwin_recv instead
3163 of native Winsock recv.
3164 (fhandler_socket::write): Call cygwin_send instead of native Winsock
3165 send.
3166 * net.cc (fdsock): Store fd in fhandler_socket.
3167
1f64102f
CV
31682002-02-07 Corinna Vinschen <corinna@vinschen.de>
3169
3170 * net.cc (cygwin_getsockname): Fix handling of NULL sun_path.
3171
562d9745
CV
31722002-01-29 Corinna Vinschen <corinna@vinschen.de>
3173
3174 * net.cc (getdomainname): Fix registry key for 9x systems, too.
3175
94ee02fa
CV
31762002-01-29 Corinna Vinschen <corinna@vinschen.de>
3177
3178 * net.cc (getdomainname): Fix registry key for NT systems.
3179
494a66d9
CF
31802002-01-28 Christopher Faylor <cgf@redhat.com>
3181
3182 * external.cc (cygwin_internal): Initialize various internal settings
3183 if required to allow use of some things from user loaded DLL.
3184 (CW_STRACE_ON): Add new feature.
3185 (CW_CYGWIN_PID_TO_WINPID): Ditto.
3186 * pinfo.cc (set_myself): Call "strace.hello" to initiate possible
3187 strace session.
3188 (pinfo::init): Guard against dereferencing uninitialized myself.
3189 * sigproc.cc (wait_sig): Call strace.hello() when __SIGTRACE "signal"
3190 received.
3191 * strace.cc (strace::hello): New method.
3192 * wincap.cc (wincapc::init): Avoid initializing if already initialized.
3193 * wincap.h (wincapc::wincapc): New method.
3194 * include/sys/cygwin.h: Add new CW_ enums. Kludge typedefs of
3195 {g,u}id_t if required.
3196 * strace.h (strace::hello): Declare new method.
3197
6616e6cf
CF
31982002-01-28 Earnie Boyd <earnie@users.sf.net>
3199
3200 * include/sys/strace.h (_STRACE_ON): Define.
3201 (_STRACE_OFF): Ditto.
3202
dfb4c347
CF
32032002-01-24 Christopher Faylor <cgf@redhat.com>
3204
3205 * speclib: Ensure that temporary def file is removed.
3206
3c07fbeb
CF
32072002-01-23 Christopher Faylor <cgf@redhat.com>
3208
3209 * speclib: Use rm -f to remove temp file just to quiet any potential
3210 warnings.
3211
f6fc31e1
CV
32122002-01-23 Corinna Vinschen <corinna@vinschen.de>
3213
3214 * security.cc (create_token): Use sec_user() to create
be6d8567
CV
3215 SECURITY_ATTRIBUTES structure for primary token. Use
3216 MAXIMUM_ALLOWED access rights instead of TOKEN_ALL_ACCESS.
f6fc31e1 3217
adbd01af
CV
32182002-01-23 Corinna Vinschen <corinna@vinschen.de>
3219
3220 * path.cc (symlink): Fix check for already existing file.
3221
aed69a5b
CF
32222002-01-21 Christopher Faylor <cgf@redhat.com>
3223
3224 * cygmagic: Suppress error output when figuring out if sum takes an
3225 option.
3226
f3647dd7
CF
32272002-01-21 Christopher Faylor <cgf@redhat.com>
3228
3229 * cygmagic: Attempt to figure out if sum takes an option.
3230
51076b73
CF
32312002-01-21 DJ Delorie <dj@redhat.com>
3232
3233 * Makefile.in (libpthread.a): Pass the assembler also.
291be307 3234 (libm.a): Ditto.
51076b73
CF
3235 (libc.a): Ditto.
3236 * speclib: Specify the assembler to dlltool.
3237
0ac2abea
CF
32382002-01-21 Christopher Faylor <cgf@redhat.com>
3239
3240 * include/cygwin/version.h: Bump DLL minor number.
3241
ac11ec88
CV
32422002-01-21 Corinna Vinschen <corinna@vinschen.de>
3243
28982aa8 3244 * grp.cc (getgrgid): Don't return default gid entry when ntsec is on.
ac11ec88
CV
3245 * syscalls.cc (setegid): Don't set primary group in process token.
3246
8ef47135
CF
32472002-01-21 Christopher Faylor <cgf@redhat.com>
3248
3249 * speclib: Don't use /dev/null as DLL name. Just default to what's
3250 already in .def file.
3251
32522002-01-21 Christopher Faylor <cgf@redhat.com>
3253
3254 * exceptions.cc (sig_handle): Remove last vestiges of SA_NOCLDSTOP code
3255 which caused SIGCHLD to be ignored.
3256
07cc1f1f
CF
32572002-01-20 Christopher Faylor <cgf@redhat.com>
3258
3259 * include/cygwin/version.h: Bump DLL minor number.
3260
385437d4
CF
32612002-01-20 Christopher Faylor <cgf@redhat.com>
3262
3263 * syscalls.cc (regfree): Make dll_export.
3264
d7c16d8d
CF
32652002-01-20 Christopher Faylor <cgf@redhat.com>
3266
3267 * exceptions.cc (ctrl_c_handler): Convert windows pid to cygwin pid
3268 when detecting if we should actually handle CTRL-C.
3269
216109a8
CF
32702002-01-19 Christopher Faylor <cgf@redhat.com>
3271
3272 * Makefile.in (new-cygwin1.dll): Revert previous change. libsupc++.a
3273 is only available in libstdc++-v3.
3274
9e73b339
CF
32752002-01-19 Christopher Faylor <cgf@redhat.com>
3276
3277 * exceptions.cc (sig_handle_tty_stop): Don't send SIGCHLD if parent
3278 doesn't want it.
3279 (sig_handle): Don't check for SA_NOCLDSTOP here. We don't have enough
3280 information.
3281
5946622e
CF
32822002-01-19 Christopher Faylor <cgf@redhat.com>
3283
3284 * include/cygwin/version.h: Bump DLL minor number.
3285
994fe87b
CF
32862002-01-19 Christopher Faylor <cgf@redhat.com>
3287
3288 * Makefile.in (new-cygwin1.dll): Just use -lsupc++ for link.
3289 * sigproc.cc (proc_exists): Change existence criteria.
3290 * sync.h (new_muto): Add volatile to definition to avoid gcc
3291 optimization problems.
3292
df3af773
CV
32932002-01-19 Corinna Vinschen <corinna@vinschen.de>
3294
3295 * include/cygwin/version.h: Bump API minor version to 51.
3296
7d6be0d6
CV
32972002-01-19 Mark Bradshaw <bradshaw@staff.crosswalk.com>
3298
291be307
CF
3299 * cygwin.din: Add recvmsg and sendmsg.
3300 * net.cc: Add cygwin_recvmsg and cygwin_sendmsg.
3301 * /usr/include/sys/socket.h: Add recvmsg and sendmsg.
7d6be0d6 3302
2d3dab2e
CV
33032002-01-19 Corinna Vinschen <corinna@vinschen.de>
3304
3305 * security.cc (create_token): Close processes token handle as soon
3306 as it's not used anymore.
3307
104c3be6
CV
33082002-01-17 Corinna Vinschen <corinna@vinschen.de>
3309
3310 * Makefile.in: Add fnmatch.o to DLL_OFILES.
3311 * cygwin.din: Add fnmatch export symbol.
3312 * fnmatch.c: New file.
3313 * include/fnmatch.h: Ditto.
3314 * include/cygwin/version.h: Bump API minor version to 50.
3315
9a7e1562
CV
33162002-01-15 Corinna Vinschen <corinna@vinschen.de>
3317
3318 * path.cc (fchdir): Call chdir with full windows path.
3319
7eddac1b
CV
33202002-01-14 Corinna Vinschen <corinna@vinschen.de>
3321
3322 * dir.cc: Use INVALID_FILE_ATTRIBUTES instead of "(DWORD) -1"
3323 for file attributes throughout.
3324 * fhandler.cc: Ditto.
3325 * fhandler_disk_file.cc: Ditto.
3326 * path.cc: Ditto.
3327 * path.h: Ditto.
3328 * syscalls.cc: Ditto.
3329 * times.cc (utimes): Use path_conv::isdir() instead of explicit
3330 GetFileAttributes() call.
3331
5daa0835
CF
33322002-01-13 Christopher Faylor <cgf@redhat.com>
3333
3334 * dcrt0.cc (multiple_cygwin_problem): Clarify logic and make
3335 CYGWIN_MISMATCH_OK more powerful.
3336
06486d9e
CF
33372002-01-10 Christopher Faylor <cgf@redhat.com>
3338
3339 * exceptions.cc (sig_handle): Accept a second argument indicating
3340 whether the signal came from this process or not.
3341 * sigproc.h: Reflect sig_handle arg change.
3342 * signal.cc (kill_pgrp): Add sigframe info.
3343 (abort): New function. Eliminates newlib function of same name.
3344 * sigproc.cc (wait_sig): Pass "signal from this process" value as arg
3345 2.
3346
bb5225c2
CV
33472002-01-10 Corinna Vinschen <corinna@vinschen.de>
3348
3349 * syscalls.cc (pathconf): Guard _PC_PATH_MAX branch against invalid
3350 file parameter.
3351
c0a8e8d0 33522002-01-09 Christopher Faylor <cgf@redhat.com>
291be307 3353 Robert Collins <rbtcollins@hotmail.com>
c0a8e8d0
CF
3354
3355 * exceptions.cc (early_stuff_init): Rename from misnamed
3356 set_console_handler.
3357 (ctrl_c_handler): Attempt to work around potential signal duplication
3358 during process startup.
3359 (sig_handle): Ignore SIGINT when we're just an "exec stub".
3360 * spawn.cc (spawn_guts): Store pid of spawned process in global for use
3361 by ctrl_c_handler.
3362 * dcrt0.cc (dll_crt0_1): Call renamed initialization function.
3363 * winsup.h: Reflect function name change.
3364
fe37dd79
CV
33652002-01-08 Corinna Vinschen <corinna@vinschen.de>
3366
3367 * net.cc (cygwin_accept): Set sun_path for newly connected socket.
3368
cbf7a9eb
CF
33692002-01-07 Ralf Habacker <Ralf.Habacker@freenet.de>
3370
3371 * Makefile.in: Add uninstall target.
3372
a2e12d0c
CF
33732002-01-07 Christopher Faylor <cgf@redhat.com>
3374
3375 * sigproc.cc (getsem): Clean up debugging output.
3376
4a08cbfe
CF
33772002-01-07 Christopher Faylor <cgf@redhat.com>
3378
3379 * sigproc.cc (getsem): Set errno when unable to create own semaphore.
3380 Reorganize to make clearer that error should only come from initial
3381 creation of process semaphore.
3382
10dedaaa
CF
33832002-01-06 Christopher Faylor <cgf@redhat.com>
3384
3385 * dtable.cc (dtable::init_std_file_from_handle): Add some defensive
3386 code to invalid handle case.
3387
d6154fb7
CV
33882002-01-06 Corinna Vinschen <corinna@vinschen.de>
3389
3390 * ioctl.cc (ioctl): Make third argument optional.
3391 * include/sys/ioctl.h: Ditto in declaration.
3392 * dtable.cc (dtable::init_std_file_from_handle): Revert previous
3393 bogus patch.
3394 * window.cc (WndProc): Raise SIGURG instead of SIGIO in case of FD_OOB
3395 message.
3396
9125cbd7 33972002-01-05 Christopher Faylor <cgf@redhat.com>
fcb76c5d 3398
9125cbd7
CF
3399 * dir.cc (opendir): Guarantee release of alloced fhandler structure on
3400 error.
fcb76c5d 3401
9125cbd7
CF
34022002-01-05 Corinna Vinschen <corinna@vinschen.de>
3403
3404 * exceptions.cc (sig_handle): Set default action for SIGURG to SIG_IGN.
3405
34062002-01-05 Corinna Vinschen <corinna@vinschen.de>
2edba236
CV
3407
3408 * dtable.cc (dtable::init_std_file_from_handle): Don't treat NULL
3409 handle as errorneous.
3410
acf05df7
CF
34112002-01-04 Christopher Faylor <cgf@redhat.com>
3412
3413 * cygmagic: Change logic for equality test.
3414
7acba971
CF
34152002-01-04 Christopher Faylor <cgf@redhat.com>
3416
3417 * dir.cc (opendir): Don't attempt to call sub-opendir if ENOENT.
3418
9125cbd7 34192002-01-04 Corinna Vinschen <corinna@vinschen.de>
dc63cea5
CV
3420
3421 * net.cc: Replace usage of AF_UNIX by Posix compliant AF_LOCAL
3422 throughout.
3423 (socketpair): Explicitly allow SOCK_STREAM and SOCK_DGRAM socket types
3424 in families AF_UNIX and AF_LOCAL. Explicitly allow PF_UNSPEC, PF_LOCAL
3425 and PF_INET protocols. Return error otherwise. Implement datagram
3426 socketpairs.
3427
3b789217
CF
34282002-01-01 Christopher Faylor <cgf@redhat.com>
3429
291be307 3430 * speclib: Remove temp files automatically.
3b789217 3431
2fe27909 34322002-01-01 Corinna Vinschen <corinna@vinschen.de>
2fe27909
CV
3433 * fhandler.h (fhandler_socket::sun_path): New private member.
3434 (fhandler_socket::set_sun_path): New method.
3435 (fhandler_socket::get_sun_path): Ditto.
3436 * fhandler_socket.cc (fhandler_socket::fhandler_socket): Initialize
3437 sun_path to NULL.
3438 (fhandler_socket::~fhandler_socket): Free sun_path if needed.
3439 (fhandler_socket::set_sun_path): New method.
3440 * net.cc (cygwin_bind): Set sun_path to path of local socket file.
3441 (cygwin_getsockname): Add code to return correct sockaddr for unix
3442 domain sockets.
This page took 0.403058 seconds and 5 git commands to generate.