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