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