]> sourceware.org Git - newlib-cygwin.git/blame - winsup/cygwin/ChangeLog
* libc/machine/sh/strcpy.S: New file.
[newlib-cygwin.git] / winsup / cygwin / ChangeLog
CommitLineData
4c78be52
CF
12002-06-24 Christopher Faylor <cgf@redhat.com>
2
3 * dtable.cc (fhandler_base::dup2): Cleanup. Ensure that lock is turned
4 off in error condition.
5
1fd072b6
CV
62002-06-24 Corinna Vinschen <corinna@vinschen.de>
7
8 * uinfo.cc (internal_getlogin): Set myself->uid and myself->gid instead
9 of user.real_uid and user.real_gid.
10 (uinfo_init): Evaluate orig_uid and real_uid from myself->uid. Ditto
11 for gid.
12
de0557f7
CF
132002-06-23 Pierre Humblet <pierre.humblet@ieee.org>
14
15 * security.cc (get_group_sidlist): Add pw argument and use pw->pw_name
16 in call to get_supplementary_group_sidlist.
17 (create_token): Add pw argument and use it in call to
18 get_group_sidlist.
19 * security.h: Add pw argument in declaration of create_token.
20 * syscalls.cc (seteuid32): Add pw argument in call to create_token.
21
035bfbdd
CF
222002-06-23 Conrad Scott <conrad.scott@dsl.pipex.com>
23
24 * fhandler.cc (fhandler_base::fstat): Set S_IFIFO for pipes.
25 * fhandler_socket.cc (fhandler_socket.cc::fstat): Set S_IFSOCK.
26
eecef29f
CF
272002-06-23 Christopher Faylor <cgf@redhat.com>
28
29 * lib/_cygwin_S_IEXEC.cc: Remove obsolete file.
30
85b995d4
CF
312002-06-23 Christopher Faylor <cgf@redhat.com>
32
33 Use cygwin_{shm,ipc}.h instead of /sys/{shm,ipc}.h throughout.
34 * sys/ipc.h: Remove.
35 * sys/shm.h: Remove.
36 * cygwin_ipc.h: New file.
37 * cygwin_shm.h: New file.
38
6bda8def
CF
392002-06-23 Christopher Faylor <cgf@redhat.com>
40
41 * cygwin.sc: Add recent changes from ld sources.
42
432002-06-23 Conrad Scott <conrad.scott@dsl.pipex.com>
44
45 * winsup.h: Move #ifdef EXPCGF code into "winbase.h".
46 * winbase.h: #ifdef EXPCGF code moved here from "winsup.h".
47
f6709c07
RC
482002-06-12 Thomas Pfaff <tpfaff@gmx.net>
49
50 * thread.h (pthread::cleanup_stack): Renamed cleanup_handlers to
51 cleanup_stack.
52 * thread.cc (pthread::pthread): Ditto.
53 (pthread::create): Fixed mutex verification.
54 (pthread::push_cleanup_handler): Renamed cleanup_handlers to
55 cleanup_stack.
56 Mutex calls removed, used InterlockedExchangePointer instead.
57 (pthread::pop_cleanup_handler): Renamed cleanup_handlers to
58 cleanup_stack.
59 (pthread::pop_all_cleanup_handlers): Ditto.
60 (__pthread_once): Check state first and return if already done.
61 (__pthread_join): DEADLOCK test reverted to __pthread_equal
62 call.
63 (__pthread_detach): Unlock mutex before deletion.
64
0278e3a3
CF
652002-06-21 Christopher Faylor <cgf@redhat.com>
66
67 * Makefile.in (cygrun.exe): Move -lgcc where it will do some good.
68
1a7cb557
CV
692002-06-21 Corinna Vinschen <corinna@vinschen.de>
70
71 * syscalls.cc (stat64_to_stat32): Correctly evaluate st_rdev.
72 (fstat64): Set st_rdev to same value as st_dev.
73 (stat_worker): Ditto.
74
49056987
CV
752002-06-21 Corinna Vinschen <corinna@vinschen.de>
76
77 * security.cc (alloc_sd): Carefully check owner_sid again after trying
78 SIDs from cygheap.
79
dd0208eb
CV
802002-06-21 Corinna Vinschen <corinna@vinschen.de>
81
82 * security.cc (alloc_sd): Remove unnecessary retrieval of owner name.
83 Check uid for current user first and use SIDs from cygheap if so.
84 Set errno to EINVAL if user SID isn't retrievable. Just print user SID
85 as debug output.
86 Don't bail out if group SID isn't retrievable. Change debug output
87 appropriately.
88
d7c2bd8e
CF
892002-06-21 Christopher Faylor <cgf@redhat.com>
90
91 * errno.cc: Change text description for EBADF throughout.
92
7c02f861
CF
932002-06-20 Pierre Humblet <pierre.humblet@ieee.org>
94
95 * uinfo.cc (cygheap_user::ontherange): Use env_name for NetUserGetInfo.
96 (cygheap_user::env_logsrv): Verify env_domain is valid.
97 * environ.cc: Include child_info.h and keep spenvs[] sorted.
98 (environ_init): Check child_proc_info instead of myself->ppid_handle.
99
c25ebbaf
CF
1002002-06-19 Christopher Faylor <cgf@redhat.com>
101
102 * fhandler.cc (fhandler_base::set_flags): Change priority of "linked
103 in" default binmode setting so that it has priority over optional
104 setting.
105
03a2ce9a
CF
1062002-06-19 Christopher Faylor <cgf@redhat.com>
107
d70b993f 108 Use hMainProc where appropriate, throughout.
03a2ce9a
CF
109 * environ.cc (spenv::retrieve): Add debugging statements.
110
111 * pinfo.cc (set_myself): Don't call strace.hello if already stracing.
112 * strace.cc (strace): Move NO_COPY keyword so that it will actually
113 take effect.
114
834224ab
CV
1152002-06-19 Corinna Vinschen <corinna@vinschen.de>
116
117 * uinfo.cc (cygheap_user::ontherange): Call NetUserGetInfo() only with
118 non-NULL logserver parameter.
119
e40670ee
CF
1202002-06-16 Christopher Faylor <cgf@redhat.com>
121
122 * cygheap.h (cygheap_user::issetuid): New method.
123 * dtable.cc (dtable::vfork_child_dup): Use new method to determine if
124 we are in "setuid mode."
125 * fork.cc (fork_parent): Ditto.
126 * spawn.cc (spawn_guts): Ditto.
127 * syscalls.cc (seteuid32): Ditto.
128 (setegid32): Ditto.
129 * environ.cc (spenv::retrieve): (Suggested by Pierre Humblet) Do
130 potential recalculation of cygheap_user stuff when in setuid mode.
00a9e8a0
CF
131 Return special value when environment variable should be calculated but
132 not added.
e40670ee
CF
133 (build_env): Don't add retrieved value to dstp if it is 'dont_add'.
134
a05a9e01
CF
1352002-06-16 Christopher Faylor <cgf@redhat.com>
136
137 Changes suggested by Pierre Humblet.
138 * environ.cc (NL): New macro.
139 (conv_envvars): Use NL macro to fill in name and namelen.
140 (spenv::namelen): New field.
141 (spenvs): Use NL to fill in name and namelen.
142 (spenv::retrieve): Eliminate length argument. Instead, use namelen
143 throughout.
144 (build_env): Don't calculate length of initial FOO= part of
145 environment. Accommodate spenv::retrive argument change.
146
5f25e1d1
CF
1472002-06-16 Christopher Faylor <cgf@redhat.com>
148
149 * cygheap.h (cygheap_user::winname): New field.
150 * cygheap.cc (cygheap_user::set_name): Clear winname when name changes.
151 * uinfo.cc (cygheap_user::env_logsrv): Avoid calculating server when
152 Windows user == SYSTEM.
153 (cygheap_user::env_domain): Set winname here too.
154 (cygheap_user::env_userprofile): Eliminate superfluous tests.
155 (cygheap_user::env_name): Seed winname by calling env_domain().
156
5c8bce24
CF
1572002-06-12 Pierre Humblet <pierre.humblet@ieee.org>
158
159 * spawn.cc (spawn_guts): Revert removal of ciresrv.moreinfo->uid =
160 ILLEGAL_UID.
161
6ea3e429
CF
1622002-06-15 Christopher Faylor <cgf@redhat.com>
163
164 * child_info.h (child_proc_info): Declare as base class.
165 (spawn_info): Declare as alias of child_proc_info to aid debugging.
166 (fork_info): Ditto.
167 * cygheap.cc (cygheap_fixup_in_child): Use child_proc_info global
168 rather than parameter.
169 * cygheap.h (cygheap_fixup_in_child): Reflect above change in
170 declaration.
171 * dcrt0.cc (_dll_crt0): Move 'si' definition here. Assign
172 child_proc_info.
173 (dll_crt0_1): Accommodate cygheap_fixup_in_child and *_info changes.
174 * environ.cc (spenv::retrieve): Make regparm.
175 * environ.h (environ_init): Ditto.
176 (win_env::add_cache): Ditto.
177 (build_env): Ditto.
178 (getwinenv): Ditto.
179 * fork.cc (sync_with_parent): Use fork_info global.
180 (fork_child): Ditto.
181
cff111a6
CF
1822002-06-14 Christopher Faylor <cgf@redhat.com>
183
184 * uinfo.cc (cygheap_user::ontherange): Don't set HOMEDRIVE or HOMEPATH
185 unless one or the other is specified.
186
6d171b44
CF
1872002-06-14 Christopher Faylor <cgf@redhat.com>
188
189 * cygheap.h (cygheap_user::userprofile_env_buf): New static member.
190 * environ.cc (build_env): Add debugging statement.
191 (spenvs): Switch functions for USERDOMAIN and USERNAME.
192 * spawn.cc (spawn_guts): Move environment initialization prior to
193 cygheap_setup_for_child or environment info will never be copied to
194 child.
195
a77d35f7
CF
1962002-06-14 Christopher Faylor <cgf@redhat.com>
197
198 * cygheap.h (cygheap_user): Add static members to hold home{drive,path}
199 info.
200 * uinfo.cc (cygheap_user::ontherange): Use static class members for
201 local HOME* storage.
202
9a771b29
CF
2032002-06-14 Christopher Faylor <cgf@redhat.com>
204
205 * cygheap.cc (cygheap_user::set_logsrv): Remove.
206 (cygheap_user::set_domain): Ditto.
207 * cygheap.h (cygheap_user::set_logsrv): Remove declaration.
208 (cygheap_user::set_domain): Ditto.
209 (cygheap_user::env_domain): Declare new method.
210 (cygheap_user::env_name): Ditto.
211 * environ.cc (spenvs): Add two environment variables.
212 * spawn.cc (spawn_guts): Call build_env after RevertToSelf. Always set
213 ciresrv.mount_h.
214 (cygheap_user::ontherange): Recalculate homedrive/homepath if they are
215 empty. Use env_logsrv to get logon server.
216 (cygheap_user::env_logsrv): Calculate server name here rather than
217 relying on it having been previously calculated.
218 (cygheap_user::env_domain): Ditto for domain name.
219 (cygheap-user::env_name): New method.
220
2212002-06-12 Pierre Humblet <pierre.humblet@ieee.org>
222
223 * syscalls.cc (seteuid32): Do not get or set the environment. Do not
224 call LookupAccountSid nor internal_getlogin. Set cygheap->user name
225 and sid from the passwd entry.
226 * uinfo.cc (uinfo_init): Only call internal_getlogin when starting from
227 a non Cygwin process and use the values returned in user.
228 (internal_getlogin): Simplify to case where starting from a non Cygwin
229 process. Store return values in user and return void. Do not set the
230 Windows default environment.
231 * dcrt0.cc (dll_crt0_1): Call uinfo_init only when needed. Do not set
232 myself->uid nor reset user.sid.
233 * spawn.cc (spawn_guts): Get the sid from cygheap->user. Always
234 RevertToSelf(). Don't set uid in impersonated case.
235 * cygheap.cc (cygheap_user::set_sid): Do not set orig_sig.
236 (cygheap_user::set_orig_sid): New.
237 * cygheap.h: Declare cygheap_user::set_sid.
238 * winsup.h: Add argument to uinfo_init().
239
470e8c46
CV
2402002-06-14 Corinna Vinschen <corinna@vinschen.de>
241
242 * environ.cc (build_env): If realloc moves envblock, move s with it.
243
39be53dc
CF
2442002-06-13 Nicholas S. Wourms <nwourms@netscape.net>
245
246 * winver.rc: Add more words to copyright.
247
0e6d80e4
CV
2482002-06-13 Corinna Vinschen <corinna@vinschen.de>
249
250 * cygheap.cc (cygheap_user::set_name): Revert previous change.
251 * environ.cc (spenv::retrieve): Check return value of call to
252 cygheap->user.*from_cygheap().
253
5682a6dd
CV
2542002-06-13 Corinna Vinschen <corinna@vinschen.de>
255
256 * cygheap.cc (cygheap_user::set_name): Remove setting homedrive and
257 homepath to NULL.
258 (cygheap_user::set_logsrv): Fix free'ing of plogsrv.
259 * cygheap.h (cygheap_user::cygheap_user): Initialize homedrive and
260 homepath to NULL.
261
5f74ae83
CF
2622002-06-13 Christopher Faylor <cgf@redhat.com>
263
264 * security.cc (get_logon_server): Use strcasematch rather than
265 strcasecmp.
266
4863867a
CF
2672002-06-12 Christopher Faylor <cgf@redhat.com>
268
269 * path.cc (chdir): Minor cleanup.
270
12a2ef44
CF
2712002-06-12 Christopher Faylor <cgf@redhat.com>
272
273 * environ.cc (build_env): Correctly fill out windows environment block
274 with win32 paths rather than posix paths.
275
da086d02
CF
2762002-06-12 Christopher Faylor <cgf@redhat.com>
277
278 * cygheap.cc (cygheap_user::set_name): Set homedrive and homepath to
279 NULL on user name change.
280 (cygheap_user::set_logsrv): Allocate enough space for leading \\ so
281 that we can put this in the environment, if needed.
282 * cygheap.h (homebodies): New enum.
283 (cygheap_user::homedrive): New field.
284 (cygheap_user::homepath): Ditto.
285 (cygheap_user::env_logsrv): New method.
286 (cygheap_user::env_homepath): New method.
287 (cygheap_user::env_homedrive): New method.
288 (cygheap_user::env_userprofile): New method.
289 (cygheap_user::ontherange): New method.
290 * environ.cc (envsize): Eliminate debugging argument.
291 (environ_init): Assume that envc counts number of elments not total
292 size.
293 (spenv): New class.
294 (spenvs): New array, renamed from forced_winenv_vars, using spenv.
295 (spenv::retrieve): New method.
296 (build_env): Rename from 'winenv' -- one stop shopping for building new
297 environment blocks for both windows and "unix".
298 * environ.h (build_env: Declare.
299 (winenv): Delete declaration.
300 (envsize): Ditto.
301 * spawn.cc (spawn_guts): Use build_env to build windows and cygwin
302 environment blocks.
303 * uinfo.cc (internal_getlogin): Eliminate environment manipulation.
304 Default to info from GetUserName if it exists. Move HOMEPATH and
305 HOMEDRIVE stuff elsewhere. Move HOME setting elsewhere. Only set HOME
306 environment variable in processes that are not parented by a cygwin
307 process.
308 (cygheap_user::ontherange): Define new method.
309 (cygheap_user::env_logsrv): Ditto.
310 (cygheap_user::env_homepath): Ditto.
311 (cygheap_user::env_homedrive): Ditto.
312 (cygheap_user::env_userprofile): Ditto.
313
077d8b23
CF
3142002-06-11 Christopher Faylor <cgf@redhat.com>
315
316 * spawn.cc (spawn_guts): More hToken removal cleanup.
317
d5377829
CF
3182002-06-09 Pierre Humblet <pierre.humblet@ieee.org>
319
320 * spawn.cc (spawn_guts): Define sec_attribs and call sec_user_nih()
321 only once.
322
380aaf2d
CF
3232002-06-10 Christopher Faylor <cgf@redhat.com>
324
325 * Makefile.in: Ensure that -MD gets added to CFLAGS regardless of
326 CFLAGS command-line setting.
327
328 * cygwin.din: Export sexec* functions as function which returns ENOSYS
329 (i.e., sexec* is deprecated).
330 * dtable.cc (dtable::vfork_child_dup): Ensure that impersonation is
331 restored even on failure.
332 * exec.cc: Throughout, remove references to sexec* and _spawnve.
333 * pinfo.h: Remove _spawnve declaration.
334 * spawn.cc: Rename _spawnve to spawnve and use throughout.
335 (spawn_guts): Eliminate hToken argument and processing of same. Just
336 perform special actions if impersonating.
337 (spawnve): Rename from _spawnve.
338
b01cbd5d
CF
3392002-06-10 Christopher Faylor <cgf@redhat.com>
340
341 * include/sys/strace.h (strace): Avoid use of constructor.
342
fe4283af
CF
3432002-06-10 Christopher Faylor <cgf@redhat.com>
344
345 * dcrt0.cc (dll_crt0_1): Initialize wincap and check for sanity before
346 running global ctors.
347 * wincap.h (wincap): Eliminate constructor. Default is to zero memory,
348 anyway.
349 * wincap.cc (wincap): Copy this on fork to avoid initialization in
350 forked processes.
351
3d78e129
CV
3522002-06-10 Corinna Vinschen <corinna@vinschen.de>
353
354 * fhandler.h (fhandler_socket::fixup_after_fork): Revert patch from
355 2002-06-04.
356 * fhandler_socket.cc (fhandler_socket::fixup_after_fork): Ditto.
357 (fhandler_socket::dup): Ditto.
358 * net.cc (fdsock): Make sockets explicitely noninheritable on NT.
359
c2102631
CF
3602002-06-09 Christopher Faylor <cgf@redhat.com>
361
362 * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Correctly
363 set number of links for directory, if appropriate.
364
43c3c4e3
RC
3652002-06-10 Robert Collins <rbtcollins@hotmail.com>
366
367 * thread.cc: Variation of a patch from Thomas Pffaf.
d70b993f 368 (__pthread_detach): Cleanup thread object if the thread has terminated.
43c3c4e3
RC
369 (__pthread_join): Change order of error checks, and lock against
370 join/detach/exit races.
371 (__pthread_exit): Lock object against join/detach/exit races.
372 (pthread::thread_init_wrapper): Ditto.
373 (thread_init_wrapper): Rename to pthread::thread_init_wrapper.
374 (pthread::create): Check that the mutex initialized correctly.
375 (pthread::push_cleanup_handler): Lock against potential cancellation
376 race. NB: this may not be required if pthread_cleanup_push is non-
377 cancelable.
378 * thread.h (pthread::mutex): New member.
379 (thread_init_wrapper): Rename to pthread::thread_init_wrapper.
380 (pthread::thread_init_wrapper_: New static member.
381
007276b3
RC
3822002-06-10 Robert Collins <rbtcollins@hotmail.com>
383
384 * cygwin.din: Add _pthread_cleanup_push and _pthread_cleanup_pop.
385 * pthread.cc: Change __pthread_self to pthread::self() thruoghout.
386 (_pthread_cleanup_push): New function.
387 (_pthread_cleanup_pop): Ditto.
388 * thread.cc: Thanks to Thomas Pfaff for the pthread cleanup_push,_pop
389 patch, this work is derived from that.
390 Change __pthread_self to pthread::self() thruoghout.
391 (__pthread_self): Rename to pthread::self.
392 (pthread::self): New method.
393 (pthread::pthread): Initialize new member.
394 (pthread::push_cleanup_handler): New method.
395 (pthread::pop_cleanup_handler): New method.
396 (pthread::pop_all_cleanup_handlers): New method.
397 (__pthread_exit): Pop all cleanup handlers.
398 * thread.h (pthread::push_cleanup_handler): Declare.
399 (pthread::pop_cleanup_handler): Ditto.
400 (pthread::pop_all_cleanup_handlers): Ditto.
401 (pthread::self): New static method.
402 (__pthread_exit): Give C++ linkage.
403 (__pthread_join): Ditto.
404 (__pthread_detach): Ditto.
405 (__pthread_self): Remove.
406
4072002-04-24 Thomas Pfaff <tpfaff@gmx.net>
408
c2102631
CF
409 * include/pthread.h (__pthread_cleanup_handler): New structure.
410 (pthread_cleanup_push): Rewritten.
007276b3
RC
411 (pthread_cleanup_pop): Ditto.
412 (_pthread_cleanup_push): New prototype.
c2102631 413 (_pthread_cleanup_pop): Ditto.
007276b3
RC
414
4152002-04-24 Thomas Pfaff <tpfaff@gmx.net>
416
417 * thread.cc (thread_init_wrapper): Check if thread is already joined.
418 (__pthread_join): Set joiner first.
419 (__pthread_detach): Ditto.
420
fec98ec9
RC
4212002-06-10 Robert Collins <rbtcollins@hotmail.com>
422
423 * cygserver_transport.cc (create_server_transport): Finish the split
424 out of sockets code from transport_layer_base. Thanks to Nicholas
425 Wourms and Conrad Scott for catching this.
426
7ac66bdd
CF
4272002-06-08 Christopher Faylor <cgf@redhat.com>
428
429 * pinfo.cc (pinfo_dummy): Initialize to correct size.
430
a004a5b8
CF
4312002-06-08 Christopher Faylor <cgf@redhat.com>
432
433 * path.cc: Change MOUNT_AUTO to MOUNT_CYGDRIVE throughout.
434 * shared_info.h (CURR_MOUNT_MAGIC): Update.
435
50484e8e
CF
4362002-06-08 Christopher Faylor <cgf@redhat.com>
437
438 * external.cc (cygwin_internal): Make v1 mount table access invalid.
439 * path.cc (mount_info::init): Remove had_to_create_mount_areas initialization.
440 (mount_info::from_registry): Remove v1 table import.
441 (mount_info::read_v1_mounts): Eliminate.
442 (mount_info::import_v1_mounts): Ditto.
443 * shared_info.h (mount_info): Ditto for both of above.
444 * sys/mount.h (MOUNT_DEVFS): New enum.
445 (MOUNT_PROC): Ditto.
446
2e2dcba3
CF
4472002-06-08 Christopher Faylor <cgf@redhat.com>
448
449 * include/wchar.h: Define __need_size_t.
450
9cde3cf3
CF
4512002-06-07 Christopher Faylor <cgf@redhat.com>
452
453 * fhandler_socket.cc (fhandler_socket::fstat): Don't assume that socket
454 is unix-domain socket.
455
4562002-06-07 Christopher Faylor <cgf@redhat.com>
457
458 * times.cc (hires_ms::prime): Set init flag.
459
4602002-06-07 Conrad Scott <conrad.scott@dsl.pipex.com>
461
462 * times.cc (hires_ms::prime): Adjust epoch of initime_us from 1601 to
463 1970.
464
9d0efbb3
CF
4652002-06-06 Christopher Faylor <cgf@redhat.com>
466
467 * autoload.cc (timeGetDevCaps): Define new autoload function.
468 (timeGetTime): Ditto.
469 (timeBeginPeriod): Ditto.
470 (timeEndPeriod): Ditto.
471 * hires.h (hires_base): New class. Renamed from hires.
472 (hires_us): New class.
473 (hires_ms): New class.
474 * strace.cc (strace::microseconds): Use hires_us class.
475 * times.cc (gettimeofday): Use hires-ms class.
476 (hires_us::prime): Renamed from hires::prime.
477 (hires_us::usecs): Renamed from hires:usecs.
478 (hires_ms::prime): New method.
479 (hires_ms::usecs): New method.
480 (hires_ms::~hires_ms): New destructor.
481
46b941fc
CF
4822002-06-06 Christopher Faylor <cgf@redhat.com>
483
484 * autoload.cc (noload): Correctly save argument count register.
485
c4e6ff48
CV
4862002-06-05 Conrad Scott <conrad.scott@dsl.pipex.com>
487
488 * fhandler.cc (fhandler_base::fstat): Initialise tv_nsec member of
489 st_atim, st_mtim, and st_ctim fields.
490 * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Ditto.
491 * fhandler_process.cc (fhandler_process::fstat): Ditto.
46b941fc
CF
492 * glob.c (stat32_to_STAT): Copy across the whole st_atim, st_mtime, and
493 st_ctim fields.
c4e6ff48
CV
494 * syscalls.cc (stat64_to_stat32): Ditto.
495 * times.cc (to_timestruc_t): New function.
496 (time_as_timestruc_t): New function.
497 * winsup.h: Add to_timestruc_t and time_as_timestruc_t functions.
46b941fc
CF
498 * include/cygwin/stat.h: Replace time_t with timestruc_t throughout for
499 all file times, removing the st_spare1, st_spare2, and st_spare3 fields
500 in the process. Add macros to access tv_sec fields by old names.
501 * include/cygwin/types.h: Typedef timespec_t and timestruc_t as struct
502 timespec.
c4e6ff48 503
2e8abfc1
CV
5042002-06-03 Pierre Humblet <pierre.humblet@ieee.org>
505
506 * sec_helper.cc (lookup_name): Suppress.
507 * security.cc (alloc_sd): Remove logsrv argument.
508 Remove two calls to lookup_name.
509 (set_security_attribute): Remove logsrv argument.
510 Remove logsrv argument in call to alloc_sd.
511 (set_nt_attribute): Remove logsrv argument.
512 Remove logsrv argument in call to set_security_attribute.
513 (set_file_attribute): Remove logsrv argument.
514 Remove logsrv argument in call to set_nt_attribute.
515 (set_file_attribute): Remove logsrv argument.
516 Remove logsrv argument in call to set_file_attribute.
517 * syscalls.cc (chown_worker): Remove logserver argument in
518 call to set_file_attribute.
519 (chmod): Ditto.
520 * shm.cc (shmget): Remove logsrv argument in call to alloc_sd.
521 * uinfo.cc (internal_getlogin): Replace calls to
522 lookup_name by call to LookupAccountName.
523 * security.h: Remove logsrv in declarations of set_file_attribute
524 and alloc_sd. Remove declaration of lookup_name.
525
f7a7cc90
CF
5262002-06-05 Christopher Faylor <cgf@redhat.com>
527
528 * child_info.h (CHILD_INFO_MAGIC): Oops. Revert previous change. gcc
529 3.1 bug?
530
784e340c
CF
5312002-06-05 Christopher Faylor <cgf@redhat.com>
532
533 * child_info.h (CHILD_INFO_MAGIC): Update.
534
58fcd93a
CF
5352002-06-05 Christopher Faylor <cgf@redhat.com>
536
537 * strace.cc (strace::hello): Set inited, when appropriate.
538
ee964e2f
CF
5392002-06-05 Christopher Faylor <cgf@redhat.com>
540
541 * cygwin.din: Eliminate some newlib wrappers.
542 * path.cc (get_devn): Only consider first 99 potential com devices.
543 (get_device_number): Ditto.
544 * times.cc (_times): Eliminate.
545 (_times): Renamed from times().
546
ea4e6ec8
CF
5472002-06-05 Christopher Faylor <cgf@redhat.com>
548
549 * dir.cc (rmdir): Streamline. Detect attempts to remove directories
550 from "read-only" virtual devices. (Suggested by Pavel Tsekov)
46b941fc
CF
551 * syscalls.cc (unlink): Detect attempts to remove directories from
552 "read-only" virtual devices. (From Pavel Tsekov)
ea4e6ec8 553
2bb6b3e5
CF
5542002-06-05 Christopher Faylor <cgf@redhat.com>
555
556 * dtable.cc (handle_to_fn): Check error return value from NtQueryObject
557 first before seeing if name buffer is NULL.
558
559 * grp.cc (read_etc_group): Fix gcc warning regarding snprintf format.
560 * passwd.cc (read_etc_passwd): Ditto.
561
e9259cb2
RC
5622002-04-18 Thomas Pfaff <tpfaff@gmx.net>
563
564 * thread.h (pthread::joiner): New member.
565 * thread.cc (pthread::pthread): Initialize joiner to NULL
566 (pthread::create): Increment of thread counter moved from
567 __pthread_create to this location.
568 (__pthread_create): Increment thread counter removed.
569 (thread_init_wrapper): Set joiner to self when thread was created
570 detached.
571 (__pthread_exit): delete thread when it is detached and not
572 joined.
573 (__pthread_join): Check for deadlock and delete thread when it has
574 terminated.
575 (__pthread_detach): Set joiner to self when thread state
576 changed to detached.
577
eceee297
CV
5782002-06-05 Corinna Vinschen <corinna@vinschen.de>
579
580 * grp.cc (read_etc_group): When emulating nonexisting group file on
581 NT systems, read primary group SID from process token. Use that info
582 to create correct group entry. On error or on 9x systems fallback
583 to emulating Administrators group as before.
ae1ebb81 584 * passwd.cc (read_etc_passwd): When emulating nonexisting passwd file
46b941fc 585 on NT systems, read user and primary group SID from process token.
ae1ebb81
CV
586 Use that info to create correct passwd entry. On error or on 9x
587 systems fallback to emulating user with Administrator user id and
588 Administrators group as before.
eceee297 589
38f39368
CV
5902002-06-05 Corinna Vinschen <corinna@vinschen.de>
591
592 * grp.cc (etc_group): Removed.
593 (parse_grp): Make line parameter nonconst. Don't copy data into new
594 allocated memory. Check for CR instead of LF to accomodate new
595 read method.
596 (add_grp_line): Make line parameter nonconst.
597 (read_etc_group): Rearrange using new pwdgrp_read class.
598 * passwd.cc (parse_pwd): Don't copy data into new allocated memory.
599 Check for CR instead of LF to accomodate new read method.
600 (read_etc_passwd): Rearrange using new pwdgrp_read class.
601 * pwdgrp.h (pwdgrp_check::set_last_modified): Use different
602 parameters.
603 (class pwdgrp_read): New class for opening and reading passwd and
604 group files.
605
ce006ffa
CF
6062002-06-04 Christopher Faylor <cgf@redhat.com>
607
608 * dtable.cc (handle_to_fn): Attempt to handle "raw" accesses to remote
609 shares.
610 * path.cc (mount_info::conv_to_win32_path): Set flags to binary when
611 mount entry is not found.
612 (mount_info::set_flags_from_win32_path): Ditto.
613
147d2ab4
CF
6142002-06-04 Christopher Faylor <cgf@redhat.com>
615
616 * dtable.cc (handle_to_fn): Correct placement and length of name
ea4e6ec8 617 buffer. (Suggested by Pavel Tsekov)
147d2ab4 618
e35f391f
CF
6192002-06-04 Christopher Faylor <cgf@redhat.com>
620
621 Remove fcntl.h includes throughout.
622 * fhandler.h: Move fcntl.h include here.
623 (fhandler_base::set_flags): Accept supplied_bin argument. Make
624 non-inlined.
625 * dtable.cc (dtable::init_std_file_from_handle): Just use binmode from
626 pc.
627 (reset_to_open_binmode): Use set_flags.
628 * cygwin.din (open): Avoid newlib wrapper.
629 (read): Ditto.
630 (unlink): Ditto.
631 (write): Ditto.
632 * fhandler.cc (fhandler_base::set_flags): Accept supplied_bin argument.
633 Make binmode decisions here.
634 (fhandler_base::open): Avoid using pc if it is NULL. Eliminate binmode
635 logic. Just call set_flags with binmode argument.
636 (fhandler_base::init): Call set_flags with binmode argument.
637 * fhandler_clipboard.cc (fhandler_dev_clipboard::open): Ditto.
638 * fhandler_console.cc (fhandler_console::open): Ditto.
639 (fhandler_console::init): Force binary on open.
640 * fhandler_disk_file.cc (fhandler_disk_file::open): Don't set binmode
641 here. Let it happen in base class.
642 * fhandler_dsp.cc (fhandler_dev_dsp::open): Force binmode open. Set
643 return value appropriately if unable to open.
644 * fhandler_proc.cc (fhandler_proc::open): Make sure flags are set
645 before open_status.
646 * fhandler_process.cc (fhandler_process::open): Ditto.
647 * fhandler_registry.cc (fhandler_registry::open): Ditto.
648 * fhandler_random.cc (fhandler_dev_random::fhandler_dev_random): Ditto.
649 * fhandler_raw.cc (fhandler_dev_raw::open): Force O_BINARY by default.
650 * fhandler_serial.cc (fhandler_serial::init): Ditto.
651 * fhandler_tty.cc (fhandler_tty_slave::open): Ditto.
652 (fhandler_pty_master::open): Ditto.
653 * fhandler_virtual.cc (fhandler_virtual::open): Ditto.
654 * fhandler_windows.cc (fhandler_windows::open): Ditto.
655 * fhandler_zero.cc (fhandler_dev_zero::open): Ditto.
656 * net.cc (fdsock): Ditto.
657 * path.cc (path_conv::check): Avoid checking for executable extension
658 when directory. (Suggested by Pavel Tsekov)
659 (set_flags): Set PATH_TEXT explicitly, when appropriate.
660 (mount_info::conv_to_win32_path): Use set_flags() to set path flags.
661 * path.h (PATH_TEXT): New enum.
662 (path_conv::binmode): Return appropriate constant based on binmode.
663 * pipe.cc (make_pipe): Set binmode to O_TEXT xor O_BINARY.
664 * syscalls.cc (setmode_helper): Make debugging message a little
665 clearer.
666 (setmode): Set binmode via set_flags.
667
4e138847
CV
6682002-06-04 Corinna Vinschen <corinna@vinschen.de>
669
670 * fhandler.h (class fhandler_socket): Add private method
671 fixup_after_fork (bool, HANDLE).
672 * fhandler_socket.cc (fhandler_socket::fixup_after_fork): Move
673 functionality to new private method. Add closing parent socket
674 if not called from dup(). Create method new calling private method
675 with appropriate parameter.
676 (fhandler_socket::fixup_after_exec): Call private method
677 fixup_after_fork with appropriate parameter.
678 (fhandler_socket::dup): Ditto.
679
6802002-06-04 Corinna Vinschen <corinna@vinschen.de>
6bfca3cc
CV
681
682 * fhandler_dsp.cc (fhandler_dev_dsp::open): Set errno to EACCES if
683 requested mode isn't supported.
684
e02f1e9c
CF
6852002-06-03 Christopher Faylor <cgf@redhat.com>
686
687 * fhandler.cc (fhandler_base::open): Don't set binmode if already set.
688 Don't check for file. Files should already be set. Report on binary
689 mode for debugging.
690 (fhandler_base::fhandler_base): Don't set default binmode here. That's
691 for later.
692 * fhandler_console.cc (fhandler_console::output_tcsetattr): Don't set
693 binmode, ever, for console.
694 * fhandler_disk_file.cc (fhandler_disk_file::open): Always set the
695 binary mode to the value derived from mount table.
696 * path.cc (mount_info::conv_to_win32_path): Default to binmode if path
697 does not translate into anything in the mount table.
698
31b98a62
CV
6992002-06-03 Corinna Vinschen <corinna@vinschen.de>
700
701 * external.cc (cygwin_internal): Add CW_EXTRACT_DOMAIN_AND_USER
702 handling to call extract_nt_dom_user() from applications.
703 * include/sys/cygwin.h (cygwin_getinfo_types): Add
704 CW_EXTRACT_DOMAIN_AND_USER.
705
b3c29731
CV
7062002-06-03 Corinna Vinschen <corinna@vinschen.de>
707
708 * syscalls.cc (stat64_to_stat32): Transform st_dev correctly.
709 (fstat64): Add evaluating st_ino and st_dev.
710 (stat_worker): Evaluate st_dev as 32 bit value.
711 * include/cygwin/stat.h: Use new dev_t definition throughout.
712 * include/cygwin/types.h: Define __dev16_t and __dev32_t. Define
713 dev_t according to __CYGWIN_USE_BIG_TYPES__ setting.
714 * include/sys/sysmacros.h: Define major, minor and makedev
715 according to __CYGWIN_USE_BIG_TYPES__ setting.
716
656c3192
CV
7172002-06-03 Pierre Humblet <pierre.humblet@ieee.org>
718
719 * syscalls.cc (setegid32): Verify the correctness of the gid
720 of the group returned by getgrgid32.
721
1eb934b7
CV
7222002-06-03 Pierre Humblet <pierre.humblet@ieee.org>
723
724 * security.cc (lsa2wchar): Suppressed.
725 (get_lsa_srv_inf): Suppressed.
726 (get_logon_server_and_user_domain): Suppressed.
727 (get_logon_server): Essentially new.
728 (get_user_groups): Add "domain" argument. Only lookup the
729 designated server and use "domain" in LookupAccountName.
730 (is_group_member): Simplify the arguments.
731 (get_user_local_groups): Simplify the arguments. Do only a
732 local lookup. Use "BUILTIN" and local domain in LookupAccountName.
733 (get_user_primary_group). Only lookup the designated server.
734 (get_group_sidlist): Remove logonserver argument. Do not lookup
735 any server for the SYSTEM account.
736 (create_token): Delete logonserver and call to get_logon_server.
737 Adjust arguments of get_group_sidlist, see above.
738 * security.h: Delete declaration of get_logon_server_and_user_domain
e35f391f 739 and add declaration of get_logon_server.
1eb934b7
CV
740 * uinfo.cc (internal_get_login): Call get_logon_server instead of
741 get_logon_server_and_user_domain.
742
37be5a67
CF
7432002-06-02 Christopher Faylor <cgf@redhat.com>
744
e35f391f
CF
745 * dtable.cc (handle_to_fn): Use largest match for device. Correctly
746 (?) deal with remote drive weirdness.
37be5a67 747
97478fe6
CF
7482002-06-02 Christopher Faylor <cgf@redhat.com>
749
750 * fhandler_disk_file.cc (fhandler_disk_file::fstat_by_name): Check
751 specifically for non-existent file, first.
752 (fhandler_disk_file::fstat): Perform fd open on files with funny
753 characters.
754
47413f84
CF
7552002-06-02 Christopher January <chris@atomice.net>
756
757 * fhandler_process.cc (fhandler_process::open): Set fileid.
758
6b7cd251
CF
7592002-06-02 Christopher Faylor <cgf@redhat.com>
760
761 Remove unneeded sigproc.h includes throughout.
762 * fhandler.h (fhandler_proc::fill_filebuf): Take a pinfo argument.
763 * fhandler_proc.cc (fhandler_proc::get_proc_fhandler): Simplify search
764 for given pid.
765 (fhandler_proc::readdir): Assume that pid exists if it shows up in the
766 winpid list.
767 * fhandler_process.cc (fhandler_process::open): Simplify search for
768 given pid. Call fill_filebuf with pinfo argument.
769 (fhandler_process::fill_filebuf): Pass pinfo here and assume that it
770 exists.
771 * pinfo.h (pinfo::remember): Define differently if sigproc.h is not
772 included.
773
7742002-06-02 Christopher Faylor <cgf@redhat.com>
775
776 * dll_init.cc (dll_list::detach): Don't run destructor on exit.
777
e065a187
CF
7782002-06-01 Christopher Faylor <cgf@redhat.com>
779
780 * fhandler.cc (fhandler_base::fstat): Move dev and ino calculation into
781 caller.
782 * syscalls.cc (stat_worker): Calculate dev and ino calculation here, if
783 zero.
784 * fhandler_proc.cc (fhandler_proc::fhandler_proc): Minor reorg for
785 debugging.
786 * fhandler_process.cc (fhandler_process::exists): Return 0 on
787 nonexistence.
788 (fhandler_process::fstat): Simplify pid logic.
789 * fhandler_tape.cc (fhandler_dev_tape::fstat): Minor reformatting.
790
60abf1c4
CF
7912002-06-01 Christopher Faylor <cgf@redhat.com>
792
793 * path.cc (chdir): Don't allow cd'ing to a non-directory virtual path.
794
28af03fa
CF
7952002-05-31 Christopher Faylor <cgf@redhat.com>
796
797 * fhandler_disk_file.cc (readdir): Move inode calculation into caller.
798 (fhandler_cygdrive::readdir): Add "." and "..".
799 * dir.cc (readdir): Move inode calculation here so that fhandler
800 readdirs can benefit.
801
8e74c320
CF
8022002-05-31 Christopher Faylor <cgf@redhat.com>
803
804 * fhandler_console.cc (fhandler_console::open): Reinstate setting of
805 flags.
806
30478f15
CF
807 * dtable.cc (dtable::init_std_file_from_handle): Default to using
808 binmode derived from path_conv, when required.
809 * fhandler.h (fhandler_base::get_w_binary): Default to binmode if
810 nothing else is specified.
811 * fhandler.h (fhandler_base::get_r_binary): Ditto.
812
813 * fhandler_disk_file.cc (fhandler_disk_file::fstat_by_handle): Work
814 around g++ warning.
815
816 * path.cc (path_conv::check): Remove a debugging statement.
817
de86e35b
CF
8182002-05-31 Christopher Faylor <cgf@redhat.com>
819
820 * fhandler_console.cc (fhandler_console::open): Always default to
821 binmode.
822 (fhandler_console::write_normal): Don't honor binmode setting. There
823 is already a termios setting for this.
824 (fhandler_console::init): Correct argument order in init call.
825
8461f41e
CF
8262002-05-31 Christopher Faylor <cgf@redhat.com>
827
828 * fhandler.cc (fhandler_base::open): Make default open mode == binmode.
829 (fhandler_base::init): Set open flags based on derived binmode argument.
830
bcd0ed9f
CF
8312002-05-31 Christopher Faylor <cgf@redhat.com>
832
833 * dll_init.cc (dll_list::init): Eliminate unneeded debugging statement.
834
18c04cc4
CF
8352002-05-31 Christopher Faylor <cgf@redhat.com>
836
837 * fhandler_proc.cc (fhandler_proc::readdir): Set errno when no more
838 files.
839 * fhandler_process.cc (fhandler_process::readdir): Ditto.
840 * fhandler_registry.cc (fhandler_registry::readdir): Ditto.
841
69be001c
CF
8422002-05-30 Christopher Faylor <cgf@redhat.com>
843
844 * path.cc (path_conv::check): Set fileattr to INVALID_FILE_ATTRIBUTES
845 for nonexistent virtual device path.
846 (chdir): Set correct errno when attempt is made to cd to nonexistent
847 virtual device path.
848
5d8c7a56
CF
8492002-05-30 Christopher Faylor <cgf@redhat.com>
850
851 * fhandler_disk_file.cc (fhandler_disk_file::fstat): Always call
852 fstat_by_name if fd is not opened to allow fstat_by_name to properly
853 set errno.
854
d74eced5
CV
8552002-05-30 Corinna Vinschen <corinna@vinschen.de>
856
857 * autoload.cc: Replace autoload statments for ZwXXX by NtXXX.
858 Drop ZwQuerySystemInformation since NtQuerySystemInformation was
859 already available.
860 * fhandler_proc.cc (format_proc_uptime): Replace call to
861 ZwQuerySystemInformation by call to NtQuerySystemInformation.
862 (format_proc_stat): Ditto.
863 * fhandler_process.cc (format_process_stat): Replace call to
864 ZwQueryInformationProcess by call to NtQueryInformationProcess.
865 (get_process_state): Ditto.
866 (get_mem_values): Ditto. Replace call to ZwQueryVirtualMemory by
867 call to NtQueryVirtualMemory.
868 * ntdll.h: Cleanup. Drop ZwQuerySystemInformation since
869 NtQuerySystemInformation was already available. Replace declarations
870 of ZwXXX functions by declarations of NtXXX.
871 * pinfo.cc (winpids::enumNT): Replace call to ZwQuerySystemInformation
872 by call to NtQuerySystemInformation.
873
5d8c7a56
CF
8742002-05-29 Christopher Faylor <cgf@redhat.com>
875
876 * fhandler.cc (binmode): Default to binmode when mode is not known.
877
186637a5
CF
8782002-05-29 Christopher Faylor <cgf@redhat.com>
879
880 * include/sys/cygwin.h (EXTERNAL_PINFO_VERSION): Reinstate.
881 * external.cc (fillout_pinfo): Use it.
882
3a571063
CV
8832002-05-29 Corinna Vinschen <corinna@vinschen.de>
884
885 * external.cc (fillout_pinfo): Use new version define.
886 * include/sys/cygwin.h (external_pinfo): Define
887 EXTERNAL_PINFO_VERSION_16_BIT and EXTERNAL_PINFO_VERSION_32_BIT
888 instead of just EXTERNAL_PINFO_VERSION.
889
9fef0139
CF
8902002-05-29 Christopher Faylor <cgf@redhat.com>
891
892 * external.cc (fillout_pinfo): Set new version field in external_pinfo
893 structure.
894 * include/sys/cygwin.h (external_pinfo): Replace strace_file with
895 version field.
896
a8d7ae61
CV
8972002-05-29 Corinna Vinschen <corinna@vinschen.de>
898
899 Change internal uid datatype from __uid16_t to __uid32_t
900 throughout.
901 * cygwin.din: Export new symbols getpwuid32, getpwuid_r32, getuid32,
902 geteuid32, setuid32, seteuid32.
903 * passwd.cc (getpwuid32): New function.
904 (getpwuid_r32): Ditto.
905 * syscalls.cc (seteuid32): Ditto.
906 (setuid32): Ditto.
907 * uinfo.cc (getuid32): Ditto.
908 (geteuid32): Ditto.
d4000bc4 909 * winsup.h (uid16touid32): New macro, correct casting from __uid16_t
a8d7ae61
CV
910 to __uid32_t.
911 (gid16togid32): Ditto fir gids.
912 (getuid32): Declare.
913 (geteuid32): Ditto.
914 (getpwuid32): Ditto.
915 * include/sys/cygwin.h (struct external_pinfo): Add members uid32 and
916 gid32.
917
9854c44c
CV
9182002-05-29 Corinna Vinschen <corinna@vinschen.de>
919
920 * include/cygwin/socket.h: Protect some symbols against multiple
921 definition.
922 * include/netinet/ip.h: Ditto.
923 * include/netinet/tcp.h: Ditto.
924
9252002-05-29 Wu Yongwei <adah@netstd.com>
926
927 * include/netinet/ip.h: Replace by BSD derived version of the file.
928 * include/netinet/tcp.h: Ditto.
929 * include/netinet/udp.h: New file.
930 * include/cygwin/ip.h: Remove.
931
cef69559
CF
9322002-05-29 Christopher Faylor <cgf@redhat.com>
933
934 * dtable.cc (dtable::init_std_file_from_handle): Attempt stronger
935 detection of invalid handle.
936 (handle_to_fn): Detect pathological condition where NT resets the
937 buffer pointer to NULL on an invalid handle.
938
a761ad82
CF
9392002-05-28 Christopher Faylor <cgf@redhat.com>
940
941 * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Properly
942 check for whether we should be opening the file to search for #!
654783b6
CF
943 characters. Set path_conv structure execability, too, when
944 appropriate.
a761ad82 945
7ea70e99
CV
9462002-05-28 Corinna Vinschen <corinna@vinschen.de>
947
948 * security.cc (set_security_attribute): Call getegid32() instead of
949 getegid().
950 * include/cygwin/grp.h: Declare getegid32().
951
57196405
CV
9522002-05-28 Corinna Vinschen <corinna@vinschen.de>
953
954 Change internal gid datatype from __gid16_t to __gid32_t
955 throughout.
956 * cygwin.din: Export new symbols chown32, fchown32, getegid32,
957 getgid32, getgrgid32, getgrnam32, getgroups32, initgroups32, lchown32,
958 setgid32, setegid32, getgrent32.
959 * grp.cc (grp32togrp16): New static function.
960 (getgrgid32): New function.
961 (getgrnam32): Ditto.
962 (getgrent32): Ditto.
963 (getgroups32): Change name of internal function from getgroups.
964 (getgroups32): New function.
965 (initgroups32): Ditto.
966 * syscalls.cc (chown32): Ditto.
967 (lchown32): Ditto.
968 (fchown32): Ditto.
969 (setegid32): Ditto.
970 (setgid32): Ditto.
971 * uinfo.cc (getgid32): Ditto.
972 (getegid32): Ditto.
973 * include/cygwin/grp.h: Remove declaration of getgrgid() and getgrnam().
974 Declare getgrgid32() and getgrnam32() instead. Declare getgid32().
975
0c12979b
CF
9762002-05-27 Christopher Faylor <cgf@redhat.com>
977
978 * autoload.cc (noload): Properly mask low order word for determining
979 number of bytes to pop.
980
57e2ae68
CF
9812002-05-27 Christopher Faylor <cgf@redhat.com>
982
983 * fhandler_disk_file.cc (fhandler_disk_file::fstat): Minor logic
984 cleanup.
985
2402700d
CF
9862002-05-27 Christopher Faylor <cgf@redhat.com>
987
988 * autoload.cc (LoadFuncEx): Define via new LoadFuncEx2 macro.
989 (LoadFuncEx2): Adapted from LoadFuncEx. Provides control of return
990 value for nonexistent function.
991 (NtQueryObject): Declare.
992 (IsDebuggerPresent): Declare via LoadFuncEx2 and always return true if
993 not available.
994 * debug.h (being_debugged): Just rely on IsDebuggerPresent return
995 value.
996 * dtable.cc (handle_to_fn): New function.
997 (dtable::init_std_file_from_handle): Attempt to derive std handle's
998 name via handle_to_fn.
999 (dtable::build_fhandler_from_name): Fill in what we can in path_conv
1000 structure when given a handle and path doesn't exist.
1001 * fhandler.cc (fhandler_base::open): Don't set the file pointer here.
1002 Use pc->exists () to determine if file exists rather than calling
1003 GetFileAttributes again.
1004 * fhandler.h (fhandler_base::exec_state_isknown): New method.
1005 (fhandler_base::fstat_helper): Add extra arguments to declaration.
1006 (fhandler_base::fstat_by_handle): Declare new method.
1007 (fhandler_base::fstat_by_name): Declare new method.
1008 * fhandler_disk_file (num_entries): Make __stdcall.
1009 (fhandler_base::fstat_by_handle): Define new method.
1010 (fhandler_base::fstat_by_name): Define new method.
1011 (fhandler_base:fstat): Call fstat_by_{handle,name} as appropriate.
1012 (fhandler_disk_file::fstat_helper): Accept extra arguments for filling
1013 out stat structure. Move handle or name specific stuff to new methods
1014 above.
1015 (fhandler_disk_file::open): Use real_path->exists rather than calling
1016 GetFileAttributes again.
1017 * ntdll.h (FILE_NAME_INFORMATION): Define new structure.
1018 (OBJECT_INFORMATION_CLASS): Partially define new enum.
1019 (OBJECT_NAME_INFORMATION): Define new structure.
1020 (NtQueryInformationFile): New declaration.
1021 (NtQueryObject): New declaration.
1022 * path.cc (path_conv::fillin): Define new method.
1023 * path.h (path_conv::fillin): Declare new method.
1024 (path_conv::drive_thpe): Rename from 'get_drive_type'.
1025 (path_conv::volser): Declare new method.
1026 (path_conv::volname): Declare new method.
1027 (path_conv::root_dir): Declare new method.
1028 * syscalls.cc (fstat64): Send real path_conv to fstat as second
1029 argument.
1030
74b2f73e
CV
10312002-05-24 Pierre Humblet <pierre.humblet@ieee.org>
1032
1033 * security.cc (lsa2str): New function.
1034 (get_priv_list): Call lsa2str instead of sys_wcstombs.
1035
75bf2931
CV
10362002-05-22 Pierre Humblet <pierre.humblet@ieee.org>
1037
1038 * syscalls.cc (seteuid): Do not take allow_ntsec into account.
1039 Attempt to use an existing or new token even when the uid
1040 matches orig_uid, but the gid is not in the process token.
1041 Major reorganization after several incremental changes.
1042 (setegid): Do not take allow_ntsec into account. Minor
1043 reorganization after several incremental changes.
1044
918a268c
CF
10452002-05-26 Christopher Faylor <cgf@redhat.com>
1046
1047 * debug.h (being_debugged): New macro.
1048 * dtable.cc (dtable::extend): Use new macro.
1049 * exceptions.cc (try_to_debug): Ditto.
1050 * strace.cc (strace::hello): Only output debugging info when we think
1051 we're being debugged.
1052
0cfbfc24
CF
10532002-05-25 Robert Collins <rbtcollins@hotmail.com>
1054
1055 * winsup.h: Remove duplicate declarations of malloc_lock and
1056 malloc_unlock.
1057
d7b4a300
CF
10582002-05-24 Christopher Faylor <cgf@redhat.com>
1059
1060 Remove unneeded sync.h, where appropriate, throughout.
1061 Remove unneeded heap.h, where appropriate, throughout.
1062 Remove unneeded exceptions.h, where appropriate, throughout.
1063 Remove unneeded perprocess.h, where appropriate, throughout.
1064
908f9b65
CV
10652002-05-22 Pierre Humblet <pierre.humblet@ieee.org>
1066
1067 * security.cc (create_token): Call __sec_user() instead of
1068 sec_user() to remove dependence on allow_ntsec. Verify that
1069 the returned sd is non-null.
1070
a6247be9
RC
10712002-05-25 Robert Collins <rbtcollins@hotmail.com>
1072
1073 * gmon.c (fake_sbrk): Correctly return -1 on failed malloc's.
1074
ff938546
CF
10752002-05-24 Christopher Faylor <cgf@redhat.com>
1076
1077 * dtable.cc (dtable::build_fhandler_from_name): Just pass posix path
1078 along to set_name via return_and_clear_normalized_path.
1079 (dtable::build_fhandler): New method with const char * argument.
1080 (dtable::reset_unix_path_name): Eliminate.
1081 (dtable::dup_worker): Use correct build_fhandler method.
1082 * mmap.cc (mmap_record::alloc_fh): Ditto.
1083 * dtable.h (dtable::build_fhandler): New method.
1084 (dtable::reset_unix_path_name): Eliminate.
1085 * fhandler.cc (fhandler_base::set_name): Assume that unix_name has
1086 already been cmalloced.
1087 (fhandler_base::reset_unix_path_name): Eliminate.
1088 (fhandler_base::~fhandler_base): Coercion for cfree.
1089 * fhandler.h (fhandler_base::unix_path_name): Make const char *.
1090 (fhandler_base::win32_path_name): Ditto.
1091 (fhandler_base::reset_unix_path_name): Eliminate.
1092 * fhandler_disk_file.cc (fhandler_cygdrive::set_drives): Accommodate
1093 const char *ness of win32_path_name.
1094 * fhandler_socket.cc (fhandler_socket::fstat): Accommodate new set_name
1095 requirements.
1096 * path.cc (path_conv::return_and_clear_normalized_path): New method.
1097 (path_conv::clear_normalized_path): Eliminate.
1098 (path_conv::~path_conv): Ditto.
1099 (path_conv::check): Accommodate new build_fhandler method.
1100 * path.h (path_conv::~path_conv): Eliminate.
1101 (path_conv::clear_normalized_path): Ditto.
1102 (path_conv::return_and_clear_normalized_path): Declare new method.
1103
b4bb31ad
CF
11042002-05-23 Christopher Faylor <cgf@redhat.com>
1105
1106 * path.cc (path_conv::check): Make sure any trailing path component is
1107 part of potential normalized posix path.
1108
b2f338e9
CF
11092002-05-23 Christopher Faylor <cgf@redhat.com>
1110
1111 * smallprint.c (__small_vsprintf): Implement '%o' after all these
1112 years.
1113
fc240f58
CF
11142002-05-22 Christopher Faylor <cgf@redhat.com>
1115
1116 * fhandler.h (fhandler_virtual::exists): Eliminate path argument.
1117 (fhandler_proc::exists): Ditto.
1118 (fhandler_registry::exists): Ditto.
1119 (fhandler_process::exists): Ditto.
1120 * fhandler_proc.cc (fhandler_proc::exists): Ditto. Use built-in name.
1121 * fhandler_process.cc (fhandler_process::exists): Ditto.
1122 (fstat): Ditto.
1123 * fhandler_registry.cc (fhandler_registry::exists): Ditto.
1124 (fhandler_registry::fstat): Ditto.
1125 * fhandler_virtual.cc (fhandler_virtual::opendir): Ditto.
1126 * path.cc (path_conv::check): Ditto. Add debugging.
1127
11282002-05-22 Christopher Faylor <cgf@redhat.com>
1129
1130 * syscalls.cc (dup): Always call dup2 for error handling.
1131
1d2b71d6
CV
11322002-05-22 Corinna Vinschen <corinna@vinschen.de>
1133
1134 * include/cygwin/types.h: Revert previous patch.
1135
36f86a55
CV
11362002-05-22 Corinna Vinschen <corinna@vinschen.de>
1137
1138 * include/cygwin/types.h: Define pthread stuff only if _POSIX_THREADS
1139 is defined.
1140
2d6ce5c2
CV
11412002-05-19 Pierre Humblet <pierre.humblet@ieee.org>
1142
fc240f58 1143 * security.cc (open_local_policy): Initialize lsa to
2d6ce5c2
CV
1144 INVALID_HANDLE_VALUE instead of NULL.
1145 (get_logon_server_and_user_domain): Test for INVALID_HANDLE_VALUE
1146 instead of NULL.
1147 (create_token): Both of the above.
1148
9ded8bd8
CF
11492002-05-18 Christopher Faylor <cgf@redhat.com>
1150
1151 * fhandler_disk_file.cc (fhandler_disk_file::fstat): Make handling of
1152 nlink consistent for remote files.
1153
2701126a
CF
11542002-05-18 Christopher Faylor <cgf@redhat.com>
1155
1156 * path.cc (path_conv::check): Always set executable bit for executable
1157 extension.
1158
b05b7d84
CF
11592002-05-17 Christopher Faylor <cgf@redhat.com>
1160
1161 * fhandler.cc (fhandler_base::lseek): Avoid calling SetFilePointer with
1162 high order part of 64 bit address on OS's which do not support that
1163 kind of operation. Otherwise Windows 95 will become confused.
1164
d6dc9825
CV
11652002-05-16 Pierre Humblet <pierre.humblet@ieee.org>
1166
1167 * fhandler_raw.cc (fhandler_dev_raw::open): Replace set_errno()
1168 by __seterrno_from_win_error().
1169 * security.cc (open_local_policy): Ditto.
1170 (get_lsa_srv_inf): Ditto.
1171 (get_user_groups): Ditto.
1172 (get_user_primary_group): Ditto.
1173 (create_token): Ditto.
1174 (subauth): Ditto.
1175
35a89cbe
CV
11762002-05-17 Corinna Vinschen <corinna@vinschen.de>
1177
1178 * times.cc (utimes): Use FILE_WRITE_ATTRIBUTES even on 9x/Me when
1179 opening file for writing timestamp.
1180 * wincap.cc: Remove flag has_specific_access_rights.
1181 * wincap.h: Ditto.
1182
ebbdc703
CV
11832002-05-13 Pierre Humblet <pierre.humblet@ieee.org>
1184
1185 * syscalls.cc (seteuid): Set default dacl in process token.
1186 Replace in-line code by call to verify_token().
1187 (setegid): Reverse change from 2002-01-21. Add call to
1188 RevertToSelf and set primary group in impersonation token.
1189 * security.cc (create_token): Store pgrpsid in token security
1190 descriptor, except if it already appears in my_grps.
1191 Use sec_acl() in place of get_dacl().
1192 (verify_token): Create from code in seteuid(), with tighter checks.
c2102631 1193 (get_dacl): Deleted.
ebbdc703
CV
1194 (get_group_sidlist): Add argument to indicate if pgrpsid is already
1195 in the groups.
1196 * security.h: Define verify_token().
1197 * autoload.cc: Load GetKernelObjectSecurity().
1198
feb7f1a9
CF
11992002-05-13 Mark Bradshaw <bradshaw@staff.crosswalk.com>
1200
1201 * cygwin.din: Add strlcat and strlcpy.
1202 * include/cygwin/version.h: Increment API minor version number.
1203
fc240f58 12042002-05-09 Pierre Humblet <pierre.humblet@ieee.org>
043bc3e1
CV
1205
1206 * shared.cc (__sec_user): Split into sec_acl() and call orig_sid().
1207 (sec_acl): Create from part of __sec_user(), except creator/owner.
1208 * security.h: Define sec_acl() and MAX_DACL_LEN.
1209
c8b20196
CF
12102002-05-12 Christopher Faylor <cgf@redhat.com>
1211
1212 * fhandler_disk_file.cc (fhandler_disk_file::open): Avoid using
1213 O_DIROPEN when OS doesn't support it. Return proper errno in that
1214 case.
1215
b4f8d31f
CF
12162002-05-12 Christopher Faylor <cgf@redhat.com>
1217
56caca1d
CF
1218 * syscalls.cc (_read): Change error to EBADF if attempt to read from a
1219 non-readable fd.
b4f8d31f 1220
29ee580d
CF
12212002-05-11 Christopher Faylor <cgf@redhat.com>
1222
1223 * fhandler.h (executable_states): For now, make dont_care_if_executable
1224 equivalent to not_executable.
1225 * sys/mount.h: Define MOUNT_NOTEXEC.
1226 * path.h (fs_info): New class.
1227 (path_conv): Move fs-specific fields to new 'fs' structure.
1228 (path_conv::update_fs_info): Move to fs_info and rename to just 'update'.
1229 * path.cc (fs_info::update): Ditto. Return 'true' if successful.
1230 (fillout_mntent): Add ',noexec' to list of reported options.
1231
b84621d2
CF
12322002-05-11 Christopher Faylor <cgf@redhat.com>
1233
1234 * fhandler_virtual.cc (fhandler_virtual::close): Quiet a compiler
1235 warning.
1236
9ba913a5
CF
12372002-05-10 Christopher January <chris@atomice.net>
1238
1239 * autoload.cc: Add dynamic load statements for
1240 'ZwQueryInformationProcess' and 'ZwQueryVirtualMemory'.
1241 * fhandler.h: Change type of bufalloc and filesize members of
1242 fhandler_virtual from int to size_t. Change type of position member
1243 from __off32_t to __off64_t. Add new fileid member to fhandler_virtual
1244 class. Make seekdir take an __off64_t argument. Make lseek take an
1245 __off64_t argument. Add fill_filebuf method to fhandler_virtual. Add
1246 fill_filebuf method to fhandler_proc. Add fill_filebuf method to
1247 fhandler_registry. Add fill_filebuf method to fhandler_process. Add
1248 saved_pid and saved_p members to fhandler_process.
1249 * fhandler_proc.cc (proc_listing_array): Add 'loadavg', 'meminfo', and 'stat'.
1250 (proc_fhandlers array): Ditto.
1251 (fhandler_proc::open): Use fill_filebuf to flesh out the file contents.
1252 (fhandler_proc::fill_filebuf): New method.
1253 (fhandler_proc::format_proc_meminfo): Ditto.
1254 (fhandler_proc::format_proc_stat): Ditto.
1255 (fhandler_proc::format_proc_uptime): Ditto.
1256 * fhandler_process.cc (process_listing): Add 'stat' and 'statm'.
1257 (fhandler_process::fstat): Find the _pinfo structure for the process
1258 named in the filename. Return ENOENT if the process is no longer
1259 around. Set the gid and uid fields of the stat structure.
1260 (fhandler_process::open): Store pid and pointer to _pinfo structure in
1261 saved_pid and saved_p respectively. Use fill_filebuf to flesh out file
1262 contents.
1263 (fhandler_proc::fill_filebuf): New method.
1264 (format_process_stat): New function.
1265 (format_process_status): Ditto.
1266 (format_process_statm): Ditto.
1267 (get_process_state): Ditto.
1268 (get_mem_values): Ditto.
1269 * fhandler_registry.cc (fhandler_registry::seekdir): Change argument
1270 type from __off32_t to __off64_t.
1271 (fhandler_registry::fill_filebuf): New method.
1272 * fhandler_virtual.cc (fhandler_virtual::seekdir): Change argument type
1273 from __off32_t to __off64_t.
1274 (fhandler_virtual::lseek): Ditto.
1275 (fhandler_virtual::fill_filebuf): New method.
1276 (fhandler_virtual::fhandler_virtual): Initialise fileid to -1.
1277 * wincap.cc: Set flag has_process_io_counters appropriately.
1278 * wincap.h: Add flag has_process_io_counters.
1279
12802002-05-09 Christopher Faylor <cgf@redhat.com>
f561f644
CF
1281
1282 * syscalls.cc (_write): Change error to EBADF if attempt to write to a
56caca1d 1283 non-writeable fd.
f561f644 1284
6327de5f
CV
12852002-05-08 Corinna Vinschen <corinna@vinschen.de>
1286
1287 * cygheap.h (class cygheap_user): Add member `orig_psid'.
1288 Add method `orig_sid()'.
1289 * cygheap.cc (cygheap_user::set_sid): Maintain orig_psid.
1290
795b46cf
CV
12912002-04-28 Norbert Schulze <norbert.schulze@web.de>
1292
1293 * localtime.cc (tzsetwall): Use wildabbr if generated timezone name
1294 length < 3.
1295
a9917779
CV
12962002-05-05 Pierre Humblet <pierre.humblet@ieee.org>
1297
1298 * spawn.cc (spawn_guts): Move call to set_process_privilege()
1299 to load_registry_hive().
1300 * registry.cc (load_registry_hive): ditto.
1301 * fork.cc (fork_parent): Call sec_user_nih() only once.
1302
13032002-05-04 Christopher January <chris@atomice.net>
13ee3618
CF
1304
1305 * path.h (path_conv::path_conv): Initialise normalized_path to NULL.
1306
8761c1dc
CF
13072002-05-03 Christopher Faylor <cgf@redhat.com>
1308
1309 * net.cc (getdomainname): Change second argument of getdomainname to
1310 size_t.
1311
13122002-05-03 Christopher January <chris@atomice.net>
1313
1314 * fhandler_proc.cc (proc_listing): Add '.' and '..' to directory
1315 listing.
1316 (fhandler_proc::open): Change use of mode to flags. If the file does
1317 not exist already, fail with EROFS if O_CREAT flag is set. Change
1318 EROFS error to EACCES error when writing to a file. Use cmalloc to
1319 allocate memory for filebuf.
1320 (fhandler_proc::close): Use cfree to free filebuf.
1321 (fhandler_proc::get_proc_fhandler): Properly detect attempts to access
1322 unknown subdir.
1323 * fhandler_process.cc (process_listing): Add '.' and '..' to directory
1324 listing.
1325 (fhandler_process::open): Use cmalloc to allocate memory for filebuf.
1326 (fhandler_process::close): Use cfree to free filebuf.
1327 * fhandler_registry.cc (registry_listing): Add . and '..' to directory
1328 listing.
1329 (fhandler_registry::open): Move check for open for writing before
1330 open_key. Use cmalloc to allocate memory for filebuf.
1331 (fhandler_registry::close): Use cfree to free filebuf.
1332 (fhandler_registry::telldir): Use lower 16 bits of __d_position as
1333 position in directory.
1334 (fhandler_registry::seekdir): Ditto.
1335 * fhandler_virtual.cc (fhandler_virtual::write): Change EROFS error to
1336 EACCES error.
1337 (fhandler_virtual::open): Set the NOHANDLE flag.
1338 (fhandler_virtual::dup): Add call to fhandler_base::dup. Allocate
1339 child's filebuf using cmalloc. Copy filebuf from parent to child.
1340 (fhandler_virtual::close): Use cfree to free filebuf.
1341 (fhandler_virtual::~fhandler_virtual): Ditto.
1342 (from Chris Faylor <cgf@redhat.com>).
1343 (fhandler_registry::readdir): Add support for '.' and '..' files in
1344 subdirectories of /proc/registry.
1345 * path.cc (path_conv::check): Do not return ENOENT if a file is not
1346 found in /proc.
1347
335c87f9
CF
13482002-05-02 Christopher Faylor <cgf@redhat.com>
1349
1350 * fhandler_proc.cc (fhandler_proc::fstat): Use fhandler name rather
1351 than path_conv name.
1352 (fhandler_proc::open): Ditto.
1353 * fhandler_process.cc (fhandler_process::fstat): Use fhandler name
1354 rather than path_conv name.
1355 (fhandler_process::open): Ditto.
1356 * fhandler_registry.cc (fhandler_registry::fstat): Use fhandler name
1357 rather than path_conv name.
1358 (fhandler_registry::open): Ditto.
1359 * path.cc (path_conv::check): Don't copy posix path when virtual.
1360 (mount_info::conv_to_win32_path): Don't zero string when isproc. Just
1361 derive normal windows path.
1362
1363 * path.h (path_conv::clear_normalized_path): Declare new method.
1364 * path.cc (path_conv::clear_normalized_path): Define new method.
1365 * dtable.cc (build_fhandler_from_name): Clear normalized path when
1366 finished to conserve space.
1367
3bb7eb44
CF
13682002-05-02 Christopher Faylor <cgf@redhat.com>
1369
1370 * fhandler_proc.cc (fhandler_proc::fstat): Prime with information from
1371 fhandler_base::fstat. Use defines rather than constants for permission
1372 settings.
1373
d055ecb0
CV
13742002-04-30 Eric Blake <ebb9@email.byu.edu>
1375
1376 * path.cc (hash_path_name): Improve hash function strength.
1377
37143995
RC
13782002-05-02 Robert Collins <rbtcollins@hotmail.com>
1379
1380 * thread.cc (__pthread_cond_dowait): Fix a race on signalling from a
1381 thread woken by the same condition variable it's signalling on. Thanks
1382 to Michael Beach for the report and test case.
1383
291be307
CF
13842002-05-02 Christopher Faylor <cgf@redhat.com>
1385
1386 * path.h (pathconv_arg): Add PC_POSIX.
1387 (path_conv): Add normalized_path field.
1388 * path.cc (path_conv::~path_conv): New destructor.
1389 (path_conv::check): Set normalized_path, where appropriate.
1390 * dtable.cc (build_fhandler_from_name): Use normalized path from
1391 path_conv.
1392 * syscalls.cc (chroot): Ditto.
1393
1394 * cygheap.h: Remove path_prefix_p declaration.
1395
13962002-02-26 Christopher January <chris@atomice.net>
1397 Christopher Faylor <cgf@redhat.com> (minor fixups)
1398
1399 * Makefile.in: Add fhandler_proc.o, fhandler_registry.o,
1400 fhandler_process.o and fhandler_virtual.o.
1401 * dtable.cc (dtable::build_fhandler): Add entries for FH_PROC,
1402 FH_REGISTRY and FH_PROCESS. Set unix_name to the normalized posix
1403 path.
1404 * fhandler.h: Add constants for FH_PROC, FH_REGISTRY and FH_PROCESS.
1405 Add class declarations for fhandler_virtual, fhandler_proc,
1406 fhandler_registry and fhandler_virtual. Update fhandler_union
1407 accordingly.
1408 * fhandler_proc.cc: New file. Add implementation for fhandler_proc.
1409 * fhandler_virtual.cc: New file. Add implementation for
1410 fhandler_virtual.
1411 * fhandler_process.cc: New file. Add implementation for
1412 fhandler_process.
1413 * fhandler_registry.cc: New file. Add implementation for
1414 fhandler_registry.
8761c1dc
CF
1415 * path.cc (isproc): New macro.
1416 (isvirtual_dev): Ditto.
291be307
CF
1417 * path.cc (path_conv::check): Add check for virtual devices.
1418 * path.cc (mount_info::conv_to_win32_path): Convert paths in /proc to
1419 empty Win32 paths.
1420 * path.cc (chdir): Replace check for FH_CYGDRIVE with more generic
1421 isvirtual_dev macro. Force setting of posix path for virtual
1422 fhandlers.
8761c1dc 1423 * path.h (path_prefix_p): Declare.
291be307
CF
1424
1425
fee93846
CF
1426Wed May 1 16:06:02 2002 Jason Tishler <jason@tishler.net>
1427
1428 * include/cygwin/types.h: Include <sys/sysmacros.h>.
1429
9b15f5fa
CV
1430Wed Apr 17 11:27:04 2002 Jason Tishler <jason@tishler.net>
1431
1432 * security.cc (get_lsa_srv_inf): Prevent extraneous backslashes for
1433 the NT Domain case.
1434
4deace13
CV
14352002-04-12 Corinna Vinschen <corinna@vinschen.de>
1436
1437 * net.cc (cygwin_accept): Set socket type for accepted socket.
1438 (socketpair): Set socket type for both sockets.
1439
14402002-04-12 Egor Duda <deo@logos-m.ru>
1441
291be307 1442 * fhandler.h (class fhandler_socket): New member to store socket type.
4deace13
CV
1443 (fhandler_socket::get_socket_type): Access it.
1444 (fhandler_socket::set_socket_type): Ditto.
1445 * net.cc (cygwin_socket): Store socket type.
1446 (cygwin_connect): Disable security checks for connectionless sockets.
1447 (cygwin_accept): Ditto.
1448
dbe67a81
CF
14492002-04-09 Mark Bradshaw <bradshaw@staff.crosswalk.com>
1450
1451 * cygwin.din: Add strptime.
1452 * include/cygwin/version.h: Increment API version number.
1453
464b3e80
CV
14542002-04-09 Corinna Vinschen <corinna@vinschen.de>
1455
1456 * fork.cc (fork_child): Call fixup_mmaps_after_fork() somewhat earlier.
1457
d78bda7b
CV
14582002-04-09 Corinna Vinschen <corinna@vinschen.de>
1459
1460 * fhandler.cc (fhandler_base::open): Set read-only bit in
1461 file_attributes when adequate.
1462
8996623b
CF
14632002-03-28 Christopher Faylor <cgf@redhat.com>
1464
1465 * times.cc (gettimeofday): Fix typo in previous patch.
1466
7d7524e5
CF
14672002-03-27 Wu Yongwei <adah@netstd.com>
1468
1469 * times.cc (gettimeofday): Revert to setting timezone info if tz !=
1470 NULL.
1471
2f3126f6
CF
14722002-03-21 Christopher Faylor <cgf@redhat.com>
1473
1474 * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Always set
1475 st_[ug]id to value derived from get_file_attributes.
1476
45d2ea8a
CF
14772002-03-21 Christopher Faylor <cgf@redhat.com>
1478
1479 * spawn.cc (find_exec): Return input if file not found.
1480
99dbafac
CV
14812002-03-19 Boris Schaeling <boriss@web.de>
1482
291be307 1483 * poll.cc (poll): Add support for invalid descriptors.
99dbafac 1484
b0359971
RC
14852002-03-15 Robert Collins <rbtcollins@hotmail.com>
1486
1487 * fhandler.h (fhandler_termios::lseek): Override lseek.
1488 * fhandler_termios.cc (fhandler_termios::lseek): Implement this.
1489
59a2339f
CF
14902002-03-15 Christopher Faylor <cgf@redhat.com>
1491
1492 * cygserver.cc: Include stdlib.h for exit declaration.
1493 * threaded_queue.cc: Ditto.
1494
ca175377
CF
14952002-03-15 Christopher Faylor <cgf@redhat.com>
1496
1497 * pinfo.cc (pinfo::init): Use PID_ALLPIDS flag to control when a
1498 redirected block should be marked as nonexistent.
1499 (winpids::add): Use PID_ALLPIDS when looking for all pids.
1500 * cygwin.h (PID_ALLPIDS): New enum element.
1501
d78bda7b 15022002-03-15 Corinna Vinschen <corinna@vinschen.de>
2f263187 1503
291be307 1504 * glob.c (stat32_to_STAT): New function.
2f263187
CV
1505 (g_lstat): Call user space functions always with 32 bit struct stat
1506 as a workaround.
1507 (g_stat): Ditto.
1508 * include/glob.h (struct glob): Don't prototype function pointers
1509 when compiling Cygwin.
1510
4af6d4a9
CF
15112002-03-14 Christopher Faylor <cgf@redhat.com>
1512
1513 * pinfo.cc (pinfo::init): Properly handle execed process stub when
1514 PID_NOREDIR is specified.
1515
6ea9c716
CV
15162002-03-13 Boris Schaeling <boriss@web.de>
1517
e10c087b
CF
1518 * poll.cc (poll): Remove variable open_fds. Rearrange and add code to
1519 fix settings of revents.
6ea9c716 1520
d78bda7b 15212002-03-13 Corinna Vinschen <corinna@vinschen.de>
bbe09139
CV
1522
1523 * mmap.cc (mmap_record::map_map): Return -1 if VirtualProtect fails.
1524 (list::erase): New method with no argument. Erase latest record
1525 added.
1526 (mmap64): Fail if map_map() fails.
1527
d78bda7b 15282002-03-12 Corinna Vinschen <corinna@vinschen.de>
cb4589f4
CV
1529
1530 * sysconf.cc (sysconf): Fix condition.
1531
d78bda7b 15322002-03-11 Corinna Vinschen <corinna@vinschen.de>
2817e0dc
CV
1533
1534 * mmap.cc (msync): Check area given by addr and len for being a
1535 contigeous mmap'd region.
1536
d78bda7b 15372002-03-11 Corinna Vinschen <corinna@vinschen.de>
713fb38b
CV
1538
1539 * fork.cc (fork_child): Call fixup_mmaps_after_fork() before
1540 closing parent process handle. Call fixup_mmaps_after_fork()
1541 with parent process handle as parameter.
1542 * mmap.cc (mmap_record::access): New method.
1543 (fixup_mmaps_after_fork): Take process handle as parameter.
1544 In case of FILE_MAP_COPY access, copy valid memory regions to child.
1545 * pinfo.h (fixup_mmaps_after_fork): Change prototype accordingly.
1546
d78bda7b 15472002-03-07 Corinna Vinschen <corinna@vinschen.de>
c8c3824d
CV
1548
1549 * autoload.cc (NetGetDCName): Add symbol.
1550 (NetServerEnum): Remove symbol.
1551 * security.cc (get_lsa_srv_inf): Call NetGetDCName() instead of
1552 NetServerEnum() since it's faster. Don't call it at all if machine
1553 is not a domain member.
1554
9420d2b8
CF
15552002-03-06 Christopher Faylor <cgf@redhat.com>
1556
1557 * path.cc (normalize_posix_path): Avoid runs of '.'s > 2.
1558
07a21bce
CF
15592002-03-05 Christopher Faylor <cgf@redhat.com>
1560
1561 * errno.cc: Change EPERM associated text to "Operation not permitted"
1562 throughout.
1563
eeac69d8
CF
15642002-03-05 Christopher Faylor <cgf@redhat.com>
1565
1566 * fhandler_socket.cc (fhandler_socket::close): Respond to signals while
1567 looping, waiting for socket to close. Superstitiously clear last error
1568 when WSAEWOULDBLOCK.
1569
241a7c5a
RC
15702002-03-05 Robert Collins <rbtcollins@hotmail.com>
1571
291be307 1572 * cygserver_transport_pipes.cc (transport_layer_pipes::transport_layer_pipes):
241a7c5a
RC
1573 Always init - until static members work correctly.
1574 * shm.cc (shmget): Initialize the security descriptor - thanks Corinna!
291be307 1575 * include/sys/ipc.h: Make the ipc control constants partitioned off from the sem
241a7c5a
RC
1576 control constants.
1577
ad2864f4
CV
15782002-03-04 Christian Lestrade <christian.lestrade@free.fr>
1579
1580 * include/sys/termios.h: Define _POSIX_VDISABLE. Define CCEQ macro.
1581 * fhandler_termios.cc: Include <sys/termios.h>.
1582 (line_edit): Recognize disabled c_cc[] chars. Ignore VDISCARD when
1583 not in ICANON mode.
1584
59149930
CV
15852002-03-04 Dmitry Timoshkov <dmitry@baikal.ru>
1586
1587 * syscalls.cc (truncate64): Use ftruncate64 directly to not lose
1588 upper 32 bits.
1589
7c3617cc
RC
15902002-03-04 Robert Collins <rbtcollins@hotmail.com>
1591
1592 * cygserver_shm.cc (delete_shmnode): New function.
1593 (client_request_shm::serve): Use it.
1594
038c71f1
RC
15952002-03-04 Robert Collins <rbtcollins@hotmail.com>
1596
1597 * cygserver_shm.cc (client_request_shm::serve): Implement SHM_DETACH.
1598 * shm.cc (shmdt): Implement.
1599
67be0adb
RC
16002002-03-04 Robert Collins <rbtcollins@hotmail.com>
1601
1602 * cygserver_shm.cc: Run indent.
1603 (deleted_head): New global for storing shm id's pending deletion.
1604 (client_request_shm::serve): Return ENOSYS for invalid request types.
1605 Implement SHM_DEL - delete a shm id.
1606 * cygserver_shm.h (SHM_DEL): New type value.
1607 * shm.cc (delete_inprocess_shmds): New function, does what it's name implies.
1608 (shmctl): Implement shm_rmid control type.
1609
74c3173a
RC
16102002-03-04 Robert Collins <rbtcollins@hotmail.com>
1611
1612 * Makefile.in (install): Remove install-bin to allow make install to work.
1613
009314a4
RC
16142002-03-03 Robert Collins <rbtcollins@hotmail.com>
1615
1616 * shm.cc (shmat): Prevent a compile error.
1617 (shmdt): Set errno as this function is incomplete.
1618
e7729287
CF
16192002-02-28 Christopher Faylor <cgf@redhat.com>
1620
1621 * times.cc: Remove if 0'd code. Clean up slightly.
1622
f449bfef
RC
16232002-02-28 Robert Collins <rbtcollins@hotmail.com>
1624
1625 * Merged cygwin_daemon into head minus the new shm and ipc exports.
1626
16272002-02-28 Robert Collins <rbtcollins@hotmail.com>
1628
1629 * fhandler_tty.cc (fhandler_tty_slave::open): More debugging.
1630 (fhandler_tty_slave::read): Fix printf type for the handle.
1631 * tty.cc (tty::common_init): Add a FIXME for security.
1632
16332002-01-29 Robert Collins <rbtcollins@hotmail.com>
1634
1635 * Makefile.in (OBJS): Remove duplicate localtime.o.
1636
16372002-01-17 Robert Collins <rbtcollins@hotmail.com>
1638
291be307 1639 * cygserver.cc (check_and_dup_handle): Consolidate the two variants for
f449bfef
RC
1640 simplicity.
1641 Add Some basic debug output.
1642 (client_request_attach_tty::serve): Use the new debug_printf for clarity.
1643 Mark the duplicated handles as inheritable - fixup_after_fork() doesn't reopen
1644 tty's.
1645
16462002-01-16 Robert Collins <rbtcollins@hotmail.com>
1647
1648 * cygserver.cc (transport): Correct scope.
1649 (client_request_attach_tty::serve): Add more debug information.
1650 Fix erroneous use of transport instead of conn.
1651 * cygserver_transport_pipes.cc (transport_layer_pipes::close): More debug.
1652 (transport_layer_pipes::read): Ditto.
1653 (transport_layer_pipes::write): Ditto.
1654 (transport_layer_pipes::impersonate_client): Ditto.
1655
1656Mon Oct 8 7:41:00 2001 Robert Collins <rbtcollins@hotmail.com>
1657
1658 * cygserver.cc (server_request::process): Rename client_request_shm_get to
1659 client_request_shm.
1660 * cygserver_process.cc (process_cache::add): Rename to add_task.
1661 Use process_cleanup instead of process_request.
1662 (process_cache::remove_process): New method.
1663 (process::process): Initialize new members.
1664 (process::~process): New member.
1665 (process::cleanup): New method.
1666 (process::add_cleanup_routine): New method.
1667 (process_request::process): Rename to process_cleanup.
1668 Call the process object's cleanup method and then delete it.
1669 (process_process_param::request_loop): Remove the signalling process.
1670 * cygserver_shm.cc: Globally rename client_request_shm_get to client_request_shm.
1671 (client_request_shm_get::serve): Handle attach request counting.
1672 * cygserver_shm.h: Globally rename client_request_shm_get to client_request_shm.
1673 (class shm_cleanup): New class.
1674 * shm.cc: Globally rename client_request_shm_get to client_request_shm.
1675 (client_request_shm::client_request_shm): New constructor for attach requests.
1676 (shmat): Use it.
291be307 1677 * include/cygwin/cygserver_process.h (class process_request): Rename to
f449bfef
RC
1678 process_cleanup.
1679 (class cleanup_routine): New class.
1680 (class process): New members and methods to allow calling back when the process
1681 terminates.
1682
1683Thu Oct 4 14:12:00 2001 Robert Collins <rbtcollins@hotmail.com>
1684 * cygserver.cc (request_loop): Make static.
1685 (main): Use new cache constructor syntax.
1686 Start cache worker threads.
1687 Cleanup the cache at shutdown.
1688 * cygserver_process.cc: Run indent.
1689 (process_cache::process_cache): Add a trigger to use when adding a process.
1690 (process_cache::process): Move process_entry to process.
1691 Insert at the end of the list.
1692 Trigger the request loop when new process's inserted.
1693 (process_cache::process_requests): Do it.
1694 (process_cache::add): New method.
1695 (process_cache::handle_snapshot): New method.
1696 (process::process): Merge in the process_entry fields.
1697 (process::handle): Make a stub function.
1698 (process::exit_code): New method.
1699 (process_request::process): New method.
1700 (process_process_param::request_loop): New method.
1701 * cygserver_shm.cc: New header dependency - threaded_queue.h.
1702 * threaded_queue.cc (threaded_queue::cleanup): Clearer messages.
1703 (queue_process_param::stop): Short spinlock on interruptible threads.
1704 * threaded_queue.h (class threaded_queue): New constructor.
1705 * include/cygwin/cygserver_process.h (process_request): New class.
1706 (process_entry): Remove.
1707 (process): Merge in process_entry.
1708 (process_cache): Inherit from threaded_queue.
1709
1710Tue Oct 2 23:24:00 2001 Robert Collins <rbtcollins@hotmail.com>
1711
1712 * cygserver.cc (class server_process_param): Use new constructor syntax.
1713 * cygserver_process.cc (process_cache::~process_cache): New function.
1714 * threaded_queue.cc: Define condition debug_printf.
1715 Run indent.
1716 (threaded_queue::cleanup): Move queue_process_param guts to a method.
1717 (threaded_queue::process_requests): Ditto.
1718 (queue_process_param::queue_process_param): New method.
1719 (queue_process_param::~queue_process_param): Ditto.
1720 (queue_process_param::start): Ditto.
1721 (queue_process_param::stop): Ditto.
291be307 1722 * threaded_queue.h (class queue_process_param): Add support for
f449bfef
RC
1723 interruptible request loops.
1724 * cygwin/include/cygwin/cygserver_process.h (class process_cache): Add
1725 destructor.
1726
1727Tue Oct 2 23:24:00 2001 Robert Collins <rbtcollins@hotmail.com>
1728
1729 * cygserver_client.cc: New flag allow_daemon to disable the daemon completely.
1730 (cygserver_request): Check it.
1731 (cygserver_init): Ditto.
1732 * environ.cc (parse_thing): Add (no)daemon option.
1733
1734Tue Oct 2 23:00:00 2001 Robert Collins <rbtcollins@hotmail.com>
1735
1736 * shm.cc: Update to handle include changes from HEAD.
1737
1738Tue Oct 2 16:06:00 2001 Robert Collins <rbtcollins@hotmail.com>
1739
291be307 1740 * Makefile.in: Remove cygserver_shm.o from cygwin1.dll.
f449bfef
RC
1741 Rename cygserver_shm_outside.o to cygserver_shm.o.
1742 * cygserver.cc (server_request::process): Use the new client_request
1743 constructor.
1744 * cygserver_client.cc: Remove the #ifdef's stubs for the server method
1745 within cygwin.
1746 (client_request_attach_tty::client_request_attach_tty): Use the new
1747 client_request constructor.
1748 (client_request_shutdown::client_request_shutdown): Ditto.
1749 (client_request::client_request): Ditto.
291be307 1750 * cygserver_shm.cc (client_request_shm_get::serve): Remove the
f449bfef
RC
1751 #ifdef'd stub for in-cygwin builds.
1752 (client_request_shm_get::client_request_shm_get): Use the new
1753 client_request constructor, and remove the in-cygwin variants.
1754 * cygserver_shm.h (class client_request_shm_get): #ifndef test the
1755 serve method - it's only used in cygserver.
1756 * shm.cc (client_request_shm_get::client_request_shm_get): New function.
1757 * include/cygwin/cygserver.h (request_header): New constructor.
291be307 1758 (class client_request): Use it.
f449bfef
RC
1759 New constructor accepting the header size.
1760 #ifndef test the server method - it's only used within cygserver.
1761 (client_request_get_version): #ifdef test the server method.
1762 (client_request_shutdown): Ditto.
1763 (client_request_attach_tty): Ditto.
1764
1765Tue Oct 2 9:57:00 2001 Robert Collins <rbtcollins@hotmail.com>
1766
1767 * Makefile.in: add threaded_queue.o to cygserver.exe.
1768 * cygserver.cc: Include threaded_queue.h
1769 (class server_request): Inherit from queue_request.
1770 (class server_process_param): Inherit from queue_process_param.
1771 (class server_request_queue): Inherit from threaded_queue.
1772 (request_loop): Adjust for new types.
291be307 1773 (server_request_queue::process_requests): Remove guts to
f449bfef
RC
1774 threaded_queue::process_requests.
1775 (server_request::server_request): Adjust for new types.
1776 (worker_function): Delete.
1777 (server_request_queue::create_workers): Delete.
1778 (server_request_queue::cleanup): Delete.
1779 (server_request_queue::add): Move guts to threaded_queue::add.
1780 * threaded_queue.cc: New file.
1781 * threaded_queue.h: New file.
1782
1783Mon Oct 1 12:38:00 2001 Robert Collins <rbtcollins@hotmail.com>
1784
1785 * cygserver.cc (client_request::serve): New function.
1786 * cygserver_process.cc: Inlude <pthread.h> for pthread_once.
1787 (process_cache::process_cache): Initialise a crtiical section for write access.
291be307 1788 (process_cache::process): Use the critical section. Also add missing entries to
f449bfef
RC
1789 the cache.
1790 (do_process_init): New function to initalise class process static variables.
291be307 1791 (process::process): Ensure that the process access critical section is
f449bfef
RC
1792 initialised.
1793 (process::handle): Close the handle of old process's when they have terminated
1794 and we are returning the handle for a process with the same pid.
1795 * cygserver_shm.cc: Run indent.
1796 Include cygserver_process.h to allow process cache functionality.
1797 (client_request_shm_get::serve): New parameter for process cache support.
1798 Use the process cache, not OpenProcess to get a handle to the originating process.
1799 Fix a handle leak with token_handle.
291be307 1800 * cygserver_shm.h (class client_request_shm_get): Update ::serve for process
f449bfef
RC
1801 cache support.
1802 * cygserver_transport_pipes.cc: Redefine debug_printf to be conditional on DEBUG.
291be307 1803 * include/cygwin/cygserver.h: Do not implement client_request::serve in the
f449bfef 1804 header.
291be307
CF
1805 * include/cygwin/cygserver_process.h (class process_cache): Add a write access
1806 critical section to prevent races when requests from a multithreaded
f449bfef
RC
1807 application arrive.
1808
1809Sun Sep 30 23:41:00 2001 Robert Collins <rbtcollins@hotmail.com>
1810
1811 * Makefile.in: Add cygserver_process.o to cygserver.exe.
1812 * cygserver.cc: Include signal.h and cygwin_version.h.
1813 Define debug_printf as a macro.
1814 Define DEBUG to a value.
1815 (client_request_attach_tty::serve): Add beginning of process cache support.
1816 Change from #ifdef DEBUG to work with new DEBUG style.
1817 (client_request_get_version::serve): Add beginning of process cache support.
1818 (class server_request): New prototype for support of process cache.
1819 (class queue_process_param): New class to allow request loop threading.
1820 (class server_request_queue): Add beginning of process cache support.
1821 Allow request loop threading.
1822 (request_loop): Thread function for request loops.
1823 (server_request_queue::process_requests): Initiator for threaded request loops.
1824 (client_request_shutdown::serve): Add beginning of process cache support.
1825 (server_request::server_request): Ditto.
291be307 1826 (server_request::process): Use debug_printf. Add beginning of process cache
f449bfef
RC
1827 support.
1828 (server_request_queue::cleanup): Kill off any request loop threads.
1829 (server_request_queue::add): Add beginning of process cache support.
1830 (handle_signal): Trigger a shutdown.
1831 (main): Print out some useful info at startup - version, date time.
1832 Add process cache support.
1833 Spawn a separate thread for the transport request loop, thus allowing concurrent
1834 support for multiple transports.
291be307 1835 * cygserver_client.cc (client_request_get_version::serve): Add process cache
f449bfef
RC
1836 support.
1837 (client_request_attach_tty::serve): Add process cache support.
1838 (client_request_shutdown::serve): Add process cache support.
1839 * cygsserver_process.cc: New file with the process cache support.
1840 * cygserver_shm.cc: Redefine debug_printf to allow conditional output.
1841 * cygwin.din: Export shmdt().
1842 * shm.cc: Run indent.
1843 Update FIXME's.
1844 (shmdt): New function.
1845 * include/cygwin/cygserver.h (class client_request): Add process cache support.
1846 (class client_request_get_version): Ditto.
1847 (class client_request_shutdown): Ditto.
1848 (class client_request_attach_tty): Ditto.
1849 * include/cygwin/cygserver_process.h: New header for process cache support.
1850
1851Sun Sep 30 8:52:00 2001 Robert Collins <rbtcollins@hotmail.com>
1852
1853 * include/cygwin/cygserver_transport.h: Add copyright header.
1854 * include/cygwin/cygserver_transport_pipes.h: Ditto.
1855 * include/cygwin/cygserver_transport_sockets.h: Ditto.
1856
1857Sat Sep 29 20:40:00 2001 Robert Collins <rbtcollins@hotmail.com>
1858
1859 * Makefile.in: Add cygserver_transport_sockets.o to DLL_OFILES.
1860 Add cygserver_transport_sockets_outside.o to cygserver.exe.
1861 * cygserver.cc: Include new include files.
1862 * cygserver_client.cc: Ditto.
1863 * cygserver_shm.h: No need to include <sys/socket.h> now.
1864 * cygerver_transport.cc: Include new include files.
1865 (transport_layer_base::transport_layer_base): Strip back to a stub.
1866 (transport_layer_base::listen): Ditto.
1867 (transport_layer_base::accept): Ditto.
1868 (transport_layer_base::close): Ditto.
1869 (transport_layer_base::read): Ditto.
1870 (transport_layer_base::write): Ditto.
1871 (transport_layer_base::connect): Ditto.
291be307 1872 * cygserver_transport_pipes.cc: Include new header
f449bfef
RC
1873 "cygwin/cygserver_transport_pipes.h".
1874 * cygserver_transport_sockets.cc: New file.
1875 * dcrt0.cc: No need to include <sys/socket.h> now.
1876 * fhandler_tty.cc: Ditto.
1877 * tty.cc: Ditto.
1878 * include/cygwin/cygserver_transport.h: Strip the base class to a stub.
1879 Remove the cygserver_transport_pipes class.
1880 * include/cygwin/cygserver_transport_pipes.h: New file.
1881 * include/cygwin/cygserver_transport_sockets.h: New file.
1882
1883Tue Sep 25 16:22:00 2001 Robert Collins <rbtcollins@hotmail.com>
1884
1885 * autoload.cc: Add dynamic load statement for 'ImpersonateNamedPipeClient'.
1886 * Makefile.in: Add new object files, and build instructions for cygserver.exe.
1887 * cygwin.din: Export ftok, shmat, shmctl and shmget.
1888 * dcrt0.cc: Additional includes for cygserver support.
1889 (dll_crt0_1): Initialise the cygserver client.
1890 * fhandler.h (fhandler_tty): New method cygserver_attach_tty.
1891 * fhandler_tty.cc: Additional includes for cygserver support.
1892 (fhandler_tty_slave::open): Attempt to use the cygserver when obtaining
1893 handles from the parent process. On failure or 9x use the current method.
1894 (fhandler_tty_slave::cygserver_attach_tty): New function.
1895 * fork.cc (fork_child): Fixup shm memory mapped areas.
1896 * pinfo.h: Declare fixup_shms_after_fork().
1897 * security.h: Declare alloc_sd().
1898 * tty.cc: Additonal includes to support cygserver.
1899 (tty::common_init): Don't allow others to open us if the cygserver is running.
1900 * winsup.h: Declare cygserver_running.
1901 * cygserver.cc: New file.
1902 * cygserver_client.cc: New file.
1903 * cygserver_shm.cc: New file.
1904 * cygserver_shm.h: New file.
1905 * cygserver_transport.cc: New file.
1906 * cygserver_transport_pipes.cc: New file.
1907 * ipc.cc: New file.
1908 * shm.cc: New file.
1909 * include/cygwin/cygserver.h: New file.
1910 * include/cygwin/cygserver_transport.h: New file.
1911 * include/sys/ipc.h: New file.
1912 * include/sys/shm.h: New file.
1913
062401c9
RC
19142002-02-28 Robert Collins <rbtcollins@hotmail.com>
1915
1916 * thread.cc (semaphore::TryWait): Set errno as required by posix 1003.1.
1917 (__sem_wait): Ditto.
1918 (__sem_trywait): Ditto.
1919
d1f50ae5
CF
19202002-02-27 Christopher Faylor <cgf@redhat.com>
1921
1922 * include/cygwin/version.h: Bump DLL minor number.
1923
acb56175
CV
19242002-02-23 Corinna Vinschen <corinna@vinschen.de>
1925
1926 * cygwin.din (fstat64): New symbol.
1927 (ftruncate64): Ditto.
1928 (lseek64): Ditto.
1929 (lstat64): Ditto.
1930 (mmap64): Ditto.
1931 (seekdir64): Ditto.
1932 (stat64): Ditto.
1933 (telldir64): Ditto.
1934 (truncate64): Ditto.
1935 * dir.cc (telldir64): New function.
1936 (telldir): Call telldir64().
1937 (seekdir64): New function.
1938 (seekdir): Call seekdir64().
1939 * fhandler.h: Redefine all methods using __off32_t to use __off64_t.
1940 * fhandler.cc: Use __off64_t and struct __stat64 throughout.
1941 * fhandler_clipboard.cc: Ditto.
1942 * fhandler_disk_file.cc: Ditto.
1943 * fhandler_dsp.cc: Ditto.
1944 * fhandler_floppy.cc: Ditto.
1945 * fhandler_mem.cc: Ditto.
1946 * fhandler_random.cc: Ditto.
1947 * fhandler_socket.cc: Ditto.
1948 * fhandler_tape.cc: Ditto.
1949 * fhandler_zero.cc: Ditto.
1950 * pipe.cc: Ditto.
1951 * glob.c: Ditto, call lstat64 and stat64 in Cygwin.
1952 * mmap.cc: Use __off64_t throughout.
1953 (mmap64): New function.
1954 * sec_acl.cc (acl_worker): Use struct __stat64, call stat64 and lstat64.
1955 * syscalls.cc (lseek64): New function.
1956 (stat64_to_stat32): Ditto.
1957 (fstat64): Ditto.
1958 (stat64): Ditto.
1959 (lstat64): Ditto.
1960 (ftruncate64): Ditto.
1961 (truncate64): Ditto.
1962 (_fstat): Call fstat64.
1963 (_stat): Call stat64.
1964 (cygwin_lstat): Rename to avoid declaration problem. Call lstat64.
1965 (stat_worker): Use struct __stat64.
1966 (access): Ditto.
1967 (ftruncate): Call ftruncate64.
1968 (truncate): Call truncate64.
1969 * wincap.cc: Set flag has_64bit_file_access appropriately.
1970 * wincap.h: Add flag has_64bit_file_access.
1971 * winsup.h (ILLEGAL_SEEK): Define as __off64_t.
1972 (stat_dev): Declare using struct __stat64.
1973 (stat_worker): Ditto.
1974 * include/cygwin/stat.h (struct __stat32): Define if compiling Cygwin.
1975 (struct __stat64): Ditto.
1976 (struct stat): Revert definition with explicitly sized datatypes.
1977 Eliminate sized field names.
1978 * include/cygwin/types.h (blksize_t): New type.
1979 (__blkcnt32_t): Ditto.
1980 (__blkcnt64_t): Ditto.
1981 (blkcnt_t): Ditto.
1982
083abe54
CF
19832002-02-22 Christopher Faylor <cgf@redhat.com>
1984
1985 * sync.h (new_muto): Just accept an argument which denotes the name of
1986 the muto. Use this argument to construct static storage.
1987 * cygheap.cc (cygheap_init): Reflect above change.
1988 * exceptions.cc (events_init): Ditto.
1989 * malloc.cc (malloc_init): Ditto.
1990 * path.cc (cwdstuff::init): Ditto.
1991 * cygheap.h (cwdstuff): Change name of lock element to make it less
1992 generic.
1993 * path.cc (cwdstuff::get_hash): Ditto.
1994 (cwdstuff::get_initial): Ditto.
1995 (cwdstuff::set): Ditto.
1996 (cwdstuff::get): Ditto.
1997 * sigproc.cc (proc_subproc): Ditto.
1998
1999 * debug.cc (lock_debug): Change to method. Use method rather than
2000 macro throughout.
2001
2002 * tty.h (tty_min::kill_pgrp): Declare new method.
2003 * fhandler_termios.cc (tty_min::kill_pgrp): New method.
2004 (fhandler_termios::line_edit): Use new method for killing process.
2005 * dcrt0.cc (do_exit): Ditto.
2006
2007 * dtable.cc (dtable::get_debugger_info): New method for inheriting
2008 dtable info from a debugger.
2009 * tty.cc (tty_init): Attempt to grab file handle info from parent
2010 debugger, if appropriate.
2011
2012 # dtable.cc (dtable::stdio_init): Make this a method.
2013 (dtable::init_std_file_from_handle): Don't set fd unless it's not open.
2014 (dtable::build_fhandler_from_name): Move name setting to
2015 dtable::build_fhandler.
2016 (dtable::build_fhandler): Add win32 name parameter.
2017 * dcrt0.cc (dll_crt0_1): Change to use dtable stdio_init.
2018 * dtable.h (dtable): Reflect build_fhandler parameter change.
2019 * mmap.cc (mmap_record::alloc_fh): Don't set name parameter in
2020 build_fhandler.
2021 * net.cc (fdsock): Remove set_name call since it is now handled by
2022 build_fhandler.
2023
2024 * sigproc.cc (proc_subproc): Release muto as early as possible.
2025
a6790c5f
CV
20262001-02-22 Corinna Vinschen <corinna@vinschen.de>
2027
2028 * smallprint.c (rn): Allow long long values.
2029 (__small_vsprintf): Add 'D', 'U' and 'X' formats for long long
2030 parameters.
2031
aa6df8d7
CF
20322002-02-19 Christopher Faylor <cgf@redhat.com>
2033
2034 * fhandler.cc (fhandler_base::puts_readahead): Remove default parameter
2035 setting. Newer gcc's complain about this.
2036 (fhandler_base::set_readahead_valid): Ditto.
2037 * fhandler_dsp.cc (Audio::open): Ditto.
2038 (fhandler_dev_dsp::open): Ditto.
2039
cecb74ae
CF
20402002-02-19 Christopher Faylor <cgf@redhat.com>
2041
2042 * fork.cc (fork_parent): Use sec_user_nih to control process/thread
2043 inheritance/permission.
2044 * spawn.cc (spawn_guts): Ditto.
2045 * security.cc (create_token): Initialize token so that it is not tested
2046 for bogus value later. Use sec_user to control process/thread
2047 creation.
2048 * security.h (__sec_user): Rename declaration from sec_user.
2049 (sec_user_nih): Declare here as inline function wrapper for __sec_user.
2050 (sec_user): Ditto.
2051 * sigproc.cc (czombies): Allocate a character array for zombies to
2052 avoid constructor overhead
2053 (extremely hackish, I know).
2054 (cpchildren): Ditto.
2055 (pchildren): New define.
2056 (zombies): Ditto.
2057 (getsem): Use sec_user_nih to control semaphore inheritance/permission.
2058
2bd22312
CF
20592002-02-16 Christopher Faylor <cgf@redhat.com>
2060
2061 * times.cc (hires::prime): Restore thread priority on failure
2062 condition.
2063
2064 * uinfo.cc (uinfo_init): Use more robust method for determining if
2065 process was invoked from a non-cygwin process.
2066
2067 * sync.h (muto::init): Eliminate "inheritance" parameter.
2068 (new_muto): Reflect removal of parameter.
2069 * sync.cc (muto::init): Ditto.
2070 * cygheap.cc (cygheap_init): Ditto.
2071 * debug.cc (threadname_init): Ditto.
2072 * exceptions.cc (events_init): Ditto.
2073 * malloc.cc (malloc_init): Ditto.
2074 * path.cc (cwdstuff::init): Ditto.
2075 * sigproc.cc (sigproc_init): Ditto.
2076
4c761646
CF
2077 * grp.cc (group_lock): Use different method for locking with static
2078 member.
2bd22312 2079 (read_etc_group): REALLY ensure that read lock mutex is released.
4c761646
CF
2080 * passwd.cc (passwd_lock): Use different method for locking with static
2081 member.
2082 (read_etc_passwd): REALLY ensure that read lock mutex is released.
2bd22312
CF
2083
2084 * shared.cc (sec_user): Correct reversed inheritance test.
2085
60b68f0d
CF
20862002-02-15 Christopher Faylor <cgf@redhat.com>
2087
2088 * hires.h (hires::usecs): Rename from utime. Accept an argument.
2089 * strace.cc (strace::microseconds): Use hires class for calculating
2090 times.
2091 * sync.h (new_muto): Use NO_COPY explicitly in declaration.
2092 * times.cc (gettimeofday): Reflect change in usecs argument.
2093 (hires::usecs): Ditto. Changed name from utime.
2094 * winsup.h (NO_COPY): Add nocommon attribute to force setting aside
2095 space for variable.
2096 * regcomp.c (REQUIRE): Add a void cast to bypass a warning.
2097
dce87b21
CF
20982002-02-15 Christopher Faylor <cgf@redhat.com>
2099
2100 * hires.h: New file.
2101 * times.cc (gettimeofday): Use hires class for calculating current time.
2102 (hires::prime): New method.
2103 (hires::utime): Ditto.
2104
3d456520
CF
21052002-02-14 Christopher Faylor <cgf@redhat.com>
2106
2107 * include/sys/cygwin.h (cygwin_getinfo_types): New CW_STRACE_ACTIVE.
2108 * external.cc (cygwin_internal): Handle CW_STRACE_ACTIVE.
2109
907dc7d0
CF
21102002-02-14 Christopher Faylor <cgf@redhat.com>
2111
2112 * exceptions.cc (unused_sig_wrapper): Eliminate unused parameter to
2113 asm.
2114 * external.cc (cygwin_internal): Change CW_STRACE_ON to
2115 CW_STRACE_TOGGLE.
2116 * strace.cc (strace::hello): Toggle strace on and off.
2117 * sync.cc (muto::init): Renamed from constructor.
2118 * sync.h (muto::new): Delete.
2119 (muto::delete): Ditto.
2120 (new_muto): Simplify. Use muto.init for nearly everything.
2121 * uinfo.cc (uinfo_init): Avoid closing a NULL handle.
2122 * include/sys/cygwin.h (cygwin_getinfo_types): Rename CW_STRACE_OFF to
2123 CW_STRACE_TOGGLE. Delete CW_STRACE_OFF.
2124 * include/sys/strace.h (strace): Add "inited" field.
2125
4753a17b
CV
21262001-02-12 Corinna Vinschen <corinna@vinschen.de>
2127
2128 * include/cygwin/acl.h: Fix definition of aclent_t.
2129
909acaf6
CF
21302002-02-10 Christopher Faylor <cgf@redhat.com>
2131
2132 * Makefile.in (DLL_OFILES): Consolidate object files.
2133
de4e0d30
CV
21342002-02-10 Corinna Vinschen <corinna@vinschen.de>
2135
b31c68c4
CV
2136 * child_info.h, cygheap.h, fhandler_clipboard.cc, fhandler_dsp.cc,
2137 fhandler_floppy.cc, fhandler_mem.cc, fhandler_random.cc,
2138 fhandler_tape.cc, fhandler_zero.cc, grp.cc, mmap.cc, passwd.cc,
2139 pinfo.cc, pinfo.h, pipe.cc, sec_acl.cc, sec_helper.cc, security.cc,
2140 security.h, thread.h, uinfo.cc, include/cygwin/acl.h: Fix copyright.
2141
21422002-02-10 Corinna Vinschen <corinna@vinschen.de>
2143
2144 * child_info.h, cygheap.h, dcrt0.cc, dir.cc, fhandler.cc, fhandler.h,
de4e0d30
CV
2145 fhandler_clipboard.cc, fhandler_disk_file.cc, fhandler_dsp.cc,
2146 fhandler_floppy.cc, fhandler_mem.cc, fhandler_random.cc,
2147 fhandler_tape.cc, fhandler_zero.cc, grp.cc, mmap.cc, passwd.cc,
2148 pinfo.cc, pinfo.h, pipe.cc, sec_acl.cc, sec_helper.cc, security.cc,
b31c68c4 2149 security.h, spawn.cc, syscalls.cc, thread.h, uinfo.cc, winsup.h:
de4e0d30
CV
2150 Change usage of uid_t to __uid16_t, gid_t to __gid16_t and
2151 off_t to __off32_t throughout. Use INVALID_UID, INVALID_GID and
2152 INVALID_SEEK instead casting -1 to the appropriate type.
2153 * winsup.h: Define INVALID_UID, INVALID_GID and INVALID_SEEK.
2154 * include/cygwin/acl.h: Define internal __aclent16_t and __aclent32_t
2155 types. Don't declare acl functions when compiling Cygwin.
2156 * include/cygwin/grp.h: Declare getgrgid() and getgrnam() with
2157 correct types for internal usage.
2158
39b553b8
CV
21592002-02-10 Corinna Vinschen <corinna@vinschen.de>
2160
2161 Patch suggested by Pierre A. Humblet <Pierre.Humblet@ieee.org>:
2162 * uinfo.cc (internal_getlogin): Try evaluating user by SID even if
2163 ntsec is off.
2164 (uinfo_init): Set primary group even if ntsec is off.
2165
52296b85
CV
21662002-02-09 Corinna Vinschen <corinna@vinschen.de>
2167
2168 * include/cygwin/grp.h: New file.
2169 * include/cygwin/stat.h: Ditto.
2170 * include/cygwin/types.h: Add definitions for __off32_t,
2171 __off64_t, off_t, __uid16_t, __uid32_t, uid_t, __gid16_t,
2172 __gid32_t and gid_t.
2173 * include/sys/cygwin.h: Use correct uid and gid types.
2174
ff86860b
CV
21752002-02-09 Corinna Vinschen <corinna@vinschen.de>
2176
2177 * dtable.cc (dtable::dup2): Revert previous patch.
2178 * fhandler.h: Ditto.
2179 (fhandler_socket::recv): Define new method.
2180 (fhandler_socket::send): Ditto.
2181 * fhandler_socket.cc (fhandler_socket::recv): New method.
2182 (fhandler_socket::send): Ditto.
2183 (fhandler_socket::read): Call fhandler_socket::recv() now.
2184 (fhandler_socket::write): Call fhandler_socket::send() now.
2185 * net.cc (class wsock_event): Move definition to wsock_event.h.
2186 (fdsock): Revert previous patch.
2187 (cygwin_recv): Move implementation to fhandler_socket::recv().
2188 (cygwin_send): Move implementation to fhandler_socket::send().
2189 * wsock_event.h: New file.
2190
d0672acc
CV
21912002-02-06 Alexander Gottwald <Alexander.Gottwald@s1999.tuchemnitz.de>
2192
2193 * net.cc (get_2k_ifconf): Create interface entries for tokenring cards.
2194
fae28904
CV
21952002-02-08 Corinna Vinschen <corinna@vinschen.de>
2196
2197 * dtable.cc (dtable::dup2): Store fd for fhandler_socket.
2198 * fhandler.h (fhandler_base::set_fd): New virtual method.
2199 (fhandler_base::get_fd): Ditto.
2200 (fhandler_socket::set_fd): Ditto.
2201 (fhandler_socket::get_fd): Ditto.
2202 * fhandler_socket.cc (fhandler_socket::read): Call cygwin_recv instead
2203 of native Winsock recv.
2204 (fhandler_socket::write): Call cygwin_send instead of native Winsock
2205 send.
2206 * net.cc (fdsock): Store fd in fhandler_socket.
2207
1f64102f
CV
22082002-02-07 Corinna Vinschen <corinna@vinschen.de>
2209
2210 * net.cc (cygwin_getsockname): Fix handling of NULL sun_path.
2211
562d9745
CV
22122002-01-29 Corinna Vinschen <corinna@vinschen.de>
2213
2214 * net.cc (getdomainname): Fix registry key for 9x systems, too.
2215
94ee02fa
CV
22162002-01-29 Corinna Vinschen <corinna@vinschen.de>
2217
2218 * net.cc (getdomainname): Fix registry key for NT systems.
2219
494a66d9
CF
22202002-01-28 Christopher Faylor <cgf@redhat.com>
2221
2222 * external.cc (cygwin_internal): Initialize various internal settings
2223 if required to allow use of some things from user loaded DLL.
2224 (CW_STRACE_ON): Add new feature.
2225 (CW_CYGWIN_PID_TO_WINPID): Ditto.
2226 * pinfo.cc (set_myself): Call "strace.hello" to initiate possible
2227 strace session.
2228 (pinfo::init): Guard against dereferencing uninitialized myself.
2229 * sigproc.cc (wait_sig): Call strace.hello() when __SIGTRACE "signal"
2230 received.
2231 * strace.cc (strace::hello): New method.
2232 * wincap.cc (wincapc::init): Avoid initializing if already initialized.
2233 * wincap.h (wincapc::wincapc): New method.
2234 * include/sys/cygwin.h: Add new CW_ enums. Kludge typedefs of
2235 {g,u}id_t if required.
2236 * strace.h (strace::hello): Declare new method.
2237
6616e6cf
CF
22382002-01-28 Earnie Boyd <earnie@users.sf.net>
2239
2240 * include/sys/strace.h (_STRACE_ON): Define.
2241 (_STRACE_OFF): Ditto.
2242
dfb4c347
CF
22432002-01-24 Christopher Faylor <cgf@redhat.com>
2244
2245 * speclib: Ensure that temporary def file is removed.
2246
3c07fbeb
CF
22472002-01-23 Christopher Faylor <cgf@redhat.com>
2248
2249 * speclib: Use rm -f to remove temp file just to quiet any potential
2250 warnings.
2251
f6fc31e1
CV
22522002-01-23 Corinna Vinschen <corinna@vinschen.de>
2253
2254 * security.cc (create_token): Use sec_user() to create
be6d8567
CV
2255 SECURITY_ATTRIBUTES structure for primary token. Use
2256 MAXIMUM_ALLOWED access rights instead of TOKEN_ALL_ACCESS.
f6fc31e1 2257
adbd01af
CV
22582002-01-23 Corinna Vinschen <corinna@vinschen.de>
2259
2260 * path.cc (symlink): Fix check for already existing file.
2261
aed69a5b
CF
22622002-01-21 Christopher Faylor <cgf@redhat.com>
2263
2264 * cygmagic: Suppress error output when figuring out if sum takes an
2265 option.
2266
f3647dd7
CF
22672002-01-21 Christopher Faylor <cgf@redhat.com>
2268
2269 * cygmagic: Attempt to figure out if sum takes an option.
2270
51076b73
CF
22712002-01-21 DJ Delorie <dj@redhat.com>
2272
2273 * Makefile.in (libpthread.a): Pass the assembler also.
291be307 2274 (libm.a): Ditto.
51076b73
CF
2275 (libc.a): Ditto.
2276 * speclib: Specify the assembler to dlltool.
2277
0ac2abea
CF
22782002-01-21 Christopher Faylor <cgf@redhat.com>
2279
2280 * include/cygwin/version.h: Bump DLL minor number.
2281
ac11ec88
CV
22822002-01-21 Corinna Vinschen <corinna@vinschen.de>
2283
28982aa8 2284 * grp.cc (getgrgid): Don't return default gid entry when ntsec is on.
ac11ec88
CV
2285 * syscalls.cc (setegid): Don't set primary group in process token.
2286
8ef47135
CF
22872002-01-21 Christopher Faylor <cgf@redhat.com>
2288
2289 * speclib: Don't use /dev/null as DLL name. Just default to what's
2290 already in .def file.
2291
22922002-01-21 Christopher Faylor <cgf@redhat.com>
2293
2294 * exceptions.cc (sig_handle): Remove last vestiges of SA_NOCLDSTOP code
2295 which caused SIGCHLD to be ignored.
2296
07cc1f1f
CF
22972002-01-20 Christopher Faylor <cgf@redhat.com>
2298
2299 * include/cygwin/version.h: Bump DLL minor number.
2300
385437d4
CF
23012002-01-20 Christopher Faylor <cgf@redhat.com>
2302
2303 * syscalls.cc (regfree): Make dll_export.
2304
d7c16d8d
CF
23052002-01-20 Christopher Faylor <cgf@redhat.com>
2306
2307 * exceptions.cc (ctrl_c_handler): Convert windows pid to cygwin pid
2308 when detecting if we should actually handle CTRL-C.
2309
216109a8
CF
23102002-01-19 Christopher Faylor <cgf@redhat.com>
2311
2312 * Makefile.in (new-cygwin1.dll): Revert previous change. libsupc++.a
2313 is only available in libstdc++-v3.
2314
9e73b339
CF
23152002-01-19 Christopher Faylor <cgf@redhat.com>
2316
2317 * exceptions.cc (sig_handle_tty_stop): Don't send SIGCHLD if parent
2318 doesn't want it.
2319 (sig_handle): Don't check for SA_NOCLDSTOP here. We don't have enough
2320 information.
2321
5946622e
CF
23222002-01-19 Christopher Faylor <cgf@redhat.com>
2323
2324 * include/cygwin/version.h: Bump DLL minor number.
2325
994fe87b
CF
23262002-01-19 Christopher Faylor <cgf@redhat.com>
2327
2328 * Makefile.in (new-cygwin1.dll): Just use -lsupc++ for link.
2329 * sigproc.cc (proc_exists): Change existence criteria.
2330 * sync.h (new_muto): Add volatile to definition to avoid gcc
2331 optimization problems.
2332
df3af773
CV
23332002-01-19 Corinna Vinschen <corinna@vinschen.de>
2334
2335 * include/cygwin/version.h: Bump API minor version to 51.
2336
7d6be0d6
CV
23372002-01-19 Mark Bradshaw <bradshaw@staff.crosswalk.com>
2338
291be307
CF
2339 * cygwin.din: Add recvmsg and sendmsg.
2340 * net.cc: Add cygwin_recvmsg and cygwin_sendmsg.
2341 * /usr/include/sys/socket.h: Add recvmsg and sendmsg.
7d6be0d6 2342
2d3dab2e
CV
23432002-01-19 Corinna Vinschen <corinna@vinschen.de>
2344
2345 * security.cc (create_token): Close processes token handle as soon
2346 as it's not used anymore.
2347
104c3be6
CV
23482002-01-17 Corinna Vinschen <corinna@vinschen.de>
2349
2350 * Makefile.in: Add fnmatch.o to DLL_OFILES.
2351 * cygwin.din: Add fnmatch export symbol.
2352 * fnmatch.c: New file.
2353 * include/fnmatch.h: Ditto.
2354 * include/cygwin/version.h: Bump API minor version to 50.
2355
9a7e1562
CV
23562002-01-15 Corinna Vinschen <corinna@vinschen.de>
2357
2358 * path.cc (fchdir): Call chdir with full windows path.
2359
7eddac1b
CV
23602002-01-14 Corinna Vinschen <corinna@vinschen.de>
2361
2362 * dir.cc: Use INVALID_FILE_ATTRIBUTES instead of "(DWORD) -1"
2363 for file attributes throughout.
2364 * fhandler.cc: Ditto.
2365 * fhandler_disk_file.cc: Ditto.
2366 * path.cc: Ditto.
2367 * path.h: Ditto.
2368 * syscalls.cc: Ditto.
2369 * times.cc (utimes): Use path_conv::isdir() instead of explicit
2370 GetFileAttributes() call.
2371
5daa0835
CF
23722002-01-13 Christopher Faylor <cgf@redhat.com>
2373
2374 * dcrt0.cc (multiple_cygwin_problem): Clarify logic and make
2375 CYGWIN_MISMATCH_OK more powerful.
2376
06486d9e
CF
23772002-01-10 Christopher Faylor <cgf@redhat.com>
2378
2379 * exceptions.cc (sig_handle): Accept a second argument indicating
2380 whether the signal came from this process or not.
2381 * sigproc.h: Reflect sig_handle arg change.
2382 * signal.cc (kill_pgrp): Add sigframe info.
2383 (abort): New function. Eliminates newlib function of same name.
2384 * sigproc.cc (wait_sig): Pass "signal from this process" value as arg
2385 2.
2386
bb5225c2
CV
23872002-01-10 Corinna Vinschen <corinna@vinschen.de>
2388
2389 * syscalls.cc (pathconf): Guard _PC_PATH_MAX branch against invalid
2390 file parameter.
2391
c0a8e8d0 23922002-01-09 Christopher Faylor <cgf@redhat.com>
291be307 2393 Robert Collins <rbtcollins@hotmail.com>
c0a8e8d0
CF
2394
2395 * exceptions.cc (early_stuff_init): Rename from misnamed
2396 set_console_handler.
2397 (ctrl_c_handler): Attempt to work around potential signal duplication
2398 during process startup.
2399 (sig_handle): Ignore SIGINT when we're just an "exec stub".
2400 * spawn.cc (spawn_guts): Store pid of spawned process in global for use
2401 by ctrl_c_handler.
2402 * dcrt0.cc (dll_crt0_1): Call renamed initialization function.
2403 * winsup.h: Reflect function name change.
2404
fe37dd79
CV
24052002-01-08 Corinna Vinschen <corinna@vinschen.de>
2406
2407 * net.cc (cygwin_accept): Set sun_path for newly connected socket.
2408
cbf7a9eb
CF
24092002-01-07 Ralf Habacker <Ralf.Habacker@freenet.de>
2410
2411 * Makefile.in: Add uninstall target.
2412
a2e12d0c
CF
24132002-01-07 Christopher Faylor <cgf@redhat.com>
2414
2415 * sigproc.cc (getsem): Clean up debugging output.
2416
4a08cbfe
CF
24172002-01-07 Christopher Faylor <cgf@redhat.com>
2418
2419 * sigproc.cc (getsem): Set errno when unable to create own semaphore.
2420 Reorganize to make clearer that error should only come from initial
2421 creation of process semaphore.
2422
10dedaaa
CF
24232002-01-06 Christopher Faylor <cgf@redhat.com>
2424
2425 * dtable.cc (dtable::init_std_file_from_handle): Add some defensive
2426 code to invalid handle case.
2427
d6154fb7
CV
24282002-01-06 Corinna Vinschen <corinna@vinschen.de>
2429
2430 * ioctl.cc (ioctl): Make third argument optional.
2431 * include/sys/ioctl.h: Ditto in declaration.
2432 * dtable.cc (dtable::init_std_file_from_handle): Revert previous
2433 bogus patch.
2434 * window.cc (WndProc): Raise SIGURG instead of SIGIO in case of FD_OOB
2435 message.
2436
9125cbd7 24372002-01-05 Christopher Faylor <cgf@redhat.com>
fcb76c5d 2438
9125cbd7
CF
2439 * dir.cc (opendir): Guarantee release of alloced fhandler structure on
2440 error.
fcb76c5d 2441
9125cbd7
CF
24422002-01-05 Corinna Vinschen <corinna@vinschen.de>
2443
2444 * exceptions.cc (sig_handle): Set default action for SIGURG to SIG_IGN.
2445
24462002-01-05 Corinna Vinschen <corinna@vinschen.de>
2edba236
CV
2447
2448 * dtable.cc (dtable::init_std_file_from_handle): Don't treat NULL
2449 handle as errorneous.
2450
acf05df7
CF
24512002-01-04 Christopher Faylor <cgf@redhat.com>
2452
2453 * cygmagic: Change logic for equality test.
2454
7acba971
CF
24552002-01-04 Christopher Faylor <cgf@redhat.com>
2456
2457 * dir.cc (opendir): Don't attempt to call sub-opendir if ENOENT.
2458
9125cbd7 24592002-01-04 Corinna Vinschen <corinna@vinschen.de>
dc63cea5
CV
2460
2461 * net.cc: Replace usage of AF_UNIX by Posix compliant AF_LOCAL
2462 throughout.
2463 (socketpair): Explicitly allow SOCK_STREAM and SOCK_DGRAM socket types
2464 in families AF_UNIX and AF_LOCAL. Explicitly allow PF_UNSPEC, PF_LOCAL
2465 and PF_INET protocols. Return error otherwise. Implement datagram
2466 socketpairs.
2467
3b789217
CF
24682002-01-01 Christopher Faylor <cgf@redhat.com>
2469
291be307 2470 * speclib: Remove temp files automatically.
3b789217 2471
2fe27909 24722002-01-01 Corinna Vinschen <corinna@vinschen.de>
2fe27909
CV
2473 * fhandler.h (fhandler_socket::sun_path): New private member.
2474 (fhandler_socket::set_sun_path): New method.
2475 (fhandler_socket::get_sun_path): Ditto.
2476 * fhandler_socket.cc (fhandler_socket::fhandler_socket): Initialize
2477 sun_path to NULL.
2478 (fhandler_socket::~fhandler_socket): Free sun_path if needed.
2479 (fhandler_socket::set_sun_path): New method.
2480 * net.cc (cygwin_bind): Set sun_path to path of local socket file.
2481 (cygwin_getsockname): Add code to return correct sockaddr for unix
2482 domain sockets.
This page took 0.327391 seconds and 5 git commands to generate.