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