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