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