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