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