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