]> sourceware.org Git - newlib-cygwin.git/blame - winsup/cygwin/ChangeLog
* include/tchar.h (_tfdopen): Correct typo.
[newlib-cygwin.git] / winsup / cygwin / ChangeLog
CommitLineData
667f875d
CF
12002-07-26 Christopher Faylor <cgf@redhat.com>
2
3 * include/cygwin/version.h: Bump API version to indicate that ntsec is
4 on by default now.
5
6b3c247d
CF
62002-07-26 Conrad Scott <conrad.scott@dsl.pipex.com>
7
8 * fhandler_registry.cc (fhandler_registry::close): Return any error
9 result to the caller.
10 * syscalls.cc (_close): Return result of fhandler::close to the caller.
11
68fb3cca
CF
122002-07-25 Christopher Faylor <cgf@redhat.com>
13
14 * security.cc (allow_ntsec): Default to on.
15 (allow_smbntsec): Default to off.
16
be18721e
CF
172002-07-24 David MacMahon <davidm@smartsc.com>
18
19 * times.cc (to_time_t): Always round time_t down to nearest second.
20
b9e8058d
ED
212002-07-25 Egor Duda <deo@logos-m.ru>
22
23 * Makefile.in: Check if API version is updated when exports are
24 changed and stop if not so.
25
bf47141f
CV
262002-07-24 Egor Duda <deo@logos-m.ru>
27
28 * include/cygwin/version.h: Bump minor API version.
29
0a73fce0
CV
302002-07-24 Corinna Vinschen <corinna@vinschen.de>
31
32 * fhandler_serial.cc: Change 'must_init_serial_line capability'
33 to 'supports_reading_modem_output_lines' throughout (negated meaning).
34 * wincap.cc: Ditto.
35 * wincap.h: Ditto.
36
f72a851f
CV
372002-07-23 Nicholas Wourms <nwourms@netscape.net>
38
39 * cygwin.din (fcloseall): Add symbol for export.
40 (fcloseall_r): Ditto.
41
99138976
CF
422002-07-24 Christopher Faylor <cgf@redhat.com>
43
44 * path.cc (path_conv::check): Always set fileattr when component == 0.
45 (readlink): Use path_conv method rather than field.
46 * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Ditto,
47 throughout.
48 * path.h (path_conv): Make fileattr private.
49 * exceptions.cc (try_to_debug): Default to idle priority when looping.
50
010bb8a4
CV
512002-07-23 Corinna Vinschen <corinna@vinschen.de>
52
53 * fhandler_serial.cc: Use must_init_serial_line capability throughout.
54 * wincap.cc: Set flag must_init_serial_line appropriately.
55 * wincap.h: Add flag must_init_serial_line.
56
fdb93cd2
CV
572002-07-23 Corinna Vinschen <corinna@vinschen.de>
58
59 * security.cc (get_group_sidlist): Create group list from /etc files
60 even if DC is available but access fails.
61
08e2551c
CF
622002-07-22 Christopher Faylor <cgf@redhat.com>
63
64 * fhandler_serial.cc: Fix formatting problems introduced by below
65 changes.
66
780c42b4
CV
672002-07-22 Jacek Trzcinski <jacek@certum.pl>
68
08e2551c
CF
69 * fhandler.h (class fhandler_serial): Add new members of the class -
70 rts,dtr and method ioctl(). Variables rts and dtr important for Win 9x
71 only.
72 * fhandler_serial.cc (fhandler_serial::open): Add initial setting of
73 dtr and rts. Important for Win 9x only.
74 (fhandler_serial::ioctl): New function. Implements commands TIOCMGET,
780c42b4
CV
75 TIOCMSET and TIOCINQ.
76 (fhandler_serial::tcflush): Fixed found error.
08e2551c 77 (fhandler_serial::tcsetattr): Add settings of rts and dtr. Important
780c42b4 78 for Win 9x only.
08e2551c
CF
79 * termios.h: Add new defines as a support for ioctl() function on
80 serial device.
780c42b4 81
5ec1dcc5
CF
822002-07-20 Christopher Faylor <cgf@redhat.com>
83
84 * autoload.cc (LoadDLLprime): Add jmp call to allow streamlining of
85 later jmp rewrite.
86 (doit): Avoid use of cx register. Just change one word to avoid races.
87
095a1272
CV
882002-07-18 Pierre Humblet <pierre.humblet@ieee.org>
89
90 * security.cc (get_unix_group_sidlist): Create.
91 (get_supplementary_group_sidlist): Evolve into get_unix_group_sidlist.
92 (get_user_local_groups): Add check for duplicates.
93 (get_user_primary_group): Suppress.
94 (get_group_sidlist): Silently ignore PDC unavailability.
95 Call get_unix_group_sidlist() before get_user_local_groups().
96 Remove call to get_supplementary_group_sidlist(). Never call
97 get_user_primary_group() as the passwd group is always included.
98 Add well_known_authenticated_users_sid in only one statement.
99
86620e8f
CF
1002002-07-19 Christopher Faylor <cgf@redhat.com>
101
102 * fhandler_serial.cc (fhandler_serial::tcflush): Fix typo.
103
315fb3af
CV
1042002-07-15 Corinna Vinschen <corinna@vinschen.de>
105
106 * security.cc (get_group_sidlist): Fix formatting.
107
56a42791
CF
1082002-07-14 Christopher Faylor <cgf@redhat.com>
109
110 * dcrt0.cc (initial_env): Force path and CYGWIN_DEBUG contents to lower
111 case.
112 * exceptions.cc (error_start_init): Use the name derived from
113 GetModuleName rather than myself->progname.
114
3d0ba393
CF
1152002-07-14 Christopher Faylor <cgf@redhat.com>
116
117 * dcrt0.cc (dll_crt0_1): Move debug_init call back to here. Avoid a
118 compiler warning.
119 * shared.cc (memory_init): Remove debug_init call.
120 * debug.h (handle_list): Change "clexec" to "inherited".
121 * debug.cc: Remove a spurious declaration.
122 (setclexec): Conditionalize away since it is currently unused.
123 (add_handle): Use inherited field rather than clexec.
124 (debug_fixup_after_fork_exec): Ditto. Move debugging output to
125 delete_handle.
126 (delete_handle): Add debugging output.
127 * fhandler.cc (fhandler_base::set_inheritance): Don't bother setting
128 inheritance in debugging table since the handle was never protected
129 anyway.
130 (fhandler_base::fork_fixup): Ditto.
131
132 * exceptions.cc (debugger_command): Revert.
133
f5c3d180
CF
1342002-07-14 Conrad Scott <conrad.scott@dsl.pipex.com>
135
136 * debug.cc (clexec): Add missing `hl = hl->next'.
137
e8a6396f
CF
1382002-07-14 Christopher Faylor <cgf@redhat.com>
139
140 * Makefile.in (cygrun.exe): Add a -lcygwin on the end.
141
fea4c29f
CF
1422002-07-14 Christopher Faylor <cgf@redhat.com>
143
144 * Makefile.in (cygserver.exe): Add -lstdc++.
145 (cygrun.exe): Move -lgcc last.
146
c03dba93
CF
1472002-07-13 Christopher Faylor <cgf@redhat.com>
148
149 * dcrt0.cc (dll_crt0_1): Delay closing of some handles until cygheap
150 has been set up.
151 (break_here): New function, for debugging.
152 (initial_env): Add program name to "Sleeping" message. Implement new
153 "CYGWIN_DEBUG" environment variable option.
154 * exceptions.cc (debugger_command): Add argument to dumper call.
155 * strace.cc (strace::hello): Use winpid if cygwin pid is unavailable.
156 (strace::vsprntf): Ditto.
157
0301bfd0
CF
1582002-07-13 Christopher Faylor <cgf@redhat.com>
159
160 * debug.h (handle_list): Move here from debug.cc. Add "inherit" flag
161 functionality.
162 * cygheap.cc (init_cheap): Move cygheap_max calculation to _csbrk.
163 (_csbrk): Reorganize to not assume first allocation is <= 1 page.
164 (cygheap_setup_for_child): Mark protected handle as inheritable.
165 * cygheap.h (cygheap_debug): New struct.
166 (init_cygheap): Add new structure when debugging.
167 * dcrt0.cc (dll_crt0_1): Remove call to debug_init. Close ppid_handle
168 here, if appropriate. Don't protect subproc_ready, since it is already
169 protected in the parent. Call memory_init prior to ProtectHandle to
170 ensure that cygheap is set up. Call debug_fixup_after_fork_exec when
171 appropriate.
172 (_dll_crt0): Don't close ppid_handle here.
173 * debug.cc: Use cygheap debug structure rather than static elements
174 throughout.
175 (add_handle): Don't issue a warning if attempt to protect handle in
176 exactly the same way from exactly the same place. Add pid info to
177 warning output. Accept additional argument controlling whether handle
178 is to be inherited. Add pid to stored information.
179 (debug_fixup_after_fork_exec): Renamed from debug_fixup_after_fork.
180 Reorganize to avoid erroneously skipping handles.
181 (mark_closed): Add pid info to warning output.
182 (setclexec): Rename from setclexec_pid.
183 * fhandler.cc (fhandler_base::get_default_fmode): Minor reorg.
184 (fhandler_base::fstat): Add debugging output.
185 (fhandler_base::set_inheritance): Call setclexec rather than
186 setclexec_pid.
187 (fhandler_base::fork_fixup): Ditto.
188 * fhandler_console.cc (get_tty_stuff): Mark protected handle as
189 inheritable.
190 * fhandler_tty.cc (fhandler_tty_slave::open): Ditto.
191 * tty.cc (tty::make_pipes): Ditto.
192 (tty::common_init): Ditto.
193 * fork.cc (fork_parent): Ditto.
194 (fork_child): Close protected handles with correct name. Remove
195 debug_fixup_after_fork call.
196 * fhandler_socket.cc (fhandler_socket::create_secret_event): Mark
197 protected handle as inheritable/non-inheritable, as appropriate.
198 * shared.cc (memory_init): Mark protected handle as inheritable.
199 Call debug_init here.
200 * sigproc.cc (wait_sig): Close protected handle with correct name.
201 * spawn.cc (spawn_guts): Rename spr to subproc_ready and mark it as
202 inheritable.
203
204 * exceptions.cc (debugger_command): Try to run dumper.exe, if found.
205
206 * syscalls.cc (fstat64): Don't follow symlinks for path_conv lookup
207 since path is already resolved.
208
e82f98d0
CF
2092002-07-12 Christopher Faylor <cgf@redhat.com>
210
37f7c64b 211 * cygwin.din: Change erroneous entries.
e82f98d0 212
472a8223
CV
2132002-07-11 Pavel Tsekov <ptsekov@gmx.net>
214
215 * fhandler_disk_file.cc (fhandler_disk_file::open): Don't
216 move the file pointer to the end of file if O_APPEND is
217 specified in the open flags.
218
1f5ff387
CF
2192002-07-09 Christopher Faylor <cgf@redhat.com>
220
221 * debug.cc: Avoid explicit zeroing of globals.
222 (lock_debug): Make locker a static member. Avoid unlocking when
223 already unlocked (from Conrad Scott).
224 (debug_init): Initialize lock_debug::locker here.
225 * fork.cc (fork_child): Fix up fdtab earlier to avoid some (but not
226 all) confusion with close-on-exec craziness.
227
6bb769ef
CV
2282002-07-05 Corinna Vinschen <corinna@vinschen.de>
229
230 * fhandler.h (fhandler_socket::is_unconnected): Constify.
231 (fhandler_socket::is_connect_pending): Ditto.
232 (fhandler_socket::is_connected): Ditto.
233 (fhandler_socket::set_connect_state): New method.
234 (struct select_record): Add member `except_on_write'.
235 (select_record::select_record): Initialize all bool values to `false'.
236 * fhandler_socket.cc: Use set_connect_state() method throughout.
237 (fhandler_socket::connect): Set state always to connected if connection
238 isn't pending.
239 * net.cc (cygwin_getsockopt): Revert erroneous previous patch.
240 * select.cc (set_bits): Check for `except_on_write'. Set fd in
241 write_fds if set. Set connect state to connected if fd has been
242 returned by WINSOCK_SELECT.
243 (peek_socket): Check for `except_on_write'.
244 (start_thread_socket): Ditto.
245 (fhandler_socket::select_write): Don't set `write_ready' if connect
246 is pending. Set `except_on_write' if connect is pending.
247
91a2f87b
CF
2482002-07-05 Christopher Faylor <cgf@redhat.com>
249
250 * ntdll.h (_SYSTEM_PROCESSOR_TIMES): Force eight byte alignment.
251 (_SYSTEM_TIME_OF_DAY_INFORMATION): Ditto.
252
6201dd26
CF
253 * path.cc (suffix_scan::has): Reorganize to eliminate double scanning
254 for for .exe (in the typical case).
255
d5591d9d
CV
2562002-07-05 Corinna Vinschen <corinna@vinschen.de>
257
258 * fhandler.h (UNCONNECTED): New define.
259 (CONNECT_PENDING): Ditto.
260 (CONNECTED): Ditto.
261 (class fhandler_socket): Add member `had_connect_or_listen'.
262 Add member functions `is_unconnected', `is_connect_pending' and
263 `is_connected'.
264 * fhandler_socket.cc (fhandler_socket::connect): Set member
265 `had_connect_or_listen' according to return code of WinSock
266 call.
267 (fhandler_socket::listen): Ditto.
268 * net.cc (cygwin_getsockopt): Modify SO_ERROR return value in
269 case of socket with pending connect().
270 * select.cc (peek_socket): Only add socket to matching fd_set
271 if it's not "ready". Call WINSOCK_SELECT only if at least one
272 socket is in one of the fd_sets.
273 (start_thread_socket): Only add socket to matching fd_set
274 if it's not "ready".
275 (fhandler_socket::select_write): Set write_ready to true also
276 if socket isn't connected or listening.
277
5cff62d6
CV
2782002-07-04 Corinna Vinschen <corinna@vinschen.de>
279
280 * fhandler_socket.cc (fhandler_socket::set_sun_path): Don't free
281 memory here. Allow NULL parameter.
282
e4894708
CV
2832002-07-04 Corinna Vinschen <corinna@vinschen.de>
284
285 * fhandler_socket.cc (fhandler_socket::dup): Add missing copy operation
286 on sun_path.
287
073aa681
CF
2882002-07-03 Christopher Faylor <cgf@redhat.com>
289
290 * include/cygwin/version.h: Bump DLL minor number.
291
a0ee9f75
CF
2922002-07-03 Christopher Faylor <cgf@redhat.com>
293
294 * include/sys/statfs.h: New header file.
295
58b43c8d
CF
2962002-07-03 Christopher Faylor <cgf@redhat.com>
297
298 * dtable.cc (cygwin_attach_handle_to_fd): Default to implicit bin mode
299 if none specified.
300 * fhandler.cc (fhandler_base::init): Make bin argument a guarantee
301 rather than a suggestion.
302 * path.cc (path_conv::check): Load flag returned from
303 cygwin_conv_to_win32_path into path_flags.
304
bd86408f
CS
3052002-07-03 Conrad Scott <conrad.scott@dsl.pipex.com>
306
307 * tty.cc (tty::common_init): Reverse logic of cygserver check in
308 call to SetKernelObjectSecurity.
309
3c6bd991
CV
3102002-07-03 Thomas Pfaff <tpfaff@gmx.net>
311
312 * autoload.cc (WSAEventSelect): Define new autoload function.
313 (WSAEnumNetworkEvents): Ditto.
314 * fhandler_socket.cc (fhandler_socket::accept): If socket is
315 in blocking mode wait for incoming connection and signal.
316
45586380
CF
3172002-07-02 Christopher Faylor <cgf@redhat.com>
318
319 * cygheap.cc (init_cheap): Rearrange error message.
320 (cygheap_fixup_in_child): Ditto.
321 * dtable.cc: Remove if 0'ed code.
322 * fhandler_dsp.cc (fhandler_dev_dsp::open): Force binmode.
323 * sec_helper.cc (cygsid::get_id): Use system_printf for error message.
324 * tty.cc (tty::common_init): Ditto.
325
5d230174
CF
3262002-07-02 Christopher Faylor <cgf@redhat.com>
327
328 * net.cc (cygwin_getpeername): Defend against NULL pointer dereference.
329
b7e51146
CV
3302002-07-02 Egor Duda <deo@logos-m.ru>
331
332 * include/cygwin/version.h: Bump API minor version.
333
891bb974
CV
3342002-07-01 Pierre Humblet <pierre.humblet@ieee.org>
335
336 * security.cc (get_logon_server): Interpret a zero length
337 domain as the local domain.
338 (get_group_sidlist): Add authenticated users SID to SYSTEM's group
339 list instead of SYSTEM itself.
340 (verify_token): Accept the primary group sid if it equals
341 the token user sid.
342
aeed87e8
CV
3432002-07-02 Corinna Vinschen <corinna@vinschen.de>
344
345 * cygwin.din (__fpclassifyd): Add symbol.
346 (__fpclassifyf): Ditto.
347 (__signbitd): Ditto.
348 (__signbitf): Ditto.
349
654bad37
CV
3502002-07-02 Corinna Vinschen <corinna@vinschen.de>
351
352 * security.h (DONT_INHERIT): Eliminate definition.
353 (INHERIT_ALL): Ditto.
354 (INHERIT_ONLY): Ditto.
355 * sec_acl.cc: Use appropriate defines from accctrl.h instead of the
356 above throughout.
357 * security.cc: Ditto.
358
e968058f
CF
3592002-07-01 Pierre Humblet <pierre.humblet@ieee.org>
360
361 * syscalls.c (seteuid32): Return immediately if the program is not
362 impersonated and both uid and gid are original.
363 (setegid32): Return immediately if the new gid is the current egid.
364
3434e0c8
CF
3652002-07-01 Christopher Faylor <cgf@redhat.com>
366
367 * syscalls.cc (seteuid32): Fix incorrect placement of Pierre's patch
368 below.
369
3557bbc1
CF
3702002-07-01 Christopher Faylor <cgf@redhat.com>
371
372 * syscalls.cc (seteuid32): Fix incorrect use of system_printf.
373
74fcdaec
CF
3742002-07-02 Christopher January <chris@atomice.net>
375
376 * autoload.cc (GetSecurityInfo): Define new autoload function.
377 (RegQueryInfoKeyA): Ditto.
378 * fhandler.h (fhandler_virtual::fill_filebuf): Change return type to
379 bool.
380 (fhandler_proc::fill_filebuf): Ditto.
381 (fhandler_registry::fill_filebuf): Ditto.
382 (fhandler_process::fill_filebuf): Ditto.
383 (fhandler_registry::value_name): Add new member.
384 (fhandler_registry::close): Add new method.
385 (fhandler_process::p): Remove member.
386 * fhandler_proc.cc (fhandler_proc::open): Add set_nohandle after
387 calling superclass method. Check return value of fill_filebuf.
388 (fhandler_proc::fill_filebuf): Change return type to bool. Add return
389 statement.
390 * fhandler_process.cc (fhandler_process::open): Add set_nohandle after
391 calling superclass method. Remove references to p. Check return value
392 of fill_filebuf.
393 (fhandler_process::fill_filebuf): Change return type to bool. Don't
394 use dereference operator on p. Add return statement.
395 (fhandler_process::format_process_stat): Fix typo.
396 * fhandler_registry.cc: Add static open_key declaration.
397 (fhandler_registry::exists): Assume path is already normalised. Try
398 opening the path as a key in its own right first, before reverting to
399 enumerating subkeys and values of the parent key.
400 (fhandler_registry::fstat): Add additional code to return more relevant
401 information about the registry key/value.
402 (fhandler_registry::readdir): Explicitly set desired access when
403 opening registry key. Remove output of buf from debug_printf format
404 string.
405 (fhandler_registry::open): Use set_io_handle to store registry key
406 handle. Set value_name member. Move code to read a value from the
407 registry to fill_filebuf. Add call to fill_filebuf.
408 (fhandler_registry::close): New method.
409 (fhandler_registry::fill_filebuf): Change return type to bool. Add
410 code to read a value from registry.
411 (fhandler_registry::open_key): Make function static. Use KEY_READ as
412 desired access unless this is the last path component. Check the
413 return value of RegOpenKeyEx for an error instead of hKey.
414 * fhandler_virtual.cc (fhandler_virtual::lseek): Check the return value
415 of fill_filebuf.
416 (fhandler_virtual::open): Remove call to set_nohandle.
417 (fhandler_virtual::fill_filebuf): Change return type to bool. Add
418 return statement.
419 * security.cc (get_nt_object_attribute): New function.
420 (get_object_attribute): New function.
421 * security.h (get_object_attribute): New function declaration.
422
4232002-07-01 Pierre Humblet <pierre.humblet@ieee.org>
96edd0a9
CF
424
425 * syscalls.c (seteuid32): Do not return an error when the token cannot
426 be created only because of a problem with the gid.
427
1bc9effd
CF
4282002-07-01 Christopher Faylor <cgf@redhat.com>
429
430 * fhandler_clipboard.c (fhandler_dev_clipboard::open): Force text mode.
431 * fhandler_console.cc (fhandler_console::open): *Really* force binary
432 mode rather than make it optional.
433 * fhandler_proc.cc (fhandler_proc::open): Ditto.
434 * fhandler_process.cc (fhandler_process::open): Ditto.
435 * fhandler_random.cc (fhandler_dev_random::fhandler_dev_random): Ditto.
436 * fhandler_raw.cc (fhandler_dev_raw::open): Ditto.
437 * fhandler_registry.cc (fhandler_registry::open): Ditto.
438 * fhandler_tty.cc (fhandler_tty_slave::open): Ditto.
439 * fhandler_virtual.cc (fhandler_virtual::open): Ditto.
440 * fhandler_windows.cc (fhandler_windows::open): Ditto.
441 * fhandler_zero.cc (fhandler_dev_zero::open): Ditto.
442 * net.cc (fdsock): Ditto.
443 * path.cc (set_flags): Add more debugging.
444
b5e1ec76
CF
4452002-07-01 Christopher Faylor <cgf@redhat.com>
446
447 * debug.cc (threads): Avoid initialization.
448 * uinfo.cc (cygheap_user::ontherange): (from Corinna Vinschen) Actually
449 make below changes work.
450
db57a363
CF
4512002-07-01 Christopher Faylor <cgf@redhat.com>
452
453 * uinfo.cc (cygheap_user::ontherange): Make cygwin root the last resort
454 for HOMEPATH/HOMEDRIVE for consistency with HOME.
455
73d97618
CV
4562002-07-01 Corinna Vinschen <corinna@vinschen.de>
457
458 * shared.cc (sec_none): Move to sec_helper.cc.
459 (sec_none_nih): Ditto.
460 (sec_all): Ditto.
461 (sec_all_nih): Ditto.
462 (get_null_sd): Ditto.
463 (sec_acl): Ditto.
464 (__sec_user): Ditto.
465 * sec_helper.cc (sec_none): Move from shared.cc to here.
466 (sec_none_nih): Ditto.
467 (sec_all): Ditto.
468 (sec_all_nih): Ditto.
469 (get_null_sd): Ditto.
470 (sec_acl): Ditto.
471 (__sec_user): Ditto.
472
8297bda0
CF
4732002-06-30 Christopher Faylor <cgf@redhat.com>
474
475 * uinfo.cc (cygheap_user::ontherange): Potentially set HOME from
476 existing homepath and homedrive cygheap_user fields (not currently used
477 yet). Set HOME to / if no other alternative.
478 (cygheap_user::test_uid): Simplify.
479
8a2ce995
CF
4802002-06-30 Christopher Faylor <cgf@redhat.com>
481
482 * environ.cc (parse_options): Use setenv to potentially replace CYGWIN
483 value on export. Fixes broken behavior since November 2000 changes.
484 (regopt): Return indication of whether or not something has been parsed
485 from the registry.
486 (environ_init): Only attempt to export CYGWIN variable when values were
487 set from the registry. It is exported automatically otherwise.
488
fdf0b5de
CF
4892002-06-30 Christopher Faylor <cgf@redhat.com>
490
491 * fhandler.h (fhandler_process::pid): New field.
492 (fhandler_process::fstat): Remove unneeded array. Set pid element.
493 (fhandler_process::open): Ditto.
494 (fhandler_process::fill_filebuf): Handle case where 'p' field is NULL.
495
ccacec81
CF
4962002-06-30 Christopher Faylor <cgf@redhat.com>
497
498 * fhandler.h (fhandler_process::p): New field.
499 (fhandler_process:fill_filebuf): Revert to same definition as virtual
500 in parent class.
501 (fhandler_process::open): Fill out p field rather than passing as an
502 argument.
503 (fhandler_process::fill_filebuf): Use p pointer rather than argument.
504
fad1c3a8 5052002-06-29 Pierre Humblet <pierre.humblet@ieee.org>
c6d90e84
CV
506
507 * security.cc (extract_nt_dom_user): Check for all buffer overflows.
508 Call LookupAccountSid after trying to get domain & user from passwd.
509 (get_group_sidlist): Obtain the domain and user by calling
510 extract_nt_dom_user instead of LookupAccountSid.
511
839b2942
CF
5122002-06-29 Christopher Faylor <cgf@redhat.com>
513
514 * uinfo.cc (cygheap_user::test_uid): Use standard issetuid test.
515
efc1575e
CF
5162002-06-29 Christopher Faylor <cgf@redhat.com>
517
518 * autoload.cc (NetGetDCName): Change to make this an optional load
519 function.
520 * cygheap.h (cygheap_user::logsrv): Return NULL when operation fails.
521 (cygheap_user::winname): Ditto.
522 (cygheap_user::domain): Ditto.
523 * uinfo.cc (cygheap_user::env_logsrv): Save results in temp variable.
524 (cygheap_user::env_userprofile): Ditto.
525
638180f5
CF
5262002-06-29 Christopher Faylor <cgf@redhat.com>
527
528 * environ.cc (spenv::retrieve): Detect return of env_dontadd from
529 cygheap_user methods.
530 (build_env): Avoid incrementing environment pointer if not actually
531 adding to the environment. That could result in garbage in the
532 environment table. Be more defensive when reallocing envblock.
533
38bc1196
CF
5342002-06-29 Christopher Faylor <cgf@redhat.com>
535
536 * uinfo.cc (cygheap_user::test_uid): Return NULL or further tests are
537 sorta useless.
538 (cygheap_user::env_domain): Recalculate if name is missing.
539
664075a3
CF
5402002-06-29 Christopher Faylor <cgf@redhat.com>
541
542 * environ.cc (spenv::from_cygheap): Still need to take setuid into
543 consideration.
544
e97962b9
CF
5452002-06-28 Christopher Faylor <cgf@redhat.com>
546
547 * uinfo.cc (cygheap_user::env_logsrv): Return "almost_null" in case
548 where no domain or username is "SYSTEM".
549
094d5193
CF
5502002-06-28 Christopher Faylor <cgf@redhat.com>
551
552 * cygheap.h (cygheap_user): Reorg to accommodate environment caching.
553 (cygheap_user::logsrv): New method.
554 (cygheap_user::winname): Ditto.
555 (cygheap_user::domain): Ditto.
556 (cygheap_user::test_uid): Ditto.
557 * cygheap.cc (cygheap_user::set_name): Reflect name "pwinname" name
558 change.
559 * environ.cc (getwinenveq): New function.
664075a3 560 (penv::from_cygheap): penv::from_cygheap): Change arguments.
094d5193
CF
561 (spenv::retrieve): Ditto for call. Use getwinenveq to retrieve info
562 from environment. Always return value from cygwin environment, if it
563 exists.
564 * environ.h (getwinenveq): Declare.
565 * uinfo.cc (cygheap_user::ontherange): Use logsrv() rather than
566 env_logsrv().
567 (cygheap_user::test_uid): Define new method.
568 (cygheap_user::env_logsrv): Accept environment arguments. Use test_uid
569 to find info.
570 (cygheap_user::env_domain): Ditto.
571 (cygheap_user::env_userprofile): Ditto.
572 (cygheap_user::env_homepath): Ditto.
573 (cygheap_user::env_homedrive): Ditto.
574 (cygheap_user::env_name): Ditto.
575
179cae11
CF
5762002-06-27 Christopher Faylor <cgf@redhat.com>
577
578 * cygheap.cc (cfree_and_set): New function.
579 (cygheap_user::set_name): Use cfree_and_set to reset members.
580 * cygheap.h (cygheap_user): Delete static members.
581 (cygheap_user::puserprof): New member.
582 (cfree_and_set): Declare.
583 * dcrt0.cc (almost_null): Define.
bf75aae8 584 * environ.cc (env_dontadd): Redefine as "almost_null".
179cae11
CF
585 * winsup.h (almost_null): Declare.
586 * syscalls.cc (cfree_and_set): Remove unused variable.
587 * uinfo.cc (cygheap_user::homepath_env_buf): Eliminate.
588 (cygheap_user::homedrive_env_buf): Ditto.
589 (cygheap_user::userprofile_env_buf): Ditto.
590 (cygheap_user::ontherange): YA change to try to preserve existing
591 HOMEPATH and HOMEDRIVE. Return almost_null values when variables
592 should not actually exist.
593 (cygheap_user::env_logsrv): Ditto.
594 (cygheap_user::env_domain): Ditto.
595 (cygheap_user::env_userprofile): Ditto.
596
eba23038
CV
5972002-06-27 Corinna Vinschen <corinna@vinschen.de>
598
599 * dcrt0.cc (dll_crt0_1): Let __progname point to the applications
600 basename. Move eliminating ".exe" suffix from argv[0] so that it
601 always also affects __progname.
602
196cdd45
CF
6032002-06-27 Thomas Pfaff <tpfaff@gmx.net>
604
605 * thread.cc (pthread::create): Added trace printf to get CreateThread
606 LastError.
607
5b509758
CV
6082002-06-27 Corinna Vinschen <corinna@vinschen.de>
609
610 * mmap.cc (list::match): Check using pagesize aligned size.
611
75c6a983
CF
6122002-06-26 Christopher Faylor <cgf@redhat.com>
613
614 * fhandler_disk_file.cc (fhandler_disk_file::fstat_by_name): Force
615 FindFirstFile on first file of directory when asking for x:\ .
616
b3e2d035
CF
6172002-06-26 Christopher Faylor <cgf@redhat.com>
618
619 * cygheap.cc (cygheap_user::set_name): Correct thinko in below change.
620
c99902b9
CF
6212002-06-26 Christopher Faylor <cgf@redhat.com>
622
623 * cygheap.cc (cygheap_user::set_name): Avoid clearing things when just
624 setting name to itself or during first time initialization.
625
626 * environ.cc (check_case_init): Make case insensitive.
627
be5007aa
CV
6282002-06-26 Corinna Vinschen <corinna@vinschen.de>
629
630 * fhandler.h (fhandler_socket::bind): Add method definition.
631 (fhandler_socket::connect): Ditto.
632 (fhandler_socket::listen): Ditto.
633 (fhandler_socket::accept): Ditto.
634 (fhandler_socket::getsockname): Ditto.
635 (fhandler_socket::getpeername): Ditto.
636 (fhandler_socket::recvfrom): Ditto.
637 (fhandler_socket::recvmsg): Ditto.
638 (fhandler_socket::sendto): Ditto.
639 (fhandler_socket::sendmsg): Ditto.
640 (fhandler_socket::shutdown): Ditto.
641 * fhandler_socket.cc (get_inet_addr): Move here from net.cc.
642 (fhandler_socket::bind): New method.
643 (fhandler_socket::connect): Ditto.
644 (fhandler_socket::listen): Ditto.
645 (fhandler_socket::accept): Ditto.
646 (fhandler_socket::getsockname): Ditto.
647 (fhandler_socket::getpeername): Ditto.
648 (fhandler_socket::recvfrom): Ditto.
649 (fhandler_socket::recvmsg): Ditto.
650 (fhandler_socket::sendto): Ditto.
651 (fhandler_socket::sendmsg): Ditto.
652 (fhandler_socket::shutdown): Ditto.
653 * net.cc: Various formatting cleanups throughout.
654 (get_inet_addr): Move to fhandler_socket.cc.
655 (cygwin_bind): Move base functionality to appropriate fhandler_socket
656 method.
657 (cygwin_connect): Ditto.
658 (cygwin_listen): Ditto.
659 (cygwin_accept): Ditto.
660 (cygwin_getsockname): Ditto.
661 (cygwin_getpeername): Ditto.
662 (cygwin_recvfrom): Ditto.
663 (cygwin_recvmsg): Ditto.
664 (cygwin_sendto): Ditto.
665 (cygwin_sendmsg): Ditto.
666 (cygwin_shutdown): Ditto.
667
303af157
CV
6682002-06-26 Corinna Vinschen <corinna@vinschen.de>
669
670 * pwdgrp.h (pwdgrp_read::~pwdgrp_read): Avoid compiler warning.
671
8698edb8
CF
6722002-06-26 Christopher Faylor <cgf@redhat.com>
673
674 * dcrt0.cc (_dcrt0): Be more defensive when reserved block is used and
675 it's not cygwin info.
676
f279e522
CF
6772002-06-26 Christopher Faylor <cgf@redhat.com>
678
679 * autoload (noload): Avoid clobbering bx register.
680
681 * environ.cc (codepage_init): Use case insensitive match.
682
683 * fhandler_console.cc (cp_get_internal): Delete.
684 (con_to_str): Use get_cp to derive code page.
685 (str_to_con): Ditto.
686 * miscfuncs.cc (get_cp): New function.
687 (sys_wcstombs): New function. Converted from macro.
688 (sys_mbstowcs): Ditto.
689 * winsup.h: Reflect above changes.
690
109e4822
CF
6912002-06-26 Christopher Faylor <cgf@redhat.com>
692
693 * winsup.h: Minor cleanup.
694 * path.h (path_conv::[]): New operator.
695 * syscalls.cc (_link): Use path_conv operators rather than methods,
696 where appropriate. Minor white space cleanup.
697
6982002-06-26 Christopher Faylor <cgf@redhat.com>
699
700 * include/cygwin/version.h: Bump DLL minor number.
701
a635af7c
CF
7022002-06-25 Thomas Pfaff <tpfaff@gmx.net>
703
704 * include/pthread.h (PTHREAD_CANCELED): Defined a reasonable
705 value.
706 * pthread.cc (pthread_exit): Call method instead of function.
707 (pthread_setcancelstate): Ditto.
708 (pthread_setcanceltype): Ditto.
709 (pthread_testcancel): Ditto.
710 * thread.h (pthread::cancel_event): New member.
711 (__pthread_cancel_self): New prototype.
712 (pthread::exit): New Method.
713 (pthread::cancel): Ditto.
714 (pthread::testcancel): Ditto.
715 (pthread::cancel_self): Ditto.
716 (pthread::static_cancel_self): Ditto.
717 (pthread::setcancelstate): Ditto.
718 (pthread::setcanceltype): Ditto.
719 (__pthread_cancel): Give c++ linkage.
720 (__pthread_exit): Remove.
721 (__pthread_setcancelstate): Ditto.
722 (__pthread_setcanceltype): Ditto.
723 (__pthread_testcancel): Ditto.
724 * thread.cc (pthread::pthread): Inititialize cancel_event.
725 (pthread::~pthread): Close cancel_event if needed.
726 (pthread::create): Create cancel_event.
727 (pthread::exit): New method. Replacement for __pthread_exit.
728 (pthread::cancel): New method.
729 (pthread::testcancel): Ditto.
730 (pthread::static_cancel_self); New static method.
731 (pthread::setcancelstate): New method. Replacement for
732 __pthread_setcancelstate.
733 (pthread::setcanceltype): New method. Replacement for
734 __pthread_setcanceltype.
735 (pthread::pop_cleanup_handler): Added lock for async cancel safe
736 cancellation.
737 (pthread::thread_init_wrapper): Change __pthread_exit to
738 thread->exit().
739 (__pthread_cancel): Call method thread->cancel().
740 (__pthread_exit): Remove.
741 (__pthread_setcancelstate): Ditto.
742 (__pthread_setcanceltype): Ditto.
743 (__pthread_testcancel): Ditto.
744
109e4822
CF
7452002-06-25 Christopher Faylor <cgf@redhat.com>
746
747 * dcrt0.cc (sm): Make NO_COPY.
748
6331b658
CV
7492002-06-25 Corinna Vinschen <corinna@vinschen.de>
750
751 * syscalls.cc (chown): Convert uid to 32 bit.
752 (lchown): Ditto.
753 (fchown): Ditto.
754
e773b7cf
CF
7552002-06-24 Christopher Faylor <cgf@redhat.com>
756
757 * dtable.cc (dtable::find_unused_handle): Avoid coercion.
758
4c78be52
CF
7592002-06-24 Christopher Faylor <cgf@redhat.com>
760
761 * dtable.cc (fhandler_base::dup2): Cleanup. Ensure that lock is turned
762 off in error condition.
763
1fd072b6
CV
7642002-06-24 Corinna Vinschen <corinna@vinschen.de>
765
766 * uinfo.cc (internal_getlogin): Set myself->uid and myself->gid instead
767 of user.real_uid and user.real_gid.
768 (uinfo_init): Evaluate orig_uid and real_uid from myself->uid. Ditto
769 for gid.
770
de0557f7
CF
7712002-06-23 Pierre Humblet <pierre.humblet@ieee.org>
772
773 * security.cc (get_group_sidlist): Add pw argument and use pw->pw_name
774 in call to get_supplementary_group_sidlist.
775 (create_token): Add pw argument and use it in call to
776 get_group_sidlist.
777 * security.h: Add pw argument in declaration of create_token.
778 * syscalls.cc (seteuid32): Add pw argument in call to create_token.
779
035bfbdd
CF
7802002-06-23 Conrad Scott <conrad.scott@dsl.pipex.com>
781
782 * fhandler.cc (fhandler_base::fstat): Set S_IFIFO for pipes.
783 * fhandler_socket.cc (fhandler_socket.cc::fstat): Set S_IFSOCK.
784
eecef29f
CF
7852002-06-23 Christopher Faylor <cgf@redhat.com>
786
787 * lib/_cygwin_S_IEXEC.cc: Remove obsolete file.
788
85b995d4
CF
7892002-06-23 Christopher Faylor <cgf@redhat.com>
790
791 Use cygwin_{shm,ipc}.h instead of /sys/{shm,ipc}.h throughout.
792 * sys/ipc.h: Remove.
793 * sys/shm.h: Remove.
794 * cygwin_ipc.h: New file.
795 * cygwin_shm.h: New file.
796
6bda8def
CF
7972002-06-23 Christopher Faylor <cgf@redhat.com>
798
799 * cygwin.sc: Add recent changes from ld sources.
800
8012002-06-23 Conrad Scott <conrad.scott@dsl.pipex.com>
802
803 * winsup.h: Move #ifdef EXPCGF code into "winbase.h".
804 * winbase.h: #ifdef EXPCGF code moved here from "winsup.h".
805
f6709c07
RC
8062002-06-12 Thomas Pfaff <tpfaff@gmx.net>
807
808 * thread.h (pthread::cleanup_stack): Renamed cleanup_handlers to
809 cleanup_stack.
810 * thread.cc (pthread::pthread): Ditto.
811 (pthread::create): Fixed mutex verification.
812 (pthread::push_cleanup_handler): Renamed cleanup_handlers to
813 cleanup_stack.
814 Mutex calls removed, used InterlockedExchangePointer instead.
815 (pthread::pop_cleanup_handler): Renamed cleanup_handlers to
816 cleanup_stack.
817 (pthread::pop_all_cleanup_handlers): Ditto.
818 (__pthread_once): Check state first and return if already done.
819 (__pthread_join): DEADLOCK test reverted to __pthread_equal
820 call.
821 (__pthread_detach): Unlock mutex before deletion.
822
0278e3a3
CF
8232002-06-21 Christopher Faylor <cgf@redhat.com>
824
825 * Makefile.in (cygrun.exe): Move -lgcc where it will do some good.
826
1a7cb557
CV
8272002-06-21 Corinna Vinschen <corinna@vinschen.de>
828
829 * syscalls.cc (stat64_to_stat32): Correctly evaluate st_rdev.
830 (fstat64): Set st_rdev to same value as st_dev.
831 (stat_worker): Ditto.
832
49056987
CV
8332002-06-21 Corinna Vinschen <corinna@vinschen.de>
834
835 * security.cc (alloc_sd): Carefully check owner_sid again after trying
836 SIDs from cygheap.
837
dd0208eb
CV
8382002-06-21 Corinna Vinschen <corinna@vinschen.de>
839
840 * security.cc (alloc_sd): Remove unnecessary retrieval of owner name.
841 Check uid for current user first and use SIDs from cygheap if so.
842 Set errno to EINVAL if user SID isn't retrievable. Just print user SID
843 as debug output.
844 Don't bail out if group SID isn't retrievable. Change debug output
845 appropriately.
846
d7c2bd8e
CF
8472002-06-21 Christopher Faylor <cgf@redhat.com>
848
849 * errno.cc: Change text description for EBADF throughout.
850
7c02f861
CF
8512002-06-20 Pierre Humblet <pierre.humblet@ieee.org>
852
853 * uinfo.cc (cygheap_user::ontherange): Use env_name for NetUserGetInfo.
854 (cygheap_user::env_logsrv): Verify env_domain is valid.
855 * environ.cc: Include child_info.h and keep spenvs[] sorted.
856 (environ_init): Check child_proc_info instead of myself->ppid_handle.
857
c25ebbaf
CF
8582002-06-19 Christopher Faylor <cgf@redhat.com>
859
860 * fhandler.cc (fhandler_base::set_flags): Change priority of "linked
861 in" default binmode setting so that it has priority over optional
862 setting.
863
03a2ce9a
CF
8642002-06-19 Christopher Faylor <cgf@redhat.com>
865
d70b993f 866 Use hMainProc where appropriate, throughout.
03a2ce9a
CF
867 * environ.cc (spenv::retrieve): Add debugging statements.
868
869 * pinfo.cc (set_myself): Don't call strace.hello if already stracing.
870 * strace.cc (strace): Move NO_COPY keyword so that it will actually
871 take effect.
872
834224ab
CV
8732002-06-19 Corinna Vinschen <corinna@vinschen.de>
874
875 * uinfo.cc (cygheap_user::ontherange): Call NetUserGetInfo() only with
876 non-NULL logserver parameter.
877
e40670ee
CF
8782002-06-16 Christopher Faylor <cgf@redhat.com>
879
880 * cygheap.h (cygheap_user::issetuid): New method.
881 * dtable.cc (dtable::vfork_child_dup): Use new method to determine if
882 we are in "setuid mode."
883 * fork.cc (fork_parent): Ditto.
884 * spawn.cc (spawn_guts): Ditto.
885 * syscalls.cc (seteuid32): Ditto.
886 (setegid32): Ditto.
887 * environ.cc (spenv::retrieve): (Suggested by Pierre Humblet) Do
888 potential recalculation of cygheap_user stuff when in setuid mode.
00a9e8a0
CF
889 Return special value when environment variable should be calculated but
890 not added.
e40670ee
CF
891 (build_env): Don't add retrieved value to dstp if it is 'dont_add'.
892
a05a9e01
CF
8932002-06-16 Christopher Faylor <cgf@redhat.com>
894
895 Changes suggested by Pierre Humblet.
896 * environ.cc (NL): New macro.
897 (conv_envvars): Use NL macro to fill in name and namelen.
898 (spenv::namelen): New field.
899 (spenvs): Use NL to fill in name and namelen.
900 (spenv::retrieve): Eliminate length argument. Instead, use namelen
901 throughout.
902 (build_env): Don't calculate length of initial FOO= part of
903 environment. Accommodate spenv::retrive argument change.
904
5f25e1d1
CF
9052002-06-16 Christopher Faylor <cgf@redhat.com>
906
907 * cygheap.h (cygheap_user::winname): New field.
908 * cygheap.cc (cygheap_user::set_name): Clear winname when name changes.
909 * uinfo.cc (cygheap_user::env_logsrv): Avoid calculating server when
910 Windows user == SYSTEM.
911 (cygheap_user::env_domain): Set winname here too.
912 (cygheap_user::env_userprofile): Eliminate superfluous tests.
913 (cygheap_user::env_name): Seed winname by calling env_domain().
914
5c8bce24
CF
9152002-06-12 Pierre Humblet <pierre.humblet@ieee.org>
916
917 * spawn.cc (spawn_guts): Revert removal of ciresrv.moreinfo->uid =
918 ILLEGAL_UID.
919
6ea3e429
CF
9202002-06-15 Christopher Faylor <cgf@redhat.com>
921
922 * child_info.h (child_proc_info): Declare as base class.
923 (spawn_info): Declare as alias of child_proc_info to aid debugging.
924 (fork_info): Ditto.
925 * cygheap.cc (cygheap_fixup_in_child): Use child_proc_info global
926 rather than parameter.
927 * cygheap.h (cygheap_fixup_in_child): Reflect above change in
928 declaration.
929 * dcrt0.cc (_dll_crt0): Move 'si' definition here. Assign
930 child_proc_info.
931 (dll_crt0_1): Accommodate cygheap_fixup_in_child and *_info changes.
932 * environ.cc (spenv::retrieve): Make regparm.
933 * environ.h (environ_init): Ditto.
934 (win_env::add_cache): Ditto.
935 (build_env): Ditto.
936 (getwinenv): Ditto.
937 * fork.cc (sync_with_parent): Use fork_info global.
938 (fork_child): Ditto.
939
cff111a6
CF
9402002-06-14 Christopher Faylor <cgf@redhat.com>
941
942 * uinfo.cc (cygheap_user::ontherange): Don't set HOMEDRIVE or HOMEPATH
943 unless one or the other is specified.
944
6d171b44
CF
9452002-06-14 Christopher Faylor <cgf@redhat.com>
946
947 * cygheap.h (cygheap_user::userprofile_env_buf): New static member.
948 * environ.cc (build_env): Add debugging statement.
949 (spenvs): Switch functions for USERDOMAIN and USERNAME.
950 * spawn.cc (spawn_guts): Move environment initialization prior to
951 cygheap_setup_for_child or environment info will never be copied to
952 child.
953
a77d35f7
CF
9542002-06-14 Christopher Faylor <cgf@redhat.com>
955
956 * cygheap.h (cygheap_user): Add static members to hold home{drive,path}
957 info.
958 * uinfo.cc (cygheap_user::ontherange): Use static class members for
959 local HOME* storage.
960
9a771b29
CF
9612002-06-14 Christopher Faylor <cgf@redhat.com>
962
963 * cygheap.cc (cygheap_user::set_logsrv): Remove.
964 (cygheap_user::set_domain): Ditto.
965 * cygheap.h (cygheap_user::set_logsrv): Remove declaration.
966 (cygheap_user::set_domain): Ditto.
967 (cygheap_user::env_domain): Declare new method.
968 (cygheap_user::env_name): Ditto.
969 * environ.cc (spenvs): Add two environment variables.
970 * spawn.cc (spawn_guts): Call build_env after RevertToSelf. Always set
971 ciresrv.mount_h.
972 (cygheap_user::ontherange): Recalculate homedrive/homepath if they are
973 empty. Use env_logsrv to get logon server.
974 (cygheap_user::env_logsrv): Calculate server name here rather than
975 relying on it having been previously calculated.
976 (cygheap_user::env_domain): Ditto for domain name.
977 (cygheap-user::env_name): New method.
978
9792002-06-12 Pierre Humblet <pierre.humblet@ieee.org>
980
981 * syscalls.cc (seteuid32): Do not get or set the environment. Do not
982 call LookupAccountSid nor internal_getlogin. Set cygheap->user name
983 and sid from the passwd entry.
984 * uinfo.cc (uinfo_init): Only call internal_getlogin when starting from
985 a non Cygwin process and use the values returned in user.
986 (internal_getlogin): Simplify to case where starting from a non Cygwin
987 process. Store return values in user and return void. Do not set the
988 Windows default environment.
989 * dcrt0.cc (dll_crt0_1): Call uinfo_init only when needed. Do not set
990 myself->uid nor reset user.sid.
991 * spawn.cc (spawn_guts): Get the sid from cygheap->user. Always
992 RevertToSelf(). Don't set uid in impersonated case.
993 * cygheap.cc (cygheap_user::set_sid): Do not set orig_sig.
994 (cygheap_user::set_orig_sid): New.
995 * cygheap.h: Declare cygheap_user::set_sid.
996 * winsup.h: Add argument to uinfo_init().
997
470e8c46
CV
9982002-06-14 Corinna Vinschen <corinna@vinschen.de>
999
1000 * environ.cc (build_env): If realloc moves envblock, move s with it.
1001
39be53dc
CF
10022002-06-13 Nicholas S. Wourms <nwourms@netscape.net>
1003
1004 * winver.rc: Add more words to copyright.
1005
0e6d80e4
CV
10062002-06-13 Corinna Vinschen <corinna@vinschen.de>
1007
1008 * cygheap.cc (cygheap_user::set_name): Revert previous change.
1009 * environ.cc (spenv::retrieve): Check return value of call to
1010 cygheap->user.*from_cygheap().
1011
5682a6dd
CV
10122002-06-13 Corinna Vinschen <corinna@vinschen.de>
1013
1014 * cygheap.cc (cygheap_user::set_name): Remove setting homedrive and
1015 homepath to NULL.
1016 (cygheap_user::set_logsrv): Fix free'ing of plogsrv.
1017 * cygheap.h (cygheap_user::cygheap_user): Initialize homedrive and
1018 homepath to NULL.
1019
5f74ae83
CF
10202002-06-13 Christopher Faylor <cgf@redhat.com>
1021
1022 * security.cc (get_logon_server): Use strcasematch rather than
1023 strcasecmp.
1024
4863867a
CF
10252002-06-12 Christopher Faylor <cgf@redhat.com>
1026
1027 * path.cc (chdir): Minor cleanup.
1028
12a2ef44
CF
10292002-06-12 Christopher Faylor <cgf@redhat.com>
1030
1031 * environ.cc (build_env): Correctly fill out windows environment block
1032 with win32 paths rather than posix paths.
1033
da086d02
CF
10342002-06-12 Christopher Faylor <cgf@redhat.com>
1035
1036 * cygheap.cc (cygheap_user::set_name): Set homedrive and homepath to
1037 NULL on user name change.
1038 (cygheap_user::set_logsrv): Allocate enough space for leading \\ so
1039 that we can put this in the environment, if needed.
1040 * cygheap.h (homebodies): New enum.
1041 (cygheap_user::homedrive): New field.
1042 (cygheap_user::homepath): Ditto.
1043 (cygheap_user::env_logsrv): New method.
1044 (cygheap_user::env_homepath): New method.
1045 (cygheap_user::env_homedrive): New method.
1046 (cygheap_user::env_userprofile): New method.
1047 (cygheap_user::ontherange): New method.
1048 * environ.cc (envsize): Eliminate debugging argument.
1049 (environ_init): Assume that envc counts number of elments not total
1050 size.
1051 (spenv): New class.
1052 (spenvs): New array, renamed from forced_winenv_vars, using spenv.
1053 (spenv::retrieve): New method.
1054 (build_env): Rename from 'winenv' -- one stop shopping for building new
1055 environment blocks for both windows and "unix".
1056 * environ.h (build_env: Declare.
1057 (winenv): Delete declaration.
1058 (envsize): Ditto.
1059 * spawn.cc (spawn_guts): Use build_env to build windows and cygwin
1060 environment blocks.
1061 * uinfo.cc (internal_getlogin): Eliminate environment manipulation.
1062 Default to info from GetUserName if it exists. Move HOMEPATH and
1063 HOMEDRIVE stuff elsewhere. Move HOME setting elsewhere. Only set HOME
1064 environment variable in processes that are not parented by a cygwin
1065 process.
1066 (cygheap_user::ontherange): Define new method.
1067 (cygheap_user::env_logsrv): Ditto.
1068 (cygheap_user::env_homepath): Ditto.
1069 (cygheap_user::env_homedrive): Ditto.
1070 (cygheap_user::env_userprofile): Ditto.
1071
077d8b23
CF
10722002-06-11 Christopher Faylor <cgf@redhat.com>
1073
1074 * spawn.cc (spawn_guts): More hToken removal cleanup.
1075
d5377829
CF
10762002-06-09 Pierre Humblet <pierre.humblet@ieee.org>
1077
1078 * spawn.cc (spawn_guts): Define sec_attribs and call sec_user_nih()
1079 only once.
1080
380aaf2d
CF
10812002-06-10 Christopher Faylor <cgf@redhat.com>
1082
1083 * Makefile.in: Ensure that -MD gets added to CFLAGS regardless of
1084 CFLAGS command-line setting.
1085
1086 * cygwin.din: Export sexec* functions as function which returns ENOSYS
1087 (i.e., sexec* is deprecated).
1088 * dtable.cc (dtable::vfork_child_dup): Ensure that impersonation is
1089 restored even on failure.
1090 * exec.cc: Throughout, remove references to sexec* and _spawnve.
1091 * pinfo.h: Remove _spawnve declaration.
1092 * spawn.cc: Rename _spawnve to spawnve and use throughout.
1093 (spawn_guts): Eliminate hToken argument and processing of same. Just
1094 perform special actions if impersonating.
1095 (spawnve): Rename from _spawnve.
1096
b01cbd5d
CF
10972002-06-10 Christopher Faylor <cgf@redhat.com>
1098
1099 * include/sys/strace.h (strace): Avoid use of constructor.
1100
fe4283af
CF
11012002-06-10 Christopher Faylor <cgf@redhat.com>
1102
1103 * dcrt0.cc (dll_crt0_1): Initialize wincap and check for sanity before
1104 running global ctors.
1105 * wincap.h (wincap): Eliminate constructor. Default is to zero memory,
1106 anyway.
1107 * wincap.cc (wincap): Copy this on fork to avoid initialization in
1108 forked processes.
1109
3d78e129
CV
11102002-06-10 Corinna Vinschen <corinna@vinschen.de>
1111
1112 * fhandler.h (fhandler_socket::fixup_after_fork): Revert patch from
1113 2002-06-04.
1114 * fhandler_socket.cc (fhandler_socket::fixup_after_fork): Ditto.
1115 (fhandler_socket::dup): Ditto.
1116 * net.cc (fdsock): Make sockets explicitely noninheritable on NT.
1117
c2102631
CF
11182002-06-09 Christopher Faylor <cgf@redhat.com>
1119
1120 * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Correctly
1121 set number of links for directory, if appropriate.
1122
43c3c4e3
RC
11232002-06-10 Robert Collins <rbtcollins@hotmail.com>
1124
1125 * thread.cc: Variation of a patch from Thomas Pffaf.
d70b993f 1126 (__pthread_detach): Cleanup thread object if the thread has terminated.
43c3c4e3
RC
1127 (__pthread_join): Change order of error checks, and lock against
1128 join/detach/exit races.
1129 (__pthread_exit): Lock object against join/detach/exit races.
1130 (pthread::thread_init_wrapper): Ditto.
1131 (thread_init_wrapper): Rename to pthread::thread_init_wrapper.
1132 (pthread::create): Check that the mutex initialized correctly.
1133 (pthread::push_cleanup_handler): Lock against potential cancellation
1134 race. NB: this may not be required if pthread_cleanup_push is non-
1135 cancelable.
1136 * thread.h (pthread::mutex): New member.
1137 (thread_init_wrapper): Rename to pthread::thread_init_wrapper.
1138 (pthread::thread_init_wrapper_: New static member.
1139
007276b3
RC
11402002-06-10 Robert Collins <rbtcollins@hotmail.com>
1141
1142 * cygwin.din: Add _pthread_cleanup_push and _pthread_cleanup_pop.
1143 * pthread.cc: Change __pthread_self to pthread::self() thruoghout.
1144 (_pthread_cleanup_push): New function.
1145 (_pthread_cleanup_pop): Ditto.
1146 * thread.cc: Thanks to Thomas Pfaff for the pthread cleanup_push,_pop
1147 patch, this work is derived from that.
1148 Change __pthread_self to pthread::self() thruoghout.
1149 (__pthread_self): Rename to pthread::self.
1150 (pthread::self): New method.
1151 (pthread::pthread): Initialize new member.
1152 (pthread::push_cleanup_handler): New method.
1153 (pthread::pop_cleanup_handler): New method.
1154 (pthread::pop_all_cleanup_handlers): New method.
1155 (__pthread_exit): Pop all cleanup handlers.
1156 * thread.h (pthread::push_cleanup_handler): Declare.
1157 (pthread::pop_cleanup_handler): Ditto.
1158 (pthread::pop_all_cleanup_handlers): Ditto.
1159 (pthread::self): New static method.
1160 (__pthread_exit): Give C++ linkage.
1161 (__pthread_join): Ditto.
1162 (__pthread_detach): Ditto.
1163 (__pthread_self): Remove.
1164
11652002-04-24 Thomas Pfaff <tpfaff@gmx.net>
1166
c2102631
CF
1167 * include/pthread.h (__pthread_cleanup_handler): New structure.
1168 (pthread_cleanup_push): Rewritten.
007276b3
RC
1169 (pthread_cleanup_pop): Ditto.
1170 (_pthread_cleanup_push): New prototype.
c2102631 1171 (_pthread_cleanup_pop): Ditto.
007276b3
RC
1172
11732002-04-24 Thomas Pfaff <tpfaff@gmx.net>
1174
1175 * thread.cc (thread_init_wrapper): Check if thread is already joined.
1176 (__pthread_join): Set joiner first.
1177 (__pthread_detach): Ditto.
1178
fec98ec9
RC
11792002-06-10 Robert Collins <rbtcollins@hotmail.com>
1180
1181 * cygserver_transport.cc (create_server_transport): Finish the split
1182 out of sockets code from transport_layer_base. Thanks to Nicholas
1183 Wourms and Conrad Scott for catching this.
1184
7ac66bdd
CF
11852002-06-08 Christopher Faylor <cgf@redhat.com>
1186
1187 * pinfo.cc (pinfo_dummy): Initialize to correct size.
1188
a004a5b8
CF
11892002-06-08 Christopher Faylor <cgf@redhat.com>
1190
1191 * path.cc: Change MOUNT_AUTO to MOUNT_CYGDRIVE throughout.
1192 * shared_info.h (CURR_MOUNT_MAGIC): Update.
1193
50484e8e
CF
11942002-06-08 Christopher Faylor <cgf@redhat.com>
1195
1196 * external.cc (cygwin_internal): Make v1 mount table access invalid.
1197 * path.cc (mount_info::init): Remove had_to_create_mount_areas initialization.
1198 (mount_info::from_registry): Remove v1 table import.
1199 (mount_info::read_v1_mounts): Eliminate.
1200 (mount_info::import_v1_mounts): Ditto.
1201 * shared_info.h (mount_info): Ditto for both of above.
1202 * sys/mount.h (MOUNT_DEVFS): New enum.
1203 (MOUNT_PROC): Ditto.
1204
2e2dcba3
CF
12052002-06-08 Christopher Faylor <cgf@redhat.com>
1206
1207 * include/wchar.h: Define __need_size_t.
1208
9cde3cf3
CF
12092002-06-07 Christopher Faylor <cgf@redhat.com>
1210
1211 * fhandler_socket.cc (fhandler_socket::fstat): Don't assume that socket
1212 is unix-domain socket.
1213
12142002-06-07 Christopher Faylor <cgf@redhat.com>
1215
1216 * times.cc (hires_ms::prime): Set init flag.
1217
12182002-06-07 Conrad Scott <conrad.scott@dsl.pipex.com>
1219
1220 * times.cc (hires_ms::prime): Adjust epoch of initime_us from 1601 to
1221 1970.
1222
9d0efbb3
CF
12232002-06-06 Christopher Faylor <cgf@redhat.com>
1224
1225 * autoload.cc (timeGetDevCaps): Define new autoload function.
1226 (timeGetTime): Ditto.
1227 (timeBeginPeriod): Ditto.
1228 (timeEndPeriod): Ditto.
1229 * hires.h (hires_base): New class. Renamed from hires.
1230 (hires_us): New class.
1231 (hires_ms): New class.
1232 * strace.cc (strace::microseconds): Use hires_us class.
1233 * times.cc (gettimeofday): Use hires-ms class.
1234 (hires_us::prime): Renamed from hires::prime.
1235 (hires_us::usecs): Renamed from hires:usecs.
1236 (hires_ms::prime): New method.
1237 (hires_ms::usecs): New method.
1238 (hires_ms::~hires_ms): New destructor.
1239
46b941fc
CF
12402002-06-06 Christopher Faylor <cgf@redhat.com>
1241
1242 * autoload.cc (noload): Correctly save argument count register.
1243
c4e6ff48
CV
12442002-06-05 Conrad Scott <conrad.scott@dsl.pipex.com>
1245
1246 * fhandler.cc (fhandler_base::fstat): Initialise tv_nsec member of
1247 st_atim, st_mtim, and st_ctim fields.
1248 * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Ditto.
1249 * fhandler_process.cc (fhandler_process::fstat): Ditto.
46b941fc
CF
1250 * glob.c (stat32_to_STAT): Copy across the whole st_atim, st_mtime, and
1251 st_ctim fields.
c4e6ff48
CV
1252 * syscalls.cc (stat64_to_stat32): Ditto.
1253 * times.cc (to_timestruc_t): New function.
1254 (time_as_timestruc_t): New function.
1255 * winsup.h: Add to_timestruc_t and time_as_timestruc_t functions.
46b941fc
CF
1256 * include/cygwin/stat.h: Replace time_t with timestruc_t throughout for
1257 all file times, removing the st_spare1, st_spare2, and st_spare3 fields
1258 in the process. Add macros to access tv_sec fields by old names.
1259 * include/cygwin/types.h: Typedef timespec_t and timestruc_t as struct
1260 timespec.
c4e6ff48 1261
2e8abfc1
CV
12622002-06-03 Pierre Humblet <pierre.humblet@ieee.org>
1263
1264 * sec_helper.cc (lookup_name): Suppress.
1265 * security.cc (alloc_sd): Remove logsrv argument.
1266 Remove two calls to lookup_name.
1267 (set_security_attribute): Remove logsrv argument.
1268 Remove logsrv argument in call to alloc_sd.
1269 (set_nt_attribute): Remove logsrv argument.
1270 Remove logsrv argument in call to set_security_attribute.
1271 (set_file_attribute): Remove logsrv argument.
1272 Remove logsrv argument in call to set_nt_attribute.
1273 (set_file_attribute): Remove logsrv argument.
1274 Remove logsrv argument in call to set_file_attribute.
1275 * syscalls.cc (chown_worker): Remove logserver argument in
1276 call to set_file_attribute.
1277 (chmod): Ditto.
1278 * shm.cc (shmget): Remove logsrv argument in call to alloc_sd.
1279 * uinfo.cc (internal_getlogin): Replace calls to
1280 lookup_name by call to LookupAccountName.
1281 * security.h: Remove logsrv in declarations of set_file_attribute
1282 and alloc_sd. Remove declaration of lookup_name.
1283
f7a7cc90
CF
12842002-06-05 Christopher Faylor <cgf@redhat.com>
1285
1286 * child_info.h (CHILD_INFO_MAGIC): Oops. Revert previous change. gcc
1287 3.1 bug?
1288
784e340c
CF
12892002-06-05 Christopher Faylor <cgf@redhat.com>
1290
1291 * child_info.h (CHILD_INFO_MAGIC): Update.
1292
58fcd93a
CF
12932002-06-05 Christopher Faylor <cgf@redhat.com>
1294
1295 * strace.cc (strace::hello): Set inited, when appropriate.
1296
ee964e2f
CF
12972002-06-05 Christopher Faylor <cgf@redhat.com>
1298
1299 * cygwin.din: Eliminate some newlib wrappers.
1300 * path.cc (get_devn): Only consider first 99 potential com devices.
1301 (get_device_number): Ditto.
1302 * times.cc (_times): Eliminate.
1303 (_times): Renamed from times().
1304
ea4e6ec8
CF
13052002-06-05 Christopher Faylor <cgf@redhat.com>
1306
1307 * dir.cc (rmdir): Streamline. Detect attempts to remove directories
1308 from "read-only" virtual devices. (Suggested by Pavel Tsekov)
46b941fc
CF
1309 * syscalls.cc (unlink): Detect attempts to remove directories from
1310 "read-only" virtual devices. (From Pavel Tsekov)
ea4e6ec8 1311
2bb6b3e5
CF
13122002-06-05 Christopher Faylor <cgf@redhat.com>
1313
1314 * dtable.cc (handle_to_fn): Check error return value from NtQueryObject
1315 first before seeing if name buffer is NULL.
1316
1317 * grp.cc (read_etc_group): Fix gcc warning regarding snprintf format.
1318 * passwd.cc (read_etc_passwd): Ditto.
1319
e9259cb2
RC
13202002-04-18 Thomas Pfaff <tpfaff@gmx.net>
1321
1322 * thread.h (pthread::joiner): New member.
1323 * thread.cc (pthread::pthread): Initialize joiner to NULL
1324 (pthread::create): Increment of thread counter moved from
1325 __pthread_create to this location.
1326 (__pthread_create): Increment thread counter removed.
1327 (thread_init_wrapper): Set joiner to self when thread was created
1328 detached.
1329 (__pthread_exit): delete thread when it is detached and not
1330 joined.
1331 (__pthread_join): Check for deadlock and delete thread when it has
1332 terminated.
1333 (__pthread_detach): Set joiner to self when thread state
1334 changed to detached.
1335
eceee297
CV
13362002-06-05 Corinna Vinschen <corinna@vinschen.de>
1337
1338 * grp.cc (read_etc_group): When emulating nonexisting group file on
1339 NT systems, read primary group SID from process token. Use that info
1340 to create correct group entry. On error or on 9x systems fallback
1341 to emulating Administrators group as before.
ae1ebb81 1342 * passwd.cc (read_etc_passwd): When emulating nonexisting passwd file
46b941fc 1343 on NT systems, read user and primary group SID from process token.
ae1ebb81
CV
1344 Use that info to create correct passwd entry. On error or on 9x
1345 systems fallback to emulating user with Administrator user id and
1346 Administrators group as before.
eceee297 1347
38f39368
CV
13482002-06-05 Corinna Vinschen <corinna@vinschen.de>
1349
1350 * grp.cc (etc_group): Removed.
1351 (parse_grp): Make line parameter nonconst. Don't copy data into new
1352 allocated memory. Check for CR instead of LF to accomodate new
1353 read method.
1354 (add_grp_line): Make line parameter nonconst.
1355 (read_etc_group): Rearrange using new pwdgrp_read class.
1356 * passwd.cc (parse_pwd): Don't copy data into new allocated memory.
1357 Check for CR instead of LF to accomodate new read method.
1358 (read_etc_passwd): Rearrange using new pwdgrp_read class.
1359 * pwdgrp.h (pwdgrp_check::set_last_modified): Use different
1360 parameters.
1361 (class pwdgrp_read): New class for opening and reading passwd and
1362 group files.
1363
ce006ffa
CF
13642002-06-04 Christopher Faylor <cgf@redhat.com>
1365
1366 * dtable.cc (handle_to_fn): Attempt to handle "raw" accesses to remote
1367 shares.
1368 * path.cc (mount_info::conv_to_win32_path): Set flags to binary when
1369 mount entry is not found.
1370 (mount_info::set_flags_from_win32_path): Ditto.
1371
147d2ab4
CF
13722002-06-04 Christopher Faylor <cgf@redhat.com>
1373
1374 * dtable.cc (handle_to_fn): Correct placement and length of name
ea4e6ec8 1375 buffer. (Suggested by Pavel Tsekov)
147d2ab4 1376
e35f391f
CF
13772002-06-04 Christopher Faylor <cgf@redhat.com>
1378
1379 Remove fcntl.h includes throughout.
1380 * fhandler.h: Move fcntl.h include here.
1381 (fhandler_base::set_flags): Accept supplied_bin argument. Make
1382 non-inlined.
1383 * dtable.cc (dtable::init_std_file_from_handle): Just use binmode from
1384 pc.
1385 (reset_to_open_binmode): Use set_flags.
1386 * cygwin.din (open): Avoid newlib wrapper.
1387 (read): Ditto.
1388 (unlink): Ditto.
1389 (write): Ditto.
1390 * fhandler.cc (fhandler_base::set_flags): Accept supplied_bin argument.
1391 Make binmode decisions here.
1392 (fhandler_base::open): Avoid using pc if it is NULL. Eliminate binmode
1393 logic. Just call set_flags with binmode argument.
1394 (fhandler_base::init): Call set_flags with binmode argument.
1395 * fhandler_clipboard.cc (fhandler_dev_clipboard::open): Ditto.
1396 * fhandler_console.cc (fhandler_console::open): Ditto.
1397 (fhandler_console::init): Force binary on open.
1398 * fhandler_disk_file.cc (fhandler_disk_file::open): Don't set binmode
1399 here. Let it happen in base class.
1400 * fhandler_dsp.cc (fhandler_dev_dsp::open): Force binmode open. Set
1401 return value appropriately if unable to open.
1402 * fhandler_proc.cc (fhandler_proc::open): Make sure flags are set
1403 before open_status.
1404 * fhandler_process.cc (fhandler_process::open): Ditto.
1405 * fhandler_registry.cc (fhandler_registry::open): Ditto.
1406 * fhandler_random.cc (fhandler_dev_random::fhandler_dev_random): Ditto.
1407 * fhandler_raw.cc (fhandler_dev_raw::open): Force O_BINARY by default.
1408 * fhandler_serial.cc (fhandler_serial::init): Ditto.
1409 * fhandler_tty.cc (fhandler_tty_slave::open): Ditto.
1410 (fhandler_pty_master::open): Ditto.
1411 * fhandler_virtual.cc (fhandler_virtual::open): Ditto.
1412 * fhandler_windows.cc (fhandler_windows::open): Ditto.
1413 * fhandler_zero.cc (fhandler_dev_zero::open): Ditto.
1414 * net.cc (fdsock): Ditto.
1415 * path.cc (path_conv::check): Avoid checking for executable extension
1416 when directory. (Suggested by Pavel Tsekov)
1417 (set_flags): Set PATH_TEXT explicitly, when appropriate.
1418 (mount_info::conv_to_win32_path): Use set_flags() to set path flags.
1419 * path.h (PATH_TEXT): New enum.
1420 (path_conv::binmode): Return appropriate constant based on binmode.
1421 * pipe.cc (make_pipe): Set binmode to O_TEXT xor O_BINARY.
1422 * syscalls.cc (setmode_helper): Make debugging message a little
1423 clearer.
1424 (setmode): Set binmode via set_flags.
1425
4e138847
CV
14262002-06-04 Corinna Vinschen <corinna@vinschen.de>
1427
1428 * fhandler.h (class fhandler_socket): Add private method
1429 fixup_after_fork (bool, HANDLE).
1430 * fhandler_socket.cc (fhandler_socket::fixup_after_fork): Move
1431 functionality to new private method. Add closing parent socket
1432 if not called from dup(). Create method new calling private method
1433 with appropriate parameter.
1434 (fhandler_socket::fixup_after_exec): Call private method
1435 fixup_after_fork with appropriate parameter.
1436 (fhandler_socket::dup): Ditto.
1437
14382002-06-04 Corinna Vinschen <corinna@vinschen.de>
6bfca3cc
CV
1439
1440 * fhandler_dsp.cc (fhandler_dev_dsp::open): Set errno to EACCES if
1441 requested mode isn't supported.
1442
e02f1e9c
CF
14432002-06-03 Christopher Faylor <cgf@redhat.com>
1444
1445 * fhandler.cc (fhandler_base::open): Don't set binmode if already set.
1446 Don't check for file. Files should already be set. Report on binary
1447 mode for debugging.
1448 (fhandler_base::fhandler_base): Don't set default binmode here. That's
1449 for later.
1450 * fhandler_console.cc (fhandler_console::output_tcsetattr): Don't set
1451 binmode, ever, for console.
1452 * fhandler_disk_file.cc (fhandler_disk_file::open): Always set the
1453 binary mode to the value derived from mount table.
1454 * path.cc (mount_info::conv_to_win32_path): Default to binmode if path
1455 does not translate into anything in the mount table.
1456
31b98a62
CV
14572002-06-03 Corinna Vinschen <corinna@vinschen.de>
1458
1459 * external.cc (cygwin_internal): Add CW_EXTRACT_DOMAIN_AND_USER
1460 handling to call extract_nt_dom_user() from applications.
1461 * include/sys/cygwin.h (cygwin_getinfo_types): Add
1462 CW_EXTRACT_DOMAIN_AND_USER.
1463
b3c29731
CV
14642002-06-03 Corinna Vinschen <corinna@vinschen.de>
1465
1466 * syscalls.cc (stat64_to_stat32): Transform st_dev correctly.
1467 (fstat64): Add evaluating st_ino and st_dev.
1468 (stat_worker): Evaluate st_dev as 32 bit value.
1469 * include/cygwin/stat.h: Use new dev_t definition throughout.
1470 * include/cygwin/types.h: Define __dev16_t and __dev32_t. Define
1471 dev_t according to __CYGWIN_USE_BIG_TYPES__ setting.
1472 * include/sys/sysmacros.h: Define major, minor and makedev
1473 according to __CYGWIN_USE_BIG_TYPES__ setting.
1474
656c3192
CV
14752002-06-03 Pierre Humblet <pierre.humblet@ieee.org>
1476
1477 * syscalls.cc (setegid32): Verify the correctness of the gid
1478 of the group returned by getgrgid32.
1479
1eb934b7
CV
14802002-06-03 Pierre Humblet <pierre.humblet@ieee.org>
1481
1482 * security.cc (lsa2wchar): Suppressed.
1483 (get_lsa_srv_inf): Suppressed.
1484 (get_logon_server_and_user_domain): Suppressed.
1485 (get_logon_server): Essentially new.
1486 (get_user_groups): Add "domain" argument. Only lookup the
1487 designated server and use "domain" in LookupAccountName.
1488 (is_group_member): Simplify the arguments.
1489 (get_user_local_groups): Simplify the arguments. Do only a
1490 local lookup. Use "BUILTIN" and local domain in LookupAccountName.
1491 (get_user_primary_group). Only lookup the designated server.
1492 (get_group_sidlist): Remove logonserver argument. Do not lookup
1493 any server for the SYSTEM account.
1494 (create_token): Delete logonserver and call to get_logon_server.
1495 Adjust arguments of get_group_sidlist, see above.
1496 * security.h: Delete declaration of get_logon_server_and_user_domain
e35f391f 1497 and add declaration of get_logon_server.
1eb934b7
CV
1498 * uinfo.cc (internal_get_login): Call get_logon_server instead of
1499 get_logon_server_and_user_domain.
1500
37be5a67
CF
15012002-06-02 Christopher Faylor <cgf@redhat.com>
1502
e35f391f
CF
1503 * dtable.cc (handle_to_fn): Use largest match for device. Correctly
1504 (?) deal with remote drive weirdness.
37be5a67 1505
97478fe6
CF
15062002-06-02 Christopher Faylor <cgf@redhat.com>
1507
1508 * fhandler_disk_file.cc (fhandler_disk_file::fstat_by_name): Check
1509 specifically for non-existent file, first.
1510 (fhandler_disk_file::fstat): Perform fd open on files with funny
1511 characters.
1512
47413f84
CF
15132002-06-02 Christopher January <chris@atomice.net>
1514
1515 * fhandler_process.cc (fhandler_process::open): Set fileid.
1516
6b7cd251
CF
15172002-06-02 Christopher Faylor <cgf@redhat.com>
1518
1519 Remove unneeded sigproc.h includes throughout.
1520 * fhandler.h (fhandler_proc::fill_filebuf): Take a pinfo argument.
1521 * fhandler_proc.cc (fhandler_proc::get_proc_fhandler): Simplify search
1522 for given pid.
1523 (fhandler_proc::readdir): Assume that pid exists if it shows up in the
1524 winpid list.
1525 * fhandler_process.cc (fhandler_process::open): Simplify search for
1526 given pid. Call fill_filebuf with pinfo argument.
1527 (fhandler_process::fill_filebuf): Pass pinfo here and assume that it
1528 exists.
1529 * pinfo.h (pinfo::remember): Define differently if sigproc.h is not
1530 included.
1531
15322002-06-02 Christopher Faylor <cgf@redhat.com>
1533
1534 * dll_init.cc (dll_list::detach): Don't run destructor on exit.
1535
e065a187
CF
15362002-06-01 Christopher Faylor <cgf@redhat.com>
1537
1538 * fhandler.cc (fhandler_base::fstat): Move dev and ino calculation into
1539 caller.
1540 * syscalls.cc (stat_worker): Calculate dev and ino calculation here, if
1541 zero.
1542 * fhandler_proc.cc (fhandler_proc::fhandler_proc): Minor reorg for
1543 debugging.
1544 * fhandler_process.cc (fhandler_process::exists): Return 0 on
1545 nonexistence.
1546 (fhandler_process::fstat): Simplify pid logic.
1547 * fhandler_tape.cc (fhandler_dev_tape::fstat): Minor reformatting.
1548
60abf1c4
CF
15492002-06-01 Christopher Faylor <cgf@redhat.com>
1550
1551 * path.cc (chdir): Don't allow cd'ing to a non-directory virtual path.
1552
28af03fa
CF
15532002-05-31 Christopher Faylor <cgf@redhat.com>
1554
1555 * fhandler_disk_file.cc (readdir): Move inode calculation into caller.
1556 (fhandler_cygdrive::readdir): Add "." and "..".
1557 * dir.cc (readdir): Move inode calculation here so that fhandler
1558 readdirs can benefit.
1559
8e74c320
CF
15602002-05-31 Christopher Faylor <cgf@redhat.com>
1561
1562 * fhandler_console.cc (fhandler_console::open): Reinstate setting of
1563 flags.
1564
30478f15
CF
1565 * dtable.cc (dtable::init_std_file_from_handle): Default to using
1566 binmode derived from path_conv, when required.
1567 * fhandler.h (fhandler_base::get_w_binary): Default to binmode if
1568 nothing else is specified.
1569 * fhandler.h (fhandler_base::get_r_binary): Ditto.
1570
1571 * fhandler_disk_file.cc (fhandler_disk_file::fstat_by_handle): Work
1572 around g++ warning.
1573
1574 * path.cc (path_conv::check): Remove a debugging statement.
1575
de86e35b
CF
15762002-05-31 Christopher Faylor <cgf@redhat.com>
1577
1578 * fhandler_console.cc (fhandler_console::open): Always default to
1579 binmode.
1580 (fhandler_console::write_normal): Don't honor binmode setting. There
1581 is already a termios setting for this.
1582 (fhandler_console::init): Correct argument order in init call.
1583
8461f41e
CF
15842002-05-31 Christopher Faylor <cgf@redhat.com>
1585
1586 * fhandler.cc (fhandler_base::open): Make default open mode == binmode.
1587 (fhandler_base::init): Set open flags based on derived binmode argument.
1588
bcd0ed9f
CF
15892002-05-31 Christopher Faylor <cgf@redhat.com>
1590
1591 * dll_init.cc (dll_list::init): Eliminate unneeded debugging statement.
1592
18c04cc4
CF
15932002-05-31 Christopher Faylor <cgf@redhat.com>
1594
1595 * fhandler_proc.cc (fhandler_proc::readdir): Set errno when no more
1596 files.
1597 * fhandler_process.cc (fhandler_process::readdir): Ditto.
1598 * fhandler_registry.cc (fhandler_registry::readdir): Ditto.
1599
69be001c
CF
16002002-05-30 Christopher Faylor <cgf@redhat.com>
1601
1602 * path.cc (path_conv::check): Set fileattr to INVALID_FILE_ATTRIBUTES
1603 for nonexistent virtual device path.
1604 (chdir): Set correct errno when attempt is made to cd to nonexistent
1605 virtual device path.
1606
5d8c7a56
CF
16072002-05-30 Christopher Faylor <cgf@redhat.com>
1608
1609 * fhandler_disk_file.cc (fhandler_disk_file::fstat): Always call
1610 fstat_by_name if fd is not opened to allow fstat_by_name to properly
1611 set errno.
1612
d74eced5
CV
16132002-05-30 Corinna Vinschen <corinna@vinschen.de>
1614
1615 * autoload.cc: Replace autoload statments for ZwXXX by NtXXX.
1616 Drop ZwQuerySystemInformation since NtQuerySystemInformation was
1617 already available.
1618 * fhandler_proc.cc (format_proc_uptime): Replace call to
1619 ZwQuerySystemInformation by call to NtQuerySystemInformation.
1620 (format_proc_stat): Ditto.
1621 * fhandler_process.cc (format_process_stat): Replace call to
1622 ZwQueryInformationProcess by call to NtQueryInformationProcess.
1623 (get_process_state): Ditto.
1624 (get_mem_values): Ditto. Replace call to ZwQueryVirtualMemory by
1625 call to NtQueryVirtualMemory.
1626 * ntdll.h: Cleanup. Drop ZwQuerySystemInformation since
1627 NtQuerySystemInformation was already available. Replace declarations
1628 of ZwXXX functions by declarations of NtXXX.
1629 * pinfo.cc (winpids::enumNT): Replace call to ZwQuerySystemInformation
1630 by call to NtQuerySystemInformation.
1631
5d8c7a56
CF
16322002-05-29 Christopher Faylor <cgf@redhat.com>
1633
1634 * fhandler.cc (binmode): Default to binmode when mode is not known.
1635
186637a5
CF
16362002-05-29 Christopher Faylor <cgf@redhat.com>
1637
1638 * include/sys/cygwin.h (EXTERNAL_PINFO_VERSION): Reinstate.
1639 * external.cc (fillout_pinfo): Use it.
1640
3a571063
CV
16412002-05-29 Corinna Vinschen <corinna@vinschen.de>
1642
1643 * external.cc (fillout_pinfo): Use new version define.
1644 * include/sys/cygwin.h (external_pinfo): Define
1645 EXTERNAL_PINFO_VERSION_16_BIT and EXTERNAL_PINFO_VERSION_32_BIT
1646 instead of just EXTERNAL_PINFO_VERSION.
1647
9fef0139
CF
16482002-05-29 Christopher Faylor <cgf@redhat.com>
1649
1650 * external.cc (fillout_pinfo): Set new version field in external_pinfo
1651 structure.
1652 * include/sys/cygwin.h (external_pinfo): Replace strace_file with
1653 version field.
1654
a8d7ae61
CV
16552002-05-29 Corinna Vinschen <corinna@vinschen.de>
1656
1657 Change internal uid datatype from __uid16_t to __uid32_t
1658 throughout.
1659 * cygwin.din: Export new symbols getpwuid32, getpwuid_r32, getuid32,
1660 geteuid32, setuid32, seteuid32.
1661 * passwd.cc (getpwuid32): New function.
1662 (getpwuid_r32): Ditto.
1663 * syscalls.cc (seteuid32): Ditto.
1664 (setuid32): Ditto.
1665 * uinfo.cc (getuid32): Ditto.
1666 (geteuid32): Ditto.
d4000bc4 1667 * winsup.h (uid16touid32): New macro, correct casting from __uid16_t
a8d7ae61
CV
1668 to __uid32_t.
1669 (gid16togid32): Ditto fir gids.
1670 (getuid32): Declare.
1671 (geteuid32): Ditto.
1672 (getpwuid32): Ditto.
1673 * include/sys/cygwin.h (struct external_pinfo): Add members uid32 and
1674 gid32.
1675
9854c44c
CV
16762002-05-29 Corinna Vinschen <corinna@vinschen.de>
1677
1678 * include/cygwin/socket.h: Protect some symbols against multiple
1679 definition.
1680 * include/netinet/ip.h: Ditto.
1681 * include/netinet/tcp.h: Ditto.
1682
16832002-05-29 Wu Yongwei <adah@netstd.com>
1684
1685 * include/netinet/ip.h: Replace by BSD derived version of the file.
1686 * include/netinet/tcp.h: Ditto.
1687 * include/netinet/udp.h: New file.
1688 * include/cygwin/ip.h: Remove.
1689
cef69559
CF
16902002-05-29 Christopher Faylor <cgf@redhat.com>
1691
1692 * dtable.cc (dtable::init_std_file_from_handle): Attempt stronger
1693 detection of invalid handle.
1694 (handle_to_fn): Detect pathological condition where NT resets the
1695 buffer pointer to NULL on an invalid handle.
1696
a761ad82
CF
16972002-05-28 Christopher Faylor <cgf@redhat.com>
1698
1699 * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Properly
1700 check for whether we should be opening the file to search for #!
654783b6
CF
1701 characters. Set path_conv structure execability, too, when
1702 appropriate.
a761ad82 1703
7ea70e99
CV
17042002-05-28 Corinna Vinschen <corinna@vinschen.de>
1705
1706 * security.cc (set_security_attribute): Call getegid32() instead of
1707 getegid().
1708 * include/cygwin/grp.h: Declare getegid32().
1709
57196405
CV
17102002-05-28 Corinna Vinschen <corinna@vinschen.de>
1711
1712 Change internal gid datatype from __gid16_t to __gid32_t
1713 throughout.
1714 * cygwin.din: Export new symbols chown32, fchown32, getegid32,
1715 getgid32, getgrgid32, getgrnam32, getgroups32, initgroups32, lchown32,
1716 setgid32, setegid32, getgrent32.
1717 * grp.cc (grp32togrp16): New static function.
1718 (getgrgid32): New function.
1719 (getgrnam32): Ditto.
1720 (getgrent32): Ditto.
1721 (getgroups32): Change name of internal function from getgroups.
1722 (getgroups32): New function.
1723 (initgroups32): Ditto.
1724 * syscalls.cc (chown32): Ditto.
1725 (lchown32): Ditto.
1726 (fchown32): Ditto.
1727 (setegid32): Ditto.
1728 (setgid32): Ditto.
1729 * uinfo.cc (getgid32): Ditto.
1730 (getegid32): Ditto.
1731 * include/cygwin/grp.h: Remove declaration of getgrgid() and getgrnam().
1732 Declare getgrgid32() and getgrnam32() instead. Declare getgid32().
1733
0c12979b
CF
17342002-05-27 Christopher Faylor <cgf@redhat.com>
1735
1736 * autoload.cc (noload): Properly mask low order word for determining
1737 number of bytes to pop.
1738
57e2ae68
CF
17392002-05-27 Christopher Faylor <cgf@redhat.com>
1740
1741 * fhandler_disk_file.cc (fhandler_disk_file::fstat): Minor logic
1742 cleanup.
1743
2402700d
CF
17442002-05-27 Christopher Faylor <cgf@redhat.com>
1745
1746 * autoload.cc (LoadFuncEx): Define via new LoadFuncEx2 macro.
1747 (LoadFuncEx2): Adapted from LoadFuncEx. Provides control of return
1748 value for nonexistent function.
1749 (NtQueryObject): Declare.
1750 (IsDebuggerPresent): Declare via LoadFuncEx2 and always return true if
1751 not available.
1752 * debug.h (being_debugged): Just rely on IsDebuggerPresent return
1753 value.
1754 * dtable.cc (handle_to_fn): New function.
1755 (dtable::init_std_file_from_handle): Attempt to derive std handle's
1756 name via handle_to_fn.
1757 (dtable::build_fhandler_from_name): Fill in what we can in path_conv
1758 structure when given a handle and path doesn't exist.
1759 * fhandler.cc (fhandler_base::open): Don't set the file pointer here.
1760 Use pc->exists () to determine if file exists rather than calling
1761 GetFileAttributes again.
1762 * fhandler.h (fhandler_base::exec_state_isknown): New method.
1763 (fhandler_base::fstat_helper): Add extra arguments to declaration.
1764 (fhandler_base::fstat_by_handle): Declare new method.
1765 (fhandler_base::fstat_by_name): Declare new method.
1766 * fhandler_disk_file (num_entries): Make __stdcall.
1767 (fhandler_base::fstat_by_handle): Define new method.
1768 (fhandler_base::fstat_by_name): Define new method.
1769 (fhandler_base:fstat): Call fstat_by_{handle,name} as appropriate.
1770 (fhandler_disk_file::fstat_helper): Accept extra arguments for filling
1771 out stat structure. Move handle or name specific stuff to new methods
1772 above.
1773 (fhandler_disk_file::open): Use real_path->exists rather than calling
1774 GetFileAttributes again.
1775 * ntdll.h (FILE_NAME_INFORMATION): Define new structure.
1776 (OBJECT_INFORMATION_CLASS): Partially define new enum.
1777 (OBJECT_NAME_INFORMATION): Define new structure.
1778 (NtQueryInformationFile): New declaration.
1779 (NtQueryObject): New declaration.
1780 * path.cc (path_conv::fillin): Define new method.
1781 * path.h (path_conv::fillin): Declare new method.
1782 (path_conv::drive_thpe): Rename from 'get_drive_type'.
1783 (path_conv::volser): Declare new method.
1784 (path_conv::volname): Declare new method.
1785 (path_conv::root_dir): Declare new method.
1786 * syscalls.cc (fstat64): Send real path_conv to fstat as second
1787 argument.
1788
74b2f73e
CV
17892002-05-24 Pierre Humblet <pierre.humblet@ieee.org>
1790
1791 * security.cc (lsa2str): New function.
1792 (get_priv_list): Call lsa2str instead of sys_wcstombs.
1793
75bf2931
CV
17942002-05-22 Pierre Humblet <pierre.humblet@ieee.org>
1795
1796 * syscalls.cc (seteuid): Do not take allow_ntsec into account.
1797 Attempt to use an existing or new token even when the uid
1798 matches orig_uid, but the gid is not in the process token.
1799 Major reorganization after several incremental changes.
1800 (setegid): Do not take allow_ntsec into account. Minor
1801 reorganization after several incremental changes.
1802
918a268c
CF
18032002-05-26 Christopher Faylor <cgf@redhat.com>
1804
1805 * debug.h (being_debugged): New macro.
1806 * dtable.cc (dtable::extend): Use new macro.
1807 * exceptions.cc (try_to_debug): Ditto.
1808 * strace.cc (strace::hello): Only output debugging info when we think
1809 we're being debugged.
1810
0cfbfc24
CF
18112002-05-25 Robert Collins <rbtcollins@hotmail.com>
1812
1813 * winsup.h: Remove duplicate declarations of malloc_lock and
1814 malloc_unlock.
1815
d7b4a300
CF
18162002-05-24 Christopher Faylor <cgf@redhat.com>
1817
1818 Remove unneeded sync.h, where appropriate, throughout.
1819 Remove unneeded heap.h, where appropriate, throughout.
1820 Remove unneeded exceptions.h, where appropriate, throughout.
1821 Remove unneeded perprocess.h, where appropriate, throughout.
1822
908f9b65
CV
18232002-05-22 Pierre Humblet <pierre.humblet@ieee.org>
1824
1825 * security.cc (create_token): Call __sec_user() instead of
1826 sec_user() to remove dependence on allow_ntsec. Verify that
1827 the returned sd is non-null.
1828
a6247be9
RC
18292002-05-25 Robert Collins <rbtcollins@hotmail.com>
1830
1831 * gmon.c (fake_sbrk): Correctly return -1 on failed malloc's.
1832
ff938546
CF
18332002-05-24 Christopher Faylor <cgf@redhat.com>
1834
1835 * dtable.cc (dtable::build_fhandler_from_name): Just pass posix path
1836 along to set_name via return_and_clear_normalized_path.
1837 (dtable::build_fhandler): New method with const char * argument.
1838 (dtable::reset_unix_path_name): Eliminate.
1839 (dtable::dup_worker): Use correct build_fhandler method.
1840 * mmap.cc (mmap_record::alloc_fh): Ditto.
1841 * dtable.h (dtable::build_fhandler): New method.
1842 (dtable::reset_unix_path_name): Eliminate.
1843 * fhandler.cc (fhandler_base::set_name): Assume that unix_name has
1844 already been cmalloced.
1845 (fhandler_base::reset_unix_path_name): Eliminate.
1846 (fhandler_base::~fhandler_base): Coercion for cfree.
1847 * fhandler.h (fhandler_base::unix_path_name): Make const char *.
1848 (fhandler_base::win32_path_name): Ditto.
1849 (fhandler_base::reset_unix_path_name): Eliminate.
1850 * fhandler_disk_file.cc (fhandler_cygdrive::set_drives): Accommodate
1851 const char *ness of win32_path_name.
1852 * fhandler_socket.cc (fhandler_socket::fstat): Accommodate new set_name
1853 requirements.
1854 * path.cc (path_conv::return_and_clear_normalized_path): New method.
1855 (path_conv::clear_normalized_path): Eliminate.
1856 (path_conv::~path_conv): Ditto.
1857 (path_conv::check): Accommodate new build_fhandler method.
1858 * path.h (path_conv::~path_conv): Eliminate.
1859 (path_conv::clear_normalized_path): Ditto.
1860 (path_conv::return_and_clear_normalized_path): Declare new method.
1861
b4bb31ad
CF
18622002-05-23 Christopher Faylor <cgf@redhat.com>
1863
1864 * path.cc (path_conv::check): Make sure any trailing path component is
1865 part of potential normalized posix path.
1866
b2f338e9
CF
18672002-05-23 Christopher Faylor <cgf@redhat.com>
1868
1869 * smallprint.c (__small_vsprintf): Implement '%o' after all these
1870 years.
1871
fc240f58
CF
18722002-05-22 Christopher Faylor <cgf@redhat.com>
1873
1874 * fhandler.h (fhandler_virtual::exists): Eliminate path argument.
1875 (fhandler_proc::exists): Ditto.
1876 (fhandler_registry::exists): Ditto.
1877 (fhandler_process::exists): Ditto.
1878 * fhandler_proc.cc (fhandler_proc::exists): Ditto. Use built-in name.
1879 * fhandler_process.cc (fhandler_process::exists): Ditto.
1880 (fstat): Ditto.
1881 * fhandler_registry.cc (fhandler_registry::exists): Ditto.
1882 (fhandler_registry::fstat): Ditto.
1883 * fhandler_virtual.cc (fhandler_virtual::opendir): Ditto.
1884 * path.cc (path_conv::check): Ditto. Add debugging.
1885
18862002-05-22 Christopher Faylor <cgf@redhat.com>
1887
1888 * syscalls.cc (dup): Always call dup2 for error handling.
1889
1d2b71d6
CV
18902002-05-22 Corinna Vinschen <corinna@vinschen.de>
1891
1892 * include/cygwin/types.h: Revert previous patch.
1893
36f86a55
CV
18942002-05-22 Corinna Vinschen <corinna@vinschen.de>
1895
1896 * include/cygwin/types.h: Define pthread stuff only if _POSIX_THREADS
1897 is defined.
1898
2d6ce5c2
CV
18992002-05-19 Pierre Humblet <pierre.humblet@ieee.org>
1900
fc240f58 1901 * security.cc (open_local_policy): Initialize lsa to
2d6ce5c2
CV
1902 INVALID_HANDLE_VALUE instead of NULL.
1903 (get_logon_server_and_user_domain): Test for INVALID_HANDLE_VALUE
1904 instead of NULL.
1905 (create_token): Both of the above.
1906
9ded8bd8
CF
19072002-05-18 Christopher Faylor <cgf@redhat.com>
1908
1909 * fhandler_disk_file.cc (fhandler_disk_file::fstat): Make handling of
1910 nlink consistent for remote files.
1911
2701126a
CF
19122002-05-18 Christopher Faylor <cgf@redhat.com>
1913
1914 * path.cc (path_conv::check): Always set executable bit for executable
1915 extension.
1916
b05b7d84
CF
19172002-05-17 Christopher Faylor <cgf@redhat.com>
1918
1919 * fhandler.cc (fhandler_base::lseek): Avoid calling SetFilePointer with
1920 high order part of 64 bit address on OS's which do not support that
1921 kind of operation. Otherwise Windows 95 will become confused.
1922
d6dc9825
CV
19232002-05-16 Pierre Humblet <pierre.humblet@ieee.org>
1924
1925 * fhandler_raw.cc (fhandler_dev_raw::open): Replace set_errno()
1926 by __seterrno_from_win_error().
1927 * security.cc (open_local_policy): Ditto.
1928 (get_lsa_srv_inf): Ditto.
1929 (get_user_groups): Ditto.
1930 (get_user_primary_group): Ditto.
1931 (create_token): Ditto.
1932 (subauth): Ditto.
1933
35a89cbe
CV
19342002-05-17 Corinna Vinschen <corinna@vinschen.de>
1935
1936 * times.cc (utimes): Use FILE_WRITE_ATTRIBUTES even on 9x/Me when
1937 opening file for writing timestamp.
1938 * wincap.cc: Remove flag has_specific_access_rights.
1939 * wincap.h: Ditto.
1940
ebbdc703
CV
19412002-05-13 Pierre Humblet <pierre.humblet@ieee.org>
1942
1943 * syscalls.cc (seteuid): Set default dacl in process token.
1944 Replace in-line code by call to verify_token().
1945 (setegid): Reverse change from 2002-01-21. Add call to
1946 RevertToSelf and set primary group in impersonation token.
1947 * security.cc (create_token): Store pgrpsid in token security
1948 descriptor, except if it already appears in my_grps.
1949 Use sec_acl() in place of get_dacl().
1950 (verify_token): Create from code in seteuid(), with tighter checks.
c2102631 1951 (get_dacl): Deleted.
ebbdc703
CV
1952 (get_group_sidlist): Add argument to indicate if pgrpsid is already
1953 in the groups.
1954 * security.h: Define verify_token().
1955 * autoload.cc: Load GetKernelObjectSecurity().
1956
feb7f1a9
CF
19572002-05-13 Mark Bradshaw <bradshaw@staff.crosswalk.com>
1958
1959 * cygwin.din: Add strlcat and strlcpy.
1960 * include/cygwin/version.h: Increment API minor version number.
1961
fc240f58 19622002-05-09 Pierre Humblet <pierre.humblet@ieee.org>
043bc3e1
CV
1963
1964 * shared.cc (__sec_user): Split into sec_acl() and call orig_sid().
1965 (sec_acl): Create from part of __sec_user(), except creator/owner.
1966 * security.h: Define sec_acl() and MAX_DACL_LEN.
1967
c8b20196
CF
19682002-05-12 Christopher Faylor <cgf@redhat.com>
1969
1970 * fhandler_disk_file.cc (fhandler_disk_file::open): Avoid using
1971 O_DIROPEN when OS doesn't support it. Return proper errno in that
1972 case.
1973
b4f8d31f
CF
19742002-05-12 Christopher Faylor <cgf@redhat.com>
1975
56caca1d
CF
1976 * syscalls.cc (_read): Change error to EBADF if attempt to read from a
1977 non-readable fd.
b4f8d31f 1978
29ee580d
CF
19792002-05-11 Christopher Faylor <cgf@redhat.com>
1980
1981 * fhandler.h (executable_states): For now, make dont_care_if_executable
1982 equivalent to not_executable.
1983 * sys/mount.h: Define MOUNT_NOTEXEC.
1984 * path.h (fs_info): New class.
1985 (path_conv): Move fs-specific fields to new 'fs' structure.
1986 (path_conv::update_fs_info): Move to fs_info and rename to just 'update'.
1987 * path.cc (fs_info::update): Ditto. Return 'true' if successful.
1988 (fillout_mntent): Add ',noexec' to list of reported options.
1989
b84621d2
CF
19902002-05-11 Christopher Faylor <cgf@redhat.com>
1991
1992 * fhandler_virtual.cc (fhandler_virtual::close): Quiet a compiler
1993 warning.
1994
9ba913a5
CF
19952002-05-10 Christopher January <chris@atomice.net>
1996
1997 * autoload.cc: Add dynamic load statements for
1998 'ZwQueryInformationProcess' and 'ZwQueryVirtualMemory'.
1999 * fhandler.h: Change type of bufalloc and filesize members of
2000 fhandler_virtual from int to size_t. Change type of position member
2001 from __off32_t to __off64_t. Add new fileid member to fhandler_virtual
2002 class. Make seekdir take an __off64_t argument. Make lseek take an
2003 __off64_t argument. Add fill_filebuf method to fhandler_virtual. Add
2004 fill_filebuf method to fhandler_proc. Add fill_filebuf method to
2005 fhandler_registry. Add fill_filebuf method to fhandler_process. Add
2006 saved_pid and saved_p members to fhandler_process.
2007 * fhandler_proc.cc (proc_listing_array): Add 'loadavg', 'meminfo', and 'stat'.
2008 (proc_fhandlers array): Ditto.
2009 (fhandler_proc::open): Use fill_filebuf to flesh out the file contents.
2010 (fhandler_proc::fill_filebuf): New method.
2011 (fhandler_proc::format_proc_meminfo): Ditto.
2012 (fhandler_proc::format_proc_stat): Ditto.
2013 (fhandler_proc::format_proc_uptime): Ditto.
2014 * fhandler_process.cc (process_listing): Add 'stat' and 'statm'.
2015 (fhandler_process::fstat): Find the _pinfo structure for the process
2016 named in the filename. Return ENOENT if the process is no longer
2017 around. Set the gid and uid fields of the stat structure.
2018 (fhandler_process::open): Store pid and pointer to _pinfo structure in
2019 saved_pid and saved_p respectively. Use fill_filebuf to flesh out file
2020 contents.
2021 (fhandler_proc::fill_filebuf): New method.
2022 (format_process_stat): New function.
2023 (format_process_status): Ditto.
2024 (format_process_statm): Ditto.
2025 (get_process_state): Ditto.
2026 (get_mem_values): Ditto.
2027 * fhandler_registry.cc (fhandler_registry::seekdir): Change argument
2028 type from __off32_t to __off64_t.
2029 (fhandler_registry::fill_filebuf): New method.
2030 * fhandler_virtual.cc (fhandler_virtual::seekdir): Change argument type
2031 from __off32_t to __off64_t.
2032 (fhandler_virtual::lseek): Ditto.
2033 (fhandler_virtual::fill_filebuf): New method.
2034 (fhandler_virtual::fhandler_virtual): Initialise fileid to -1.
2035 * wincap.cc: Set flag has_process_io_counters appropriately.
2036 * wincap.h: Add flag has_process_io_counters.
2037
20382002-05-09 Christopher Faylor <cgf@redhat.com>
f561f644
CF
2039
2040 * syscalls.cc (_write): Change error to EBADF if attempt to write to a
56caca1d 2041 non-writeable fd.
f561f644 2042
6327de5f
CV
20432002-05-08 Corinna Vinschen <corinna@vinschen.de>
2044
2045 * cygheap.h (class cygheap_user): Add member `orig_psid'.
2046 Add method `orig_sid()'.
2047 * cygheap.cc (cygheap_user::set_sid): Maintain orig_psid.
2048
795b46cf
CV
20492002-04-28 Norbert Schulze <norbert.schulze@web.de>
2050
2051 * localtime.cc (tzsetwall): Use wildabbr if generated timezone name
2052 length < 3.
2053
a9917779
CV
20542002-05-05 Pierre Humblet <pierre.humblet@ieee.org>
2055
2056 * spawn.cc (spawn_guts): Move call to set_process_privilege()
2057 to load_registry_hive().
2058 * registry.cc (load_registry_hive): ditto.
2059 * fork.cc (fork_parent): Call sec_user_nih() only once.
2060
20612002-05-04 Christopher January <chris@atomice.net>
13ee3618
CF
2062
2063 * path.h (path_conv::path_conv): Initialise normalized_path to NULL.
2064
8761c1dc
CF
20652002-05-03 Christopher Faylor <cgf@redhat.com>
2066
2067 * net.cc (getdomainname): Change second argument of getdomainname to
2068 size_t.
2069
20702002-05-03 Christopher January <chris@atomice.net>
2071
2072 * fhandler_proc.cc (proc_listing): Add '.' and '..' to directory
2073 listing.
2074 (fhandler_proc::open): Change use of mode to flags. If the file does
2075 not exist already, fail with EROFS if O_CREAT flag is set. Change
2076 EROFS error to EACCES error when writing to a file. Use cmalloc to
2077 allocate memory for filebuf.
2078 (fhandler_proc::close): Use cfree to free filebuf.
2079 (fhandler_proc::get_proc_fhandler): Properly detect attempts to access
2080 unknown subdir.
2081 * fhandler_process.cc (process_listing): Add '.' and '..' to directory
2082 listing.
2083 (fhandler_process::open): Use cmalloc to allocate memory for filebuf.
2084 (fhandler_process::close): Use cfree to free filebuf.
2085 * fhandler_registry.cc (registry_listing): Add . and '..' to directory
2086 listing.
2087 (fhandler_registry::open): Move check for open for writing before
2088 open_key. Use cmalloc to allocate memory for filebuf.
2089 (fhandler_registry::close): Use cfree to free filebuf.
2090 (fhandler_registry::telldir): Use lower 16 bits of __d_position as
2091 position in directory.
2092 (fhandler_registry::seekdir): Ditto.
2093 * fhandler_virtual.cc (fhandler_virtual::write): Change EROFS error to
2094 EACCES error.
2095 (fhandler_virtual::open): Set the NOHANDLE flag.
2096 (fhandler_virtual::dup): Add call to fhandler_base::dup. Allocate
2097 child's filebuf using cmalloc. Copy filebuf from parent to child.
2098 (fhandler_virtual::close): Use cfree to free filebuf.
2099 (fhandler_virtual::~fhandler_virtual): Ditto.
2100 (from Chris Faylor <cgf@redhat.com>).
2101 (fhandler_registry::readdir): Add support for '.' and '..' files in
2102 subdirectories of /proc/registry.
2103 * path.cc (path_conv::check): Do not return ENOENT if a file is not
2104 found in /proc.
2105
335c87f9
CF
21062002-05-02 Christopher Faylor <cgf@redhat.com>
2107
2108 * fhandler_proc.cc (fhandler_proc::fstat): Use fhandler name rather
2109 than path_conv name.
2110 (fhandler_proc::open): Ditto.
2111 * fhandler_process.cc (fhandler_process::fstat): Use fhandler name
2112 rather than path_conv name.
2113 (fhandler_process::open): Ditto.
2114 * fhandler_registry.cc (fhandler_registry::fstat): Use fhandler name
2115 rather than path_conv name.
2116 (fhandler_registry::open): Ditto.
2117 * path.cc (path_conv::check): Don't copy posix path when virtual.
2118 (mount_info::conv_to_win32_path): Don't zero string when isproc. Just
2119 derive normal windows path.
2120
2121 * path.h (path_conv::clear_normalized_path): Declare new method.
2122 * path.cc (path_conv::clear_normalized_path): Define new method.
2123 * dtable.cc (build_fhandler_from_name): Clear normalized path when
2124 finished to conserve space.
2125
3bb7eb44
CF
21262002-05-02 Christopher Faylor <cgf@redhat.com>
2127
2128 * fhandler_proc.cc (fhandler_proc::fstat): Prime with information from
2129 fhandler_base::fstat. Use defines rather than constants for permission
2130 settings.
2131
d055ecb0
CV
21322002-04-30 Eric Blake <ebb9@email.byu.edu>
2133
2134 * path.cc (hash_path_name): Improve hash function strength.
2135
37143995
RC
21362002-05-02 Robert Collins <rbtcollins@hotmail.com>
2137
2138 * thread.cc (__pthread_cond_dowait): Fix a race on signalling from a
2139 thread woken by the same condition variable it's signalling on. Thanks
2140 to Michael Beach for the report and test case.
2141
291be307
CF
21422002-05-02 Christopher Faylor <cgf@redhat.com>
2143
2144 * path.h (pathconv_arg): Add PC_POSIX.
2145 (path_conv): Add normalized_path field.
2146 * path.cc (path_conv::~path_conv): New destructor.
2147 (path_conv::check): Set normalized_path, where appropriate.
2148 * dtable.cc (build_fhandler_from_name): Use normalized path from
2149 path_conv.
2150 * syscalls.cc (chroot): Ditto.
2151
2152 * cygheap.h: Remove path_prefix_p declaration.
2153
21542002-02-26 Christopher January <chris@atomice.net>
2155 Christopher Faylor <cgf@redhat.com> (minor fixups)
2156
2157 * Makefile.in: Add fhandler_proc.o, fhandler_registry.o,
2158 fhandler_process.o and fhandler_virtual.o.
2159 * dtable.cc (dtable::build_fhandler): Add entries for FH_PROC,
2160 FH_REGISTRY and FH_PROCESS. Set unix_name to the normalized posix
2161 path.
2162 * fhandler.h: Add constants for FH_PROC, FH_REGISTRY and FH_PROCESS.
2163 Add class declarations for fhandler_virtual, fhandler_proc,
2164 fhandler_registry and fhandler_virtual. Update fhandler_union
2165 accordingly.
2166 * fhandler_proc.cc: New file. Add implementation for fhandler_proc.
2167 * fhandler_virtual.cc: New file. Add implementation for
2168 fhandler_virtual.
2169 * fhandler_process.cc: New file. Add implementation for
2170 fhandler_process.
2171 * fhandler_registry.cc: New file. Add implementation for
2172 fhandler_registry.
8761c1dc
CF
2173 * path.cc (isproc): New macro.
2174 (isvirtual_dev): Ditto.
291be307
CF
2175 * path.cc (path_conv::check): Add check for virtual devices.
2176 * path.cc (mount_info::conv_to_win32_path): Convert paths in /proc to
2177 empty Win32 paths.
2178 * path.cc (chdir): Replace check for FH_CYGDRIVE with more generic
2179 isvirtual_dev macro. Force setting of posix path for virtual
2180 fhandlers.
8761c1dc 2181 * path.h (path_prefix_p): Declare.
291be307
CF
2182
2183
fee93846
CF
2184Wed May 1 16:06:02 2002 Jason Tishler <jason@tishler.net>
2185
2186 * include/cygwin/types.h: Include <sys/sysmacros.h>.
2187
9b15f5fa
CV
2188Wed Apr 17 11:27:04 2002 Jason Tishler <jason@tishler.net>
2189
2190 * security.cc (get_lsa_srv_inf): Prevent extraneous backslashes for
2191 the NT Domain case.
2192
4deace13
CV
21932002-04-12 Corinna Vinschen <corinna@vinschen.de>
2194
2195 * net.cc (cygwin_accept): Set socket type for accepted socket.
2196 (socketpair): Set socket type for both sockets.
2197
21982002-04-12 Egor Duda <deo@logos-m.ru>
2199
291be307 2200 * fhandler.h (class fhandler_socket): New member to store socket type.
4deace13
CV
2201 (fhandler_socket::get_socket_type): Access it.
2202 (fhandler_socket::set_socket_type): Ditto.
2203 * net.cc (cygwin_socket): Store socket type.
2204 (cygwin_connect): Disable security checks for connectionless sockets.
2205 (cygwin_accept): Ditto.
2206
dbe67a81
CF
22072002-04-09 Mark Bradshaw <bradshaw@staff.crosswalk.com>
2208
2209 * cygwin.din: Add strptime.
2210 * include/cygwin/version.h: Increment API version number.
2211
464b3e80
CV
22122002-04-09 Corinna Vinschen <corinna@vinschen.de>
2213
2214 * fork.cc (fork_child): Call fixup_mmaps_after_fork() somewhat earlier.
2215
d78bda7b
CV
22162002-04-09 Corinna Vinschen <corinna@vinschen.de>
2217
2218 * fhandler.cc (fhandler_base::open): Set read-only bit in
2219 file_attributes when adequate.
2220
8996623b
CF
22212002-03-28 Christopher Faylor <cgf@redhat.com>
2222
2223 * times.cc (gettimeofday): Fix typo in previous patch.
2224
7d7524e5
CF
22252002-03-27 Wu Yongwei <adah@netstd.com>
2226
2227 * times.cc (gettimeofday): Revert to setting timezone info if tz !=
2228 NULL.
2229
2f3126f6
CF
22302002-03-21 Christopher Faylor <cgf@redhat.com>
2231
2232 * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Always set
2233 st_[ug]id to value derived from get_file_attributes.
2234
45d2ea8a
CF
22352002-03-21 Christopher Faylor <cgf@redhat.com>
2236
2237 * spawn.cc (find_exec): Return input if file not found.
2238
99dbafac
CV
22392002-03-19 Boris Schaeling <boriss@web.de>
2240
291be307 2241 * poll.cc (poll): Add support for invalid descriptors.
99dbafac 2242
b0359971
RC
22432002-03-15 Robert Collins <rbtcollins@hotmail.com>
2244
2245 * fhandler.h (fhandler_termios::lseek): Override lseek.
2246 * fhandler_termios.cc (fhandler_termios::lseek): Implement this.
2247
59a2339f
CF
22482002-03-15 Christopher Faylor <cgf@redhat.com>
2249
2250 * cygserver.cc: Include stdlib.h for exit declaration.
2251 * threaded_queue.cc: Ditto.
2252
ca175377
CF
22532002-03-15 Christopher Faylor <cgf@redhat.com>
2254
2255 * pinfo.cc (pinfo::init): Use PID_ALLPIDS flag to control when a
2256 redirected block should be marked as nonexistent.
2257 (winpids::add): Use PID_ALLPIDS when looking for all pids.
2258 * cygwin.h (PID_ALLPIDS): New enum element.
2259
d78bda7b 22602002-03-15 Corinna Vinschen <corinna@vinschen.de>
2f263187 2261
291be307 2262 * glob.c (stat32_to_STAT): New function.
2f263187
CV
2263 (g_lstat): Call user space functions always with 32 bit struct stat
2264 as a workaround.
2265 (g_stat): Ditto.
2266 * include/glob.h (struct glob): Don't prototype function pointers
2267 when compiling Cygwin.
2268
4af6d4a9
CF
22692002-03-14 Christopher Faylor <cgf@redhat.com>
2270
2271 * pinfo.cc (pinfo::init): Properly handle execed process stub when
2272 PID_NOREDIR is specified.
2273
6ea9c716
CV
22742002-03-13 Boris Schaeling <boriss@web.de>
2275
e10c087b
CF
2276 * poll.cc (poll): Remove variable open_fds. Rearrange and add code to
2277 fix settings of revents.
6ea9c716 2278
d78bda7b 22792002-03-13 Corinna Vinschen <corinna@vinschen.de>
bbe09139
CV
2280
2281 * mmap.cc (mmap_record::map_map): Return -1 if VirtualProtect fails.
2282 (list::erase): New method with no argument. Erase latest record
2283 added.
2284 (mmap64): Fail if map_map() fails.
2285
d78bda7b 22862002-03-12 Corinna Vinschen <corinna@vinschen.de>
cb4589f4
CV
2287
2288 * sysconf.cc (sysconf): Fix condition.
2289
d78bda7b 22902002-03-11 Corinna Vinschen <corinna@vinschen.de>
2817e0dc
CV
2291
2292 * mmap.cc (msync): Check area given by addr and len for being a
2293 contigeous mmap'd region.
2294
d78bda7b 22952002-03-11 Corinna Vinschen <corinna@vinschen.de>
713fb38b
CV
2296
2297 * fork.cc (fork_child): Call fixup_mmaps_after_fork() before
2298 closing parent process handle. Call fixup_mmaps_after_fork()
2299 with parent process handle as parameter.
2300 * mmap.cc (mmap_record::access): New method.
2301 (fixup_mmaps_after_fork): Take process handle as parameter.
2302 In case of FILE_MAP_COPY access, copy valid memory regions to child.
2303 * pinfo.h (fixup_mmaps_after_fork): Change prototype accordingly.
2304
d78bda7b 23052002-03-07 Corinna Vinschen <corinna@vinschen.de>
c8c3824d
CV
2306
2307 * autoload.cc (NetGetDCName): Add symbol.
2308 (NetServerEnum): Remove symbol.
2309 * security.cc (get_lsa_srv_inf): Call NetGetDCName() instead of
2310 NetServerEnum() since it's faster. Don't call it at all if machine
2311 is not a domain member.
2312
9420d2b8
CF
23132002-03-06 Christopher Faylor <cgf@redhat.com>
2314
2315 * path.cc (normalize_posix_path): Avoid runs of '.'s > 2.
2316
07a21bce
CF
23172002-03-05 Christopher Faylor <cgf@redhat.com>
2318
2319 * errno.cc: Change EPERM associated text to "Operation not permitted"
2320 throughout.
2321
eeac69d8
CF
23222002-03-05 Christopher Faylor <cgf@redhat.com>
2323
2324 * fhandler_socket.cc (fhandler_socket::close): Respond to signals while
2325 looping, waiting for socket to close. Superstitiously clear last error
2326 when WSAEWOULDBLOCK.
2327
241a7c5a
RC
23282002-03-05 Robert Collins <rbtcollins@hotmail.com>
2329
291be307 2330 * cygserver_transport_pipes.cc (transport_layer_pipes::transport_layer_pipes):
241a7c5a
RC
2331 Always init - until static members work correctly.
2332 * shm.cc (shmget): Initialize the security descriptor - thanks Corinna!
291be307 2333 * include/sys/ipc.h: Make the ipc control constants partitioned off from the sem
241a7c5a
RC
2334 control constants.
2335
ad2864f4
CV
23362002-03-04 Christian Lestrade <christian.lestrade@free.fr>
2337
2338 * include/sys/termios.h: Define _POSIX_VDISABLE. Define CCEQ macro.
2339 * fhandler_termios.cc: Include <sys/termios.h>.
2340 (line_edit): Recognize disabled c_cc[] chars. Ignore VDISCARD when
2341 not in ICANON mode.
2342
59149930
CV
23432002-03-04 Dmitry Timoshkov <dmitry@baikal.ru>
2344
2345 * syscalls.cc (truncate64): Use ftruncate64 directly to not lose
2346 upper 32 bits.
2347
7c3617cc
RC
23482002-03-04 Robert Collins <rbtcollins@hotmail.com>
2349
2350 * cygserver_shm.cc (delete_shmnode): New function.
2351 (client_request_shm::serve): Use it.
2352
038c71f1
RC
23532002-03-04 Robert Collins <rbtcollins@hotmail.com>
2354
2355 * cygserver_shm.cc (client_request_shm::serve): Implement SHM_DETACH.
2356 * shm.cc (shmdt): Implement.
2357
67be0adb
RC
23582002-03-04 Robert Collins <rbtcollins@hotmail.com>
2359
2360 * cygserver_shm.cc: Run indent.
2361 (deleted_head): New global for storing shm id's pending deletion.
2362 (client_request_shm::serve): Return ENOSYS for invalid request types.
2363 Implement SHM_DEL - delete a shm id.
2364 * cygserver_shm.h (SHM_DEL): New type value.
2365 * shm.cc (delete_inprocess_shmds): New function, does what it's name implies.
2366 (shmctl): Implement shm_rmid control type.
2367
74c3173a
RC
23682002-03-04 Robert Collins <rbtcollins@hotmail.com>
2369
2370 * Makefile.in (install): Remove install-bin to allow make install to work.
2371
009314a4
RC
23722002-03-03 Robert Collins <rbtcollins@hotmail.com>
2373
2374 * shm.cc (shmat): Prevent a compile error.
2375 (shmdt): Set errno as this function is incomplete.
2376
e7729287
CF
23772002-02-28 Christopher Faylor <cgf@redhat.com>
2378
2379 * times.cc: Remove if 0'd code. Clean up slightly.
2380
f449bfef
RC
23812002-02-28 Robert Collins <rbtcollins@hotmail.com>
2382
2383 * Merged cygwin_daemon into head minus the new shm and ipc exports.
2384
23852002-02-28 Robert Collins <rbtcollins@hotmail.com>
2386
2387 * fhandler_tty.cc (fhandler_tty_slave::open): More debugging.
2388 (fhandler_tty_slave::read): Fix printf type for the handle.
2389 * tty.cc (tty::common_init): Add a FIXME for security.
2390
23912002-01-29 Robert Collins <rbtcollins@hotmail.com>
2392
2393 * Makefile.in (OBJS): Remove duplicate localtime.o.
2394
23952002-01-17 Robert Collins <rbtcollins@hotmail.com>
2396
291be307 2397 * cygserver.cc (check_and_dup_handle): Consolidate the two variants for
f449bfef
RC
2398 simplicity.
2399 Add Some basic debug output.
2400 (client_request_attach_tty::serve): Use the new debug_printf for clarity.
2401 Mark the duplicated handles as inheritable - fixup_after_fork() doesn't reopen
2402 tty's.
2403
24042002-01-16 Robert Collins <rbtcollins@hotmail.com>
2405
2406 * cygserver.cc (transport): Correct scope.
2407 (client_request_attach_tty::serve): Add more debug information.
2408 Fix erroneous use of transport instead of conn.
2409 * cygserver_transport_pipes.cc (transport_layer_pipes::close): More debug.
2410 (transport_layer_pipes::read): Ditto.
2411 (transport_layer_pipes::write): Ditto.
2412 (transport_layer_pipes::impersonate_client): Ditto.
2413
2414Mon Oct 8 7:41:00 2001 Robert Collins <rbtcollins@hotmail.com>
2415
2416 * cygserver.cc (server_request::process): Rename client_request_shm_get to
2417 client_request_shm.
2418 * cygserver_process.cc (process_cache::add): Rename to add_task.
2419 Use process_cleanup instead of process_request.
2420 (process_cache::remove_process): New method.
2421 (process::process): Initialize new members.
2422 (process::~process): New member.
2423 (process::cleanup): New method.
2424 (process::add_cleanup_routine): New method.
2425 (process_request::process): Rename to process_cleanup.
2426 Call the process object's cleanup method and then delete it.
2427 (process_process_param::request_loop): Remove the signalling process.
2428 * cygserver_shm.cc: Globally rename client_request_shm_get to client_request_shm.
2429 (client_request_shm_get::serve): Handle attach request counting.
2430 * cygserver_shm.h: Globally rename client_request_shm_get to client_request_shm.
2431 (class shm_cleanup): New class.
2432 * shm.cc: Globally rename client_request_shm_get to client_request_shm.
2433 (client_request_shm::client_request_shm): New constructor for attach requests.
2434 (shmat): Use it.
291be307 2435 * include/cygwin/cygserver_process.h (class process_request): Rename to
f449bfef
RC
2436 process_cleanup.
2437 (class cleanup_routine): New class.
2438 (class process): New members and methods to allow calling back when the process
2439 terminates.
2440
2441Thu Oct 4 14:12:00 2001 Robert Collins <rbtcollins@hotmail.com>
2442 * cygserver.cc (request_loop): Make static.
2443 (main): Use new cache constructor syntax.
2444 Start cache worker threads.
2445 Cleanup the cache at shutdown.
2446 * cygserver_process.cc: Run indent.
2447 (process_cache::process_cache): Add a trigger to use when adding a process.
2448 (process_cache::process): Move process_entry to process.
2449 Insert at the end of the list.
2450 Trigger the request loop when new process's inserted.
2451 (process_cache::process_requests): Do it.
2452 (process_cache::add): New method.
2453 (process_cache::handle_snapshot): New method.
2454 (process::process): Merge in the process_entry fields.
2455 (process::handle): Make a stub function.
2456 (process::exit_code): New method.
2457 (process_request::process): New method.
2458 (process_process_param::request_loop): New method.
2459 * cygserver_shm.cc: New header dependency - threaded_queue.h.
2460 * threaded_queue.cc (threaded_queue::cleanup): Clearer messages.
2461 (queue_process_param::stop): Short spinlock on interruptible threads.
2462 * threaded_queue.h (class threaded_queue): New constructor.
2463 * include/cygwin/cygserver_process.h (process_request): New class.
2464 (process_entry): Remove.
2465 (process): Merge in process_entry.
2466 (process_cache): Inherit from threaded_queue.
2467
2468Tue Oct 2 23:24:00 2001 Robert Collins <rbtcollins@hotmail.com>
2469
2470 * cygserver.cc (class server_process_param): Use new constructor syntax.
2471 * cygserver_process.cc (process_cache::~process_cache): New function.
2472 * threaded_queue.cc: Define condition debug_printf.
2473 Run indent.
2474 (threaded_queue::cleanup): Move queue_process_param guts to a method.
2475 (threaded_queue::process_requests): Ditto.
2476 (queue_process_param::queue_process_param): New method.
2477 (queue_process_param::~queue_process_param): Ditto.
2478 (queue_process_param::start): Ditto.
2479 (queue_process_param::stop): Ditto.
291be307 2480 * threaded_queue.h (class queue_process_param): Add support for
f449bfef
RC
2481 interruptible request loops.
2482 * cygwin/include/cygwin/cygserver_process.h (class process_cache): Add
2483 destructor.
2484
2485Tue Oct 2 23:24:00 2001 Robert Collins <rbtcollins@hotmail.com>
2486
2487 * cygserver_client.cc: New flag allow_daemon to disable the daemon completely.
2488 (cygserver_request): Check it.
2489 (cygserver_init): Ditto.
2490 * environ.cc (parse_thing): Add (no)daemon option.
2491
2492Tue Oct 2 23:00:00 2001 Robert Collins <rbtcollins@hotmail.com>
2493
2494 * shm.cc: Update to handle include changes from HEAD.
2495
2496Tue Oct 2 16:06:00 2001 Robert Collins <rbtcollins@hotmail.com>
2497
291be307 2498 * Makefile.in: Remove cygserver_shm.o from cygwin1.dll.
f449bfef
RC
2499 Rename cygserver_shm_outside.o to cygserver_shm.o.
2500 * cygserver.cc (server_request::process): Use the new client_request
2501 constructor.
2502 * cygserver_client.cc: Remove the #ifdef's stubs for the server method
2503 within cygwin.
2504 (client_request_attach_tty::client_request_attach_tty): Use the new
2505 client_request constructor.
2506 (client_request_shutdown::client_request_shutdown): Ditto.
2507 (client_request::client_request): Ditto.
291be307 2508 * cygserver_shm.cc (client_request_shm_get::serve): Remove the
f449bfef
RC
2509 #ifdef'd stub for in-cygwin builds.
2510 (client_request_shm_get::client_request_shm_get): Use the new
2511 client_request constructor, and remove the in-cygwin variants.
2512 * cygserver_shm.h (class client_request_shm_get): #ifndef test the
2513 serve method - it's only used in cygserver.
2514 * shm.cc (client_request_shm_get::client_request_shm_get): New function.
2515 * include/cygwin/cygserver.h (request_header): New constructor.
291be307 2516 (class client_request): Use it.
f449bfef
RC
2517 New constructor accepting the header size.
2518 #ifndef test the server method - it's only used within cygserver.
2519 (client_request_get_version): #ifdef test the server method.
2520 (client_request_shutdown): Ditto.
2521 (client_request_attach_tty): Ditto.
2522
2523Tue Oct 2 9:57:00 2001 Robert Collins <rbtcollins@hotmail.com>
2524
2525 * Makefile.in: add threaded_queue.o to cygserver.exe.
2526 * cygserver.cc: Include threaded_queue.h
2527 (class server_request): Inherit from queue_request.
2528 (class server_process_param): Inherit from queue_process_param.
2529 (class server_request_queue): Inherit from threaded_queue.
2530 (request_loop): Adjust for new types.
291be307 2531 (server_request_queue::process_requests): Remove guts to
f449bfef
RC
2532 threaded_queue::process_requests.
2533 (server_request::server_request): Adjust for new types.
2534 (worker_function): Delete.
2535 (server_request_queue::create_workers): Delete.
2536 (server_request_queue::cleanup): Delete.
2537 (server_request_queue::add): Move guts to threaded_queue::add.
2538 * threaded_queue.cc: New file.
2539 * threaded_queue.h: New file.
2540
2541Mon Oct 1 12:38:00 2001 Robert Collins <rbtcollins@hotmail.com>
2542
2543 * cygserver.cc (client_request::serve): New function.
2544 * cygserver_process.cc: Inlude <pthread.h> for pthread_once.
2545 (process_cache::process_cache): Initialise a crtiical section for write access.
291be307 2546 (process_cache::process): Use the critical section. Also add missing entries to
f449bfef
RC
2547 the cache.
2548 (do_process_init): New function to initalise class process static variables.
291be307 2549 (process::process): Ensure that the process access critical section is
f449bfef
RC
2550 initialised.
2551 (process::handle): Close the handle of old process's when they have terminated
2552 and we are returning the handle for a process with the same pid.
2553 * cygserver_shm.cc: Run indent.
2554 Include cygserver_process.h to allow process cache functionality.
2555 (client_request_shm_get::serve): New parameter for process cache support.
2556 Use the process cache, not OpenProcess to get a handle to the originating process.
2557 Fix a handle leak with token_handle.
291be307 2558 * cygserver_shm.h (class client_request_shm_get): Update ::serve for process
f449bfef
RC
2559 cache support.
2560 * cygserver_transport_pipes.cc: Redefine debug_printf to be conditional on DEBUG.
291be307 2561 * include/cygwin/cygserver.h: Do not implement client_request::serve in the
f449bfef 2562 header.
291be307
CF
2563 * include/cygwin/cygserver_process.h (class process_cache): Add a write access
2564 critical section to prevent races when requests from a multithreaded
f449bfef
RC
2565 application arrive.
2566
2567Sun Sep 30 23:41:00 2001 Robert Collins <rbtcollins@hotmail.com>
2568
2569 * Makefile.in: Add cygserver_process.o to cygserver.exe.
2570 * cygserver.cc: Include signal.h and cygwin_version.h.
2571 Define debug_printf as a macro.
2572 Define DEBUG to a value.
2573 (client_request_attach_tty::serve): Add beginning of process cache support.
2574 Change from #ifdef DEBUG to work with new DEBUG style.
2575 (client_request_get_version::serve): Add beginning of process cache support.
2576 (class server_request): New prototype for support of process cache.
2577 (class queue_process_param): New class to allow request loop threading.
2578 (class server_request_queue): Add beginning of process cache support.
2579 Allow request loop threading.
2580 (request_loop): Thread function for request loops.
2581 (server_request_queue::process_requests): Initiator for threaded request loops.
2582 (client_request_shutdown::serve): Add beginning of process cache support.
2583 (server_request::server_request): Ditto.
291be307 2584 (server_request::process): Use debug_printf. Add beginning of process cache
f449bfef
RC
2585 support.
2586 (server_request_queue::cleanup): Kill off any request loop threads.
2587 (server_request_queue::add): Add beginning of process cache support.
2588 (handle_signal): Trigger a shutdown.
2589 (main): Print out some useful info at startup - version, date time.
2590 Add process cache support.
2591 Spawn a separate thread for the transport request loop, thus allowing concurrent
2592 support for multiple transports.
291be307 2593 * cygserver_client.cc (client_request_get_version::serve): Add process cache
f449bfef
RC
2594 support.
2595 (client_request_attach_tty::serve): Add process cache support.
2596 (client_request_shutdown::serve): Add process cache support.
2597 * cygsserver_process.cc: New file with the process cache support.
2598 * cygserver_shm.cc: Redefine debug_printf to allow conditional output.
2599 * cygwin.din: Export shmdt().
2600 * shm.cc: Run indent.
2601 Update FIXME's.
2602 (shmdt): New function.
2603 * include/cygwin/cygserver.h (class client_request): Add process cache support.
2604 (class client_request_get_version): Ditto.
2605 (class client_request_shutdown): Ditto.
2606 (class client_request_attach_tty): Ditto.
2607 * include/cygwin/cygserver_process.h: New header for process cache support.
2608
2609Sun Sep 30 8:52:00 2001 Robert Collins <rbtcollins@hotmail.com>
2610
2611 * include/cygwin/cygserver_transport.h: Add copyright header.
2612 * include/cygwin/cygserver_transport_pipes.h: Ditto.
2613 * include/cygwin/cygserver_transport_sockets.h: Ditto.
2614
2615Sat Sep 29 20:40:00 2001 Robert Collins <rbtcollins@hotmail.com>
2616
2617 * Makefile.in: Add cygserver_transport_sockets.o to DLL_OFILES.
2618 Add cygserver_transport_sockets_outside.o to cygserver.exe.
2619 * cygserver.cc: Include new include files.
2620 * cygserver_client.cc: Ditto.
2621 * cygserver_shm.h: No need to include <sys/socket.h> now.
2622 * cygerver_transport.cc: Include new include files.
2623 (transport_layer_base::transport_layer_base): Strip back to a stub.
2624 (transport_layer_base::listen): Ditto.
2625 (transport_layer_base::accept): Ditto.
2626 (transport_layer_base::close): Ditto.
2627 (transport_layer_base::read): Ditto.
2628 (transport_layer_base::write): Ditto.
2629 (transport_layer_base::connect): Ditto.
291be307 2630 * cygserver_transport_pipes.cc: Include new header
f449bfef
RC
2631 "cygwin/cygserver_transport_pipes.h".
2632 * cygserver_transport_sockets.cc: New file.
2633 * dcrt0.cc: No need to include <sys/socket.h> now.
2634 * fhandler_tty.cc: Ditto.
2635 * tty.cc: Ditto.
2636 * include/cygwin/cygserver_transport.h: Strip the base class to a stub.
2637 Remove the cygserver_transport_pipes class.
2638 * include/cygwin/cygserver_transport_pipes.h: New file.
2639 * include/cygwin/cygserver_transport_sockets.h: New file.
2640
2641Tue Sep 25 16:22:00 2001 Robert Collins <rbtcollins@hotmail.com>
2642
2643 * autoload.cc: Add dynamic load statement for 'ImpersonateNamedPipeClient'.
2644 * Makefile.in: Add new object files, and build instructions for cygserver.exe.
2645 * cygwin.din: Export ftok, shmat, shmctl and shmget.
2646 * dcrt0.cc: Additional includes for cygserver support.
2647 (dll_crt0_1): Initialise the cygserver client.
2648 * fhandler.h (fhandler_tty): New method cygserver_attach_tty.
2649 * fhandler_tty.cc: Additional includes for cygserver support.
2650 (fhandler_tty_slave::open): Attempt to use the cygserver when obtaining
2651 handles from the parent process. On failure or 9x use the current method.
2652 (fhandler_tty_slave::cygserver_attach_tty): New function.
2653 * fork.cc (fork_child): Fixup shm memory mapped areas.
2654 * pinfo.h: Declare fixup_shms_after_fork().
2655 * security.h: Declare alloc_sd().
2656 * tty.cc: Additonal includes to support cygserver.
2657 (tty::common_init): Don't allow others to open us if the cygserver is running.
2658 * winsup.h: Declare cygserver_running.
2659 * cygserver.cc: New file.
2660 * cygserver_client.cc: New file.
2661 * cygserver_shm.cc: New file.
2662 * cygserver_shm.h: New file.
2663 * cygserver_transport.cc: New file.
2664 * cygserver_transport_pipes.cc: New file.
2665 * ipc.cc: New file.
2666 * shm.cc: New file.
2667 * include/cygwin/cygserver.h: New file.
2668 * include/cygwin/cygserver_transport.h: New file.
2669 * include/sys/ipc.h: New file.
2670 * include/sys/shm.h: New file.
2671
062401c9
RC
26722002-02-28 Robert Collins <rbtcollins@hotmail.com>
2673
2674 * thread.cc (semaphore::TryWait): Set errno as required by posix 1003.1.
2675 (__sem_wait): Ditto.
2676 (__sem_trywait): Ditto.
2677
d1f50ae5
CF
26782002-02-27 Christopher Faylor <cgf@redhat.com>
2679
2680 * include/cygwin/version.h: Bump DLL minor number.
2681
acb56175
CV
26822002-02-23 Corinna Vinschen <corinna@vinschen.de>
2683
2684 * cygwin.din (fstat64): New symbol.
2685 (ftruncate64): Ditto.
2686 (lseek64): Ditto.
2687 (lstat64): Ditto.
2688 (mmap64): Ditto.
2689 (seekdir64): Ditto.
2690 (stat64): Ditto.
2691 (telldir64): Ditto.
2692 (truncate64): Ditto.
2693 * dir.cc (telldir64): New function.
2694 (telldir): Call telldir64().
2695 (seekdir64): New function.
2696 (seekdir): Call seekdir64().
2697 * fhandler.h: Redefine all methods using __off32_t to use __off64_t.
2698 * fhandler.cc: Use __off64_t and struct __stat64 throughout.
2699 * fhandler_clipboard.cc: Ditto.
2700 * fhandler_disk_file.cc: Ditto.
2701 * fhandler_dsp.cc: Ditto.
2702 * fhandler_floppy.cc: Ditto.
2703 * fhandler_mem.cc: Ditto.
2704 * fhandler_random.cc: Ditto.
2705 * fhandler_socket.cc: Ditto.
2706 * fhandler_tape.cc: Ditto.
2707 * fhandler_zero.cc: Ditto.
2708 * pipe.cc: Ditto.
2709 * glob.c: Ditto, call lstat64 and stat64 in Cygwin.
2710 * mmap.cc: Use __off64_t throughout.
2711 (mmap64): New function.
2712 * sec_acl.cc (acl_worker): Use struct __stat64, call stat64 and lstat64.
2713 * syscalls.cc (lseek64): New function.
2714 (stat64_to_stat32): Ditto.
2715 (fstat64): Ditto.
2716 (stat64): Ditto.
2717 (lstat64): Ditto.
2718 (ftruncate64): Ditto.
2719 (truncate64): Ditto.
2720 (_fstat): Call fstat64.
2721 (_stat): Call stat64.
2722 (cygwin_lstat): Rename to avoid declaration problem. Call lstat64.
2723 (stat_worker): Use struct __stat64.
2724 (access): Ditto.
2725 (ftruncate): Call ftruncate64.
2726 (truncate): Call truncate64.
2727 * wincap.cc: Set flag has_64bit_file_access appropriately.
2728 * wincap.h: Add flag has_64bit_file_access.
2729 * winsup.h (ILLEGAL_SEEK): Define as __off64_t.
2730 (stat_dev): Declare using struct __stat64.
2731 (stat_worker): Ditto.
2732 * include/cygwin/stat.h (struct __stat32): Define if compiling Cygwin.
2733 (struct __stat64): Ditto.
2734 (struct stat): Revert definition with explicitly sized datatypes.
2735 Eliminate sized field names.
2736 * include/cygwin/types.h (blksize_t): New type.
2737 (__blkcnt32_t): Ditto.
2738 (__blkcnt64_t): Ditto.
2739 (blkcnt_t): Ditto.
2740
083abe54
CF
27412002-02-22 Christopher Faylor <cgf@redhat.com>
2742
2743 * sync.h (new_muto): Just accept an argument which denotes the name of
2744 the muto. Use this argument to construct static storage.
2745 * cygheap.cc (cygheap_init): Reflect above change.
2746 * exceptions.cc (events_init): Ditto.
2747 * malloc.cc (malloc_init): Ditto.
2748 * path.cc (cwdstuff::init): Ditto.
2749 * cygheap.h (cwdstuff): Change name of lock element to make it less
2750 generic.
2751 * path.cc (cwdstuff::get_hash): Ditto.
2752 (cwdstuff::get_initial): Ditto.
2753 (cwdstuff::set): Ditto.
2754 (cwdstuff::get): Ditto.
2755 * sigproc.cc (proc_subproc): Ditto.
2756
2757 * debug.cc (lock_debug): Change to method. Use method rather than
2758 macro throughout.
2759
2760 * tty.h (tty_min::kill_pgrp): Declare new method.
2761 * fhandler_termios.cc (tty_min::kill_pgrp): New method.
2762 (fhandler_termios::line_edit): Use new method for killing process.
2763 * dcrt0.cc (do_exit): Ditto.
2764
2765 * dtable.cc (dtable::get_debugger_info): New method for inheriting
2766 dtable info from a debugger.
2767 * tty.cc (tty_init): Attempt to grab file handle info from parent
2768 debugger, if appropriate.
2769
2770 # dtable.cc (dtable::stdio_init): Make this a method.
2771 (dtable::init_std_file_from_handle): Don't set fd unless it's not open.
2772 (dtable::build_fhandler_from_name): Move name setting to
2773 dtable::build_fhandler.
2774 (dtable::build_fhandler): Add win32 name parameter.
2775 * dcrt0.cc (dll_crt0_1): Change to use dtable stdio_init.
2776 * dtable.h (dtable): Reflect build_fhandler parameter change.
2777 * mmap.cc (mmap_record::alloc_fh): Don't set name parameter in
2778 build_fhandler.
2779 * net.cc (fdsock): Remove set_name call since it is now handled by
2780 build_fhandler.
2781
2782 * sigproc.cc (proc_subproc): Release muto as early as possible.
2783
a6790c5f
CV
27842001-02-22 Corinna Vinschen <corinna@vinschen.de>
2785
2786 * smallprint.c (rn): Allow long long values.
2787 (__small_vsprintf): Add 'D', 'U' and 'X' formats for long long
2788 parameters.
2789
aa6df8d7
CF
27902002-02-19 Christopher Faylor <cgf@redhat.com>
2791
2792 * fhandler.cc (fhandler_base::puts_readahead): Remove default parameter
2793 setting. Newer gcc's complain about this.
2794 (fhandler_base::set_readahead_valid): Ditto.
2795 * fhandler_dsp.cc (Audio::open): Ditto.
2796 (fhandler_dev_dsp::open): Ditto.
2797
cecb74ae
CF
27982002-02-19 Christopher Faylor <cgf@redhat.com>
2799
2800 * fork.cc (fork_parent): Use sec_user_nih to control process/thread
2801 inheritance/permission.
2802 * spawn.cc (spawn_guts): Ditto.
2803 * security.cc (create_token): Initialize token so that it is not tested
2804 for bogus value later. Use sec_user to control process/thread
2805 creation.
2806 * security.h (__sec_user): Rename declaration from sec_user.
2807 (sec_user_nih): Declare here as inline function wrapper for __sec_user.
2808 (sec_user): Ditto.
2809 * sigproc.cc (czombies): Allocate a character array for zombies to
2810 avoid constructor overhead
2811 (extremely hackish, I know).
2812 (cpchildren): Ditto.
2813 (pchildren): New define.
2814 (zombies): Ditto.
2815 (getsem): Use sec_user_nih to control semaphore inheritance/permission.
2816
2bd22312
CF
28172002-02-16 Christopher Faylor <cgf@redhat.com>
2818
2819 * times.cc (hires::prime): Restore thread priority on failure
2820 condition.
2821
2822 * uinfo.cc (uinfo_init): Use more robust method for determining if
2823 process was invoked from a non-cygwin process.
2824
2825 * sync.h (muto::init): Eliminate "inheritance" parameter.
2826 (new_muto): Reflect removal of parameter.
2827 * sync.cc (muto::init): Ditto.
2828 * cygheap.cc (cygheap_init): Ditto.
2829 * debug.cc (threadname_init): Ditto.
2830 * exceptions.cc (events_init): Ditto.
2831 * malloc.cc (malloc_init): Ditto.
2832 * path.cc (cwdstuff::init): Ditto.
2833 * sigproc.cc (sigproc_init): Ditto.
2834
4c761646
CF
2835 * grp.cc (group_lock): Use different method for locking with static
2836 member.
2bd22312 2837 (read_etc_group): REALLY ensure that read lock mutex is released.
4c761646
CF
2838 * passwd.cc (passwd_lock): Use different method for locking with static
2839 member.
2840 (read_etc_passwd): REALLY ensure that read lock mutex is released.
2bd22312
CF
2841
2842 * shared.cc (sec_user): Correct reversed inheritance test.
2843
60b68f0d
CF
28442002-02-15 Christopher Faylor <cgf@redhat.com>
2845
2846 * hires.h (hires::usecs): Rename from utime. Accept an argument.
2847 * strace.cc (strace::microseconds): Use hires class for calculating
2848 times.
2849 * sync.h (new_muto): Use NO_COPY explicitly in declaration.
2850 * times.cc (gettimeofday): Reflect change in usecs argument.
2851 (hires::usecs): Ditto. Changed name from utime.
2852 * winsup.h (NO_COPY): Add nocommon attribute to force setting aside
2853 space for variable.
2854 * regcomp.c (REQUIRE): Add a void cast to bypass a warning.
2855
dce87b21
CF
28562002-02-15 Christopher Faylor <cgf@redhat.com>
2857
2858 * hires.h: New file.
2859 * times.cc (gettimeofday): Use hires class for calculating current time.
2860 (hires::prime): New method.
2861 (hires::utime): Ditto.
2862
3d456520
CF
28632002-02-14 Christopher Faylor <cgf@redhat.com>
2864
2865 * include/sys/cygwin.h (cygwin_getinfo_types): New CW_STRACE_ACTIVE.
2866 * external.cc (cygwin_internal): Handle CW_STRACE_ACTIVE.
2867
907dc7d0
CF
28682002-02-14 Christopher Faylor <cgf@redhat.com>
2869
2870 * exceptions.cc (unused_sig_wrapper): Eliminate unused parameter to
2871 asm.
2872 * external.cc (cygwin_internal): Change CW_STRACE_ON to
2873 CW_STRACE_TOGGLE.
2874 * strace.cc (strace::hello): Toggle strace on and off.
2875 * sync.cc (muto::init): Renamed from constructor.
2876 * sync.h (muto::new): Delete.
2877 (muto::delete): Ditto.
2878 (new_muto): Simplify. Use muto.init for nearly everything.
2879 * uinfo.cc (uinfo_init): Avoid closing a NULL handle.
2880 * include/sys/cygwin.h (cygwin_getinfo_types): Rename CW_STRACE_OFF to
2881 CW_STRACE_TOGGLE. Delete CW_STRACE_OFF.
2882 * include/sys/strace.h (strace): Add "inited" field.
2883
4753a17b
CV
28842001-02-12 Corinna Vinschen <corinna@vinschen.de>
2885
2886 * include/cygwin/acl.h: Fix definition of aclent_t.
2887
909acaf6
CF
28882002-02-10 Christopher Faylor <cgf@redhat.com>
2889
2890 * Makefile.in (DLL_OFILES): Consolidate object files.
2891
de4e0d30
CV
28922002-02-10 Corinna Vinschen <corinna@vinschen.de>
2893
b31c68c4
CV
2894 * child_info.h, cygheap.h, fhandler_clipboard.cc, fhandler_dsp.cc,
2895 fhandler_floppy.cc, fhandler_mem.cc, fhandler_random.cc,
2896 fhandler_tape.cc, fhandler_zero.cc, grp.cc, mmap.cc, passwd.cc,
2897 pinfo.cc, pinfo.h, pipe.cc, sec_acl.cc, sec_helper.cc, security.cc,
2898 security.h, thread.h, uinfo.cc, include/cygwin/acl.h: Fix copyright.
2899
29002002-02-10 Corinna Vinschen <corinna@vinschen.de>
2901
2902 * child_info.h, cygheap.h, dcrt0.cc, dir.cc, fhandler.cc, fhandler.h,
de4e0d30
CV
2903 fhandler_clipboard.cc, fhandler_disk_file.cc, fhandler_dsp.cc,
2904 fhandler_floppy.cc, fhandler_mem.cc, fhandler_random.cc,
2905 fhandler_tape.cc, fhandler_zero.cc, grp.cc, mmap.cc, passwd.cc,
2906 pinfo.cc, pinfo.h, pipe.cc, sec_acl.cc, sec_helper.cc, security.cc,
b31c68c4 2907 security.h, spawn.cc, syscalls.cc, thread.h, uinfo.cc, winsup.h:
de4e0d30
CV
2908 Change usage of uid_t to __uid16_t, gid_t to __gid16_t and
2909 off_t to __off32_t throughout. Use INVALID_UID, INVALID_GID and
2910 INVALID_SEEK instead casting -1 to the appropriate type.
2911 * winsup.h: Define INVALID_UID, INVALID_GID and INVALID_SEEK.
2912 * include/cygwin/acl.h: Define internal __aclent16_t and __aclent32_t
2913 types. Don't declare acl functions when compiling Cygwin.
2914 * include/cygwin/grp.h: Declare getgrgid() and getgrnam() with
2915 correct types for internal usage.
2916
39b553b8
CV
29172002-02-10 Corinna Vinschen <corinna@vinschen.de>
2918
2919 Patch suggested by Pierre A. Humblet <Pierre.Humblet@ieee.org>:
2920 * uinfo.cc (internal_getlogin): Try evaluating user by SID even if
2921 ntsec is off.
2922 (uinfo_init): Set primary group even if ntsec is off.
2923
52296b85
CV
29242002-02-09 Corinna Vinschen <corinna@vinschen.de>
2925
2926 * include/cygwin/grp.h: New file.
2927 * include/cygwin/stat.h: Ditto.
2928 * include/cygwin/types.h: Add definitions for __off32_t,
2929 __off64_t, off_t, __uid16_t, __uid32_t, uid_t, __gid16_t,
2930 __gid32_t and gid_t.
2931 * include/sys/cygwin.h: Use correct uid and gid types.
2932
ff86860b
CV
29332002-02-09 Corinna Vinschen <corinna@vinschen.de>
2934
2935 * dtable.cc (dtable::dup2): Revert previous patch.
2936 * fhandler.h: Ditto.
2937 (fhandler_socket::recv): Define new method.
2938 (fhandler_socket::send): Ditto.
2939 * fhandler_socket.cc (fhandler_socket::recv): New method.
2940 (fhandler_socket::send): Ditto.
2941 (fhandler_socket::read): Call fhandler_socket::recv() now.
2942 (fhandler_socket::write): Call fhandler_socket::send() now.
2943 * net.cc (class wsock_event): Move definition to wsock_event.h.
2944 (fdsock): Revert previous patch.
2945 (cygwin_recv): Move implementation to fhandler_socket::recv().
2946 (cygwin_send): Move implementation to fhandler_socket::send().
2947 * wsock_event.h: New file.
2948
d0672acc
CV
29492002-02-06 Alexander Gottwald <Alexander.Gottwald@s1999.tuchemnitz.de>
2950
2951 * net.cc (get_2k_ifconf): Create interface entries for tokenring cards.
2952
fae28904
CV
29532002-02-08 Corinna Vinschen <corinna@vinschen.de>
2954
2955 * dtable.cc (dtable::dup2): Store fd for fhandler_socket.
2956 * fhandler.h (fhandler_base::set_fd): New virtual method.
2957 (fhandler_base::get_fd): Ditto.
2958 (fhandler_socket::set_fd): Ditto.
2959 (fhandler_socket::get_fd): Ditto.
2960 * fhandler_socket.cc (fhandler_socket::read): Call cygwin_recv instead
2961 of native Winsock recv.
2962 (fhandler_socket::write): Call cygwin_send instead of native Winsock
2963 send.
2964 * net.cc (fdsock): Store fd in fhandler_socket.
2965
1f64102f
CV
29662002-02-07 Corinna Vinschen <corinna@vinschen.de>
2967
2968 * net.cc (cygwin_getsockname): Fix handling of NULL sun_path.
2969
562d9745
CV
29702002-01-29 Corinna Vinschen <corinna@vinschen.de>
2971
2972 * net.cc (getdomainname): Fix registry key for 9x systems, too.
2973
94ee02fa
CV
29742002-01-29 Corinna Vinschen <corinna@vinschen.de>
2975
2976 * net.cc (getdomainname): Fix registry key for NT systems.
2977
494a66d9
CF
29782002-01-28 Christopher Faylor <cgf@redhat.com>
2979
2980 * external.cc (cygwin_internal): Initialize various internal settings
2981 if required to allow use of some things from user loaded DLL.
2982 (CW_STRACE_ON): Add new feature.
2983 (CW_CYGWIN_PID_TO_WINPID): Ditto.
2984 * pinfo.cc (set_myself): Call "strace.hello" to initiate possible
2985 strace session.
2986 (pinfo::init): Guard against dereferencing uninitialized myself.
2987 * sigproc.cc (wait_sig): Call strace.hello() when __SIGTRACE "signal"
2988 received.
2989 * strace.cc (strace::hello): New method.
2990 * wincap.cc (wincapc::init): Avoid initializing if already initialized.
2991 * wincap.h (wincapc::wincapc): New method.
2992 * include/sys/cygwin.h: Add new CW_ enums. Kludge typedefs of
2993 {g,u}id_t if required.
2994 * strace.h (strace::hello): Declare new method.
2995
6616e6cf
CF
29962002-01-28 Earnie Boyd <earnie@users.sf.net>
2997
2998 * include/sys/strace.h (_STRACE_ON): Define.
2999 (_STRACE_OFF): Ditto.
3000
dfb4c347
CF
30012002-01-24 Christopher Faylor <cgf@redhat.com>
3002
3003 * speclib: Ensure that temporary def file is removed.
3004
3c07fbeb
CF
30052002-01-23 Christopher Faylor <cgf@redhat.com>
3006
3007 * speclib: Use rm -f to remove temp file just to quiet any potential
3008 warnings.
3009
f6fc31e1
CV
30102002-01-23 Corinna Vinschen <corinna@vinschen.de>
3011
3012 * security.cc (create_token): Use sec_user() to create
be6d8567
CV
3013 SECURITY_ATTRIBUTES structure for primary token. Use
3014 MAXIMUM_ALLOWED access rights instead of TOKEN_ALL_ACCESS.
f6fc31e1 3015
adbd01af
CV
30162002-01-23 Corinna Vinschen <corinna@vinschen.de>
3017
3018 * path.cc (symlink): Fix check for already existing file.
3019
aed69a5b
CF
30202002-01-21 Christopher Faylor <cgf@redhat.com>
3021
3022 * cygmagic: Suppress error output when figuring out if sum takes an
3023 option.
3024
f3647dd7
CF
30252002-01-21 Christopher Faylor <cgf@redhat.com>
3026
3027 * cygmagic: Attempt to figure out if sum takes an option.
3028
51076b73
CF
30292002-01-21 DJ Delorie <dj@redhat.com>
3030
3031 * Makefile.in (libpthread.a): Pass the assembler also.
291be307 3032 (libm.a): Ditto.
51076b73
CF
3033 (libc.a): Ditto.
3034 * speclib: Specify the assembler to dlltool.
3035
0ac2abea
CF
30362002-01-21 Christopher Faylor <cgf@redhat.com>
3037
3038 * include/cygwin/version.h: Bump DLL minor number.
3039
ac11ec88
CV
30402002-01-21 Corinna Vinschen <corinna@vinschen.de>
3041
28982aa8 3042 * grp.cc (getgrgid): Don't return default gid entry when ntsec is on.
ac11ec88
CV
3043 * syscalls.cc (setegid): Don't set primary group in process token.
3044
8ef47135
CF
30452002-01-21 Christopher Faylor <cgf@redhat.com>
3046
3047 * speclib: Don't use /dev/null as DLL name. Just default to what's
3048 already in .def file.
3049
30502002-01-21 Christopher Faylor <cgf@redhat.com>
3051
3052 * exceptions.cc (sig_handle): Remove last vestiges of SA_NOCLDSTOP code
3053 which caused SIGCHLD to be ignored.
3054
07cc1f1f
CF
30552002-01-20 Christopher Faylor <cgf@redhat.com>
3056
3057 * include/cygwin/version.h: Bump DLL minor number.
3058
385437d4
CF
30592002-01-20 Christopher Faylor <cgf@redhat.com>
3060
3061 * syscalls.cc (regfree): Make dll_export.
3062
d7c16d8d
CF
30632002-01-20 Christopher Faylor <cgf@redhat.com>
3064
3065 * exceptions.cc (ctrl_c_handler): Convert windows pid to cygwin pid
3066 when detecting if we should actually handle CTRL-C.
3067
216109a8
CF
30682002-01-19 Christopher Faylor <cgf@redhat.com>
3069
3070 * Makefile.in (new-cygwin1.dll): Revert previous change. libsupc++.a
3071 is only available in libstdc++-v3.
3072
9e73b339
CF
30732002-01-19 Christopher Faylor <cgf@redhat.com>
3074
3075 * exceptions.cc (sig_handle_tty_stop): Don't send SIGCHLD if parent
3076 doesn't want it.
3077 (sig_handle): Don't check for SA_NOCLDSTOP here. We don't have enough
3078 information.
3079
5946622e
CF
30802002-01-19 Christopher Faylor <cgf@redhat.com>
3081
3082 * include/cygwin/version.h: Bump DLL minor number.
3083
994fe87b
CF
30842002-01-19 Christopher Faylor <cgf@redhat.com>
3085
3086 * Makefile.in (new-cygwin1.dll): Just use -lsupc++ for link.
3087 * sigproc.cc (proc_exists): Change existence criteria.
3088 * sync.h (new_muto): Add volatile to definition to avoid gcc
3089 optimization problems.
3090
df3af773
CV
30912002-01-19 Corinna Vinschen <corinna@vinschen.de>
3092
3093 * include/cygwin/version.h: Bump API minor version to 51.
3094
7d6be0d6
CV
30952002-01-19 Mark Bradshaw <bradshaw@staff.crosswalk.com>
3096
291be307
CF
3097 * cygwin.din: Add recvmsg and sendmsg.
3098 * net.cc: Add cygwin_recvmsg and cygwin_sendmsg.
3099 * /usr/include/sys/socket.h: Add recvmsg and sendmsg.
7d6be0d6 3100
2d3dab2e
CV
31012002-01-19 Corinna Vinschen <corinna@vinschen.de>
3102
3103 * security.cc (create_token): Close processes token handle as soon
3104 as it's not used anymore.
3105
104c3be6
CV
31062002-01-17 Corinna Vinschen <corinna@vinschen.de>
3107
3108 * Makefile.in: Add fnmatch.o to DLL_OFILES.
3109 * cygwin.din: Add fnmatch export symbol.
3110 * fnmatch.c: New file.
3111 * include/fnmatch.h: Ditto.
3112 * include/cygwin/version.h: Bump API minor version to 50.
3113
9a7e1562
CV
31142002-01-15 Corinna Vinschen <corinna@vinschen.de>
3115
3116 * path.cc (fchdir): Call chdir with full windows path.
3117
7eddac1b
CV
31182002-01-14 Corinna Vinschen <corinna@vinschen.de>
3119
3120 * dir.cc: Use INVALID_FILE_ATTRIBUTES instead of "(DWORD) -1"
3121 for file attributes throughout.
3122 * fhandler.cc: Ditto.
3123 * fhandler_disk_file.cc: Ditto.
3124 * path.cc: Ditto.
3125 * path.h: Ditto.
3126 * syscalls.cc: Ditto.
3127 * times.cc (utimes): Use path_conv::isdir() instead of explicit
3128 GetFileAttributes() call.
3129
5daa0835
CF
31302002-01-13 Christopher Faylor <cgf@redhat.com>
3131
3132 * dcrt0.cc (multiple_cygwin_problem): Clarify logic and make
3133 CYGWIN_MISMATCH_OK more powerful.
3134
06486d9e
CF
31352002-01-10 Christopher Faylor <cgf@redhat.com>
3136
3137 * exceptions.cc (sig_handle): Accept a second argument indicating
3138 whether the signal came from this process or not.
3139 * sigproc.h: Reflect sig_handle arg change.
3140 * signal.cc (kill_pgrp): Add sigframe info.
3141 (abort): New function. Eliminates newlib function of same name.
3142 * sigproc.cc (wait_sig): Pass "signal from this process" value as arg
3143 2.
3144
bb5225c2
CV
31452002-01-10 Corinna Vinschen <corinna@vinschen.de>
3146
3147 * syscalls.cc (pathconf): Guard _PC_PATH_MAX branch against invalid
3148 file parameter.
3149
c0a8e8d0 31502002-01-09 Christopher Faylor <cgf@redhat.com>
291be307 3151 Robert Collins <rbtcollins@hotmail.com>
c0a8e8d0
CF
3152
3153 * exceptions.cc (early_stuff_init): Rename from misnamed
3154 set_console_handler.
3155 (ctrl_c_handler): Attempt to work around potential signal duplication
3156 during process startup.
3157 (sig_handle): Ignore SIGINT when we're just an "exec stub".
3158 * spawn.cc (spawn_guts): Store pid of spawned process in global for use
3159 by ctrl_c_handler.
3160 * dcrt0.cc (dll_crt0_1): Call renamed initialization function.
3161 * winsup.h: Reflect function name change.
3162
fe37dd79
CV
31632002-01-08 Corinna Vinschen <corinna@vinschen.de>
3164
3165 * net.cc (cygwin_accept): Set sun_path for newly connected socket.
3166
cbf7a9eb
CF
31672002-01-07 Ralf Habacker <Ralf.Habacker@freenet.de>
3168
3169 * Makefile.in: Add uninstall target.
3170
a2e12d0c
CF
31712002-01-07 Christopher Faylor <cgf@redhat.com>
3172
3173 * sigproc.cc (getsem): Clean up debugging output.
3174
4a08cbfe
CF
31752002-01-07 Christopher Faylor <cgf@redhat.com>
3176
3177 * sigproc.cc (getsem): Set errno when unable to create own semaphore.
3178 Reorganize to make clearer that error should only come from initial
3179 creation of process semaphore.
3180
10dedaaa
CF
31812002-01-06 Christopher Faylor <cgf@redhat.com>
3182
3183 * dtable.cc (dtable::init_std_file_from_handle): Add some defensive
3184 code to invalid handle case.
3185
d6154fb7
CV
31862002-01-06 Corinna Vinschen <corinna@vinschen.de>
3187
3188 * ioctl.cc (ioctl): Make third argument optional.
3189 * include/sys/ioctl.h: Ditto in declaration.
3190 * dtable.cc (dtable::init_std_file_from_handle): Revert previous
3191 bogus patch.
3192 * window.cc (WndProc): Raise SIGURG instead of SIGIO in case of FD_OOB
3193 message.
3194
9125cbd7 31952002-01-05 Christopher Faylor <cgf@redhat.com>
fcb76c5d 3196
9125cbd7
CF
3197 * dir.cc (opendir): Guarantee release of alloced fhandler structure on
3198 error.
fcb76c5d 3199
9125cbd7
CF
32002002-01-05 Corinna Vinschen <corinna@vinschen.de>
3201
3202 * exceptions.cc (sig_handle): Set default action for SIGURG to SIG_IGN.
3203
32042002-01-05 Corinna Vinschen <corinna@vinschen.de>
2edba236
CV
3205
3206 * dtable.cc (dtable::init_std_file_from_handle): Don't treat NULL
3207 handle as errorneous.
3208
acf05df7
CF
32092002-01-04 Christopher Faylor <cgf@redhat.com>
3210
3211 * cygmagic: Change logic for equality test.
3212
7acba971
CF
32132002-01-04 Christopher Faylor <cgf@redhat.com>
3214
3215 * dir.cc (opendir): Don't attempt to call sub-opendir if ENOENT.
3216
9125cbd7 32172002-01-04 Corinna Vinschen <corinna@vinschen.de>
dc63cea5
CV
3218
3219 * net.cc: Replace usage of AF_UNIX by Posix compliant AF_LOCAL
3220 throughout.
3221 (socketpair): Explicitly allow SOCK_STREAM and SOCK_DGRAM socket types
3222 in families AF_UNIX and AF_LOCAL. Explicitly allow PF_UNSPEC, PF_LOCAL
3223 and PF_INET protocols. Return error otherwise. Implement datagram
3224 socketpairs.
3225
3b789217
CF
32262002-01-01 Christopher Faylor <cgf@redhat.com>
3227
291be307 3228 * speclib: Remove temp files automatically.
3b789217 3229
2fe27909 32302002-01-01 Corinna Vinschen <corinna@vinschen.de>
2fe27909
CV
3231 * fhandler.h (fhandler_socket::sun_path): New private member.
3232 (fhandler_socket::set_sun_path): New method.
3233 (fhandler_socket::get_sun_path): Ditto.
3234 * fhandler_socket.cc (fhandler_socket::fhandler_socket): Initialize
3235 sun_path to NULL.
3236 (fhandler_socket::~fhandler_socket): Free sun_path if needed.
3237 (fhandler_socket::set_sun_path): New method.
3238 * net.cc (cygwin_bind): Set sun_path to path of local socket file.
3239 (cygwin_getsockname): Add code to return correct sockaddr for unix
3240 domain sockets.
This page took 0.392905 seconds and 5 git commands to generate.