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