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