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