]> sourceware.org Git - newlib-cygwin.git/blame - winsup/cygwin/ChangeLog
* environ.cc (parse_options): Use setenv to potentially replace CYGWIN value on
[newlib-cygwin.git] / winsup / cygwin / ChangeLog
CommitLineData
8a2ce995
CF
12002-06-30 Christopher Faylor <cgf@redhat.com>
2
3 * environ.cc (parse_options): Use setenv to potentially replace CYGWIN
4 value on export. Fixes broken behavior since November 2000 changes.
5 (regopt): Return indication of whether or not something has been parsed
6 from the registry.
7 (environ_init): Only attempt to export CYGWIN variable when values were
8 set from the registry. It is exported automatically otherwise.
9
fdf0b5de
CF
102002-06-30 Christopher Faylor <cgf@redhat.com>
11
12 * fhandler.h (fhandler_process::pid): New field.
13 (fhandler_process::fstat): Remove unneeded array. Set pid element.
14 (fhandler_process::open): Ditto.
15 (fhandler_process::fill_filebuf): Handle case where 'p' field is NULL.
16
ccacec81
CF
172002-06-30 Christopher Faylor <cgf@redhat.com>
18
19 * fhandler.h (fhandler_process::p): New field.
20 (fhandler_process:fill_filebuf): Revert to same definition as virtual
21 in parent class.
22 (fhandler_process::open): Fill out p field rather than passing as an
23 argument.
24 (fhandler_process::fill_filebuf): Use p pointer rather than argument.
25
c6d90e84
CV
262002-06-29 Pierre Humblet <pierre.humblet@ieee.org>
27
28 * security.cc (extract_nt_dom_user): Check for all buffer overflows.
29 Call LookupAccountSid after trying to get domain & user from passwd.
30 (get_group_sidlist): Obtain the domain and user by calling
31 extract_nt_dom_user instead of LookupAccountSid.
32
839b2942
CF
332002-06-29 Christopher Faylor <cgf@redhat.com>
34
35 * uinfo.cc (cygheap_user::test_uid): Use standard issetuid test.
36
efc1575e
CF
372002-06-29 Christopher Faylor <cgf@redhat.com>
38
39 * autoload.cc (NetGetDCName): Change to make this an optional load
40 function.
41 * cygheap.h (cygheap_user::logsrv): Return NULL when operation fails.
42 (cygheap_user::winname): Ditto.
43 (cygheap_user::domain): Ditto.
44 * uinfo.cc (cygheap_user::env_logsrv): Save results in temp variable.
45 (cygheap_user::env_userprofile): Ditto.
46
638180f5
CF
472002-06-29 Christopher Faylor <cgf@redhat.com>
48
49 * environ.cc (spenv::retrieve): Detect return of env_dontadd from
50 cygheap_user methods.
51 (build_env): Avoid incrementing environment pointer if not actually
52 adding to the environment. That could result in garbage in the
53 environment table. Be more defensive when reallocing envblock.
54
38bc1196
CF
552002-06-29 Christopher Faylor <cgf@redhat.com>
56
57 * uinfo.cc (cygheap_user::test_uid): Return NULL or further tests are
58 sorta useless.
59 (cygheap_user::env_domain): Recalculate if name is missing.
60
664075a3
CF
612002-06-29 Christopher Faylor <cgf@redhat.com>
62
63 * environ.cc (spenv::from_cygheap): Still need to take setuid into
64 consideration.
65
e97962b9
CF
662002-06-28 Christopher Faylor <cgf@redhat.com>
67
68 * uinfo.cc (cygheap_user::env_logsrv): Return "almost_null" in case
69 where no domain or username is "SYSTEM".
70
094d5193
CF
712002-06-28 Christopher Faylor <cgf@redhat.com>
72
73 * cygheap.h (cygheap_user): Reorg to accommodate environment caching.
74 (cygheap_user::logsrv): New method.
75 (cygheap_user::winname): Ditto.
76 (cygheap_user::domain): Ditto.
77 (cygheap_user::test_uid): Ditto.
78 * cygheap.cc (cygheap_user::set_name): Reflect name "pwinname" name
79 change.
80 * environ.cc (getwinenveq): New function.
664075a3 81 (penv::from_cygheap): penv::from_cygheap): Change arguments.
094d5193
CF
82 (spenv::retrieve): Ditto for call. Use getwinenveq to retrieve info
83 from environment. Always return value from cygwin environment, if it
84 exists.
85 * environ.h (getwinenveq): Declare.
86 * uinfo.cc (cygheap_user::ontherange): Use logsrv() rather than
87 env_logsrv().
88 (cygheap_user::test_uid): Define new method.
89 (cygheap_user::env_logsrv): Accept environment arguments. Use test_uid
90 to find info.
91 (cygheap_user::env_domain): Ditto.
92 (cygheap_user::env_userprofile): Ditto.
93 (cygheap_user::env_homepath): Ditto.
94 (cygheap_user::env_homedrive): Ditto.
95 (cygheap_user::env_name): Ditto.
96
179cae11
CF
972002-06-27 Christopher Faylor <cgf@redhat.com>
98
99 * cygheap.cc (cfree_and_set): New function.
100 (cygheap_user::set_name): Use cfree_and_set to reset members.
101 * cygheap.h (cygheap_user): Delete static members.
102 (cygheap_user::puserprof): New member.
103 (cfree_and_set): Declare.
104 * dcrt0.cc (almost_null): Define.
bf75aae8 105 * environ.cc (env_dontadd): Redefine as "almost_null".
179cae11
CF
106 * winsup.h (almost_null): Declare.
107 * syscalls.cc (cfree_and_set): Remove unused variable.
108 * uinfo.cc (cygheap_user::homepath_env_buf): Eliminate.
109 (cygheap_user::homedrive_env_buf): Ditto.
110 (cygheap_user::userprofile_env_buf): Ditto.
111 (cygheap_user::ontherange): YA change to try to preserve existing
112 HOMEPATH and HOMEDRIVE. Return almost_null values when variables
113 should not actually exist.
114 (cygheap_user::env_logsrv): Ditto.
115 (cygheap_user::env_domain): Ditto.
116 (cygheap_user::env_userprofile): Ditto.
117
eba23038
CV
1182002-06-27 Corinna Vinschen <corinna@vinschen.de>
119
120 * dcrt0.cc (dll_crt0_1): Let __progname point to the applications
121 basename. Move eliminating ".exe" suffix from argv[0] so that it
122 always also affects __progname.
123
196cdd45
CF
1242002-06-27 Thomas Pfaff <tpfaff@gmx.net>
125
126 * thread.cc (pthread::create): Added trace printf to get CreateThread
127 LastError.
128
5b509758
CV
1292002-06-27 Corinna Vinschen <corinna@vinschen.de>
130
131 * mmap.cc (list::match): Check using pagesize aligned size.
132
75c6a983
CF
1332002-06-26 Christopher Faylor <cgf@redhat.com>
134
135 * fhandler_disk_file.cc (fhandler_disk_file::fstat_by_name): Force
136 FindFirstFile on first file of directory when asking for x:\ .
137
b3e2d035
CF
1382002-06-26 Christopher Faylor <cgf@redhat.com>
139
140 * cygheap.cc (cygheap_user::set_name): Correct thinko in below change.
141
c99902b9
CF
1422002-06-26 Christopher Faylor <cgf@redhat.com>
143
144 * cygheap.cc (cygheap_user::set_name): Avoid clearing things when just
145 setting name to itself or during first time initialization.
146
147 * environ.cc (check_case_init): Make case insensitive.
148
be5007aa
CV
1492002-06-26 Corinna Vinschen <corinna@vinschen.de>
150
151 * fhandler.h (fhandler_socket::bind): Add method definition.
152 (fhandler_socket::connect): Ditto.
153 (fhandler_socket::listen): Ditto.
154 (fhandler_socket::accept): Ditto.
155 (fhandler_socket::getsockname): Ditto.
156 (fhandler_socket::getpeername): Ditto.
157 (fhandler_socket::recvfrom): Ditto.
158 (fhandler_socket::recvmsg): Ditto.
159 (fhandler_socket::sendto): Ditto.
160 (fhandler_socket::sendmsg): Ditto.
161 (fhandler_socket::shutdown): Ditto.
162 * fhandler_socket.cc (get_inet_addr): Move here from net.cc.
163 (fhandler_socket::bind): New method.
164 (fhandler_socket::connect): Ditto.
165 (fhandler_socket::listen): Ditto.
166 (fhandler_socket::accept): Ditto.
167 (fhandler_socket::getsockname): Ditto.
168 (fhandler_socket::getpeername): Ditto.
169 (fhandler_socket::recvfrom): Ditto.
170 (fhandler_socket::recvmsg): Ditto.
171 (fhandler_socket::sendto): Ditto.
172 (fhandler_socket::sendmsg): Ditto.
173 (fhandler_socket::shutdown): Ditto.
174 * net.cc: Various formatting cleanups throughout.
175 (get_inet_addr): Move to fhandler_socket.cc.
176 (cygwin_bind): Move base functionality to appropriate fhandler_socket
177 method.
178 (cygwin_connect): Ditto.
179 (cygwin_listen): Ditto.
180 (cygwin_accept): Ditto.
181 (cygwin_getsockname): Ditto.
182 (cygwin_getpeername): Ditto.
183 (cygwin_recvfrom): Ditto.
184 (cygwin_recvmsg): Ditto.
185 (cygwin_sendto): Ditto.
186 (cygwin_sendmsg): Ditto.
187 (cygwin_shutdown): Ditto.
188
303af157
CV
1892002-06-26 Corinna Vinschen <corinna@vinschen.de>
190
191 * pwdgrp.h (pwdgrp_read::~pwdgrp_read): Avoid compiler warning.
192
8698edb8
CF
1932002-06-26 Christopher Faylor <cgf@redhat.com>
194
195 * dcrt0.cc (_dcrt0): Be more defensive when reserved block is used and
196 it's not cygwin info.
197
f279e522
CF
1982002-06-26 Christopher Faylor <cgf@redhat.com>
199
200 * autoload (noload): Avoid clobbering bx register.
201
202 * environ.cc (codepage_init): Use case insensitive match.
203
204 * fhandler_console.cc (cp_get_internal): Delete.
205 (con_to_str): Use get_cp to derive code page.
206 (str_to_con): Ditto.
207 * miscfuncs.cc (get_cp): New function.
208 (sys_wcstombs): New function. Converted from macro.
209 (sys_mbstowcs): Ditto.
210 * winsup.h: Reflect above changes.
211
109e4822
CF
2122002-06-26 Christopher Faylor <cgf@redhat.com>
213
214 * winsup.h: Minor cleanup.
215 * path.h (path_conv::[]): New operator.
216 * syscalls.cc (_link): Use path_conv operators rather than methods,
217 where appropriate. Minor white space cleanup.
218
2192002-06-26 Christopher Faylor <cgf@redhat.com>
220
221 * include/cygwin/version.h: Bump DLL minor number.
222
2232002-06-25 Christopher Faylor <cgf@redhat.com>
224
225 * dcrt0.cc (sm): Make NO_COPY.
226
6331b658
CV
2272002-06-25 Corinna Vinschen <corinna@vinschen.de>
228
229 * syscalls.cc (chown): Convert uid to 32 bit.
230 (lchown): Ditto.
231 (fchown): Ditto.
232
e773b7cf
CF
2332002-06-24 Christopher Faylor <cgf@redhat.com>
234
235 * dtable.cc (dtable::find_unused_handle): Avoid coercion.
236
4c78be52
CF
2372002-06-24 Christopher Faylor <cgf@redhat.com>
238
239 * dtable.cc (fhandler_base::dup2): Cleanup. Ensure that lock is turned
240 off in error condition.
241
1fd072b6
CV
2422002-06-24 Corinna Vinschen <corinna@vinschen.de>
243
244 * uinfo.cc (internal_getlogin): Set myself->uid and myself->gid instead
245 of user.real_uid and user.real_gid.
246 (uinfo_init): Evaluate orig_uid and real_uid from myself->uid. Ditto
247 for gid.
248
de0557f7
CF
2492002-06-23 Pierre Humblet <pierre.humblet@ieee.org>
250
251 * security.cc (get_group_sidlist): Add pw argument and use pw->pw_name
252 in call to get_supplementary_group_sidlist.
253 (create_token): Add pw argument and use it in call to
254 get_group_sidlist.
255 * security.h: Add pw argument in declaration of create_token.
256 * syscalls.cc (seteuid32): Add pw argument in call to create_token.
257
035bfbdd
CF
2582002-06-23 Conrad Scott <conrad.scott@dsl.pipex.com>
259
260 * fhandler.cc (fhandler_base::fstat): Set S_IFIFO for pipes.
261 * fhandler_socket.cc (fhandler_socket.cc::fstat): Set S_IFSOCK.
262
eecef29f
CF
2632002-06-23 Christopher Faylor <cgf@redhat.com>
264
265 * lib/_cygwin_S_IEXEC.cc: Remove obsolete file.
266
85b995d4
CF
2672002-06-23 Christopher Faylor <cgf@redhat.com>
268
269 Use cygwin_{shm,ipc}.h instead of /sys/{shm,ipc}.h throughout.
270 * sys/ipc.h: Remove.
271 * sys/shm.h: Remove.
272 * cygwin_ipc.h: New file.
273 * cygwin_shm.h: New file.
274
6bda8def
CF
2752002-06-23 Christopher Faylor <cgf@redhat.com>
276
277 * cygwin.sc: Add recent changes from ld sources.
278
2792002-06-23 Conrad Scott <conrad.scott@dsl.pipex.com>
280
281 * winsup.h: Move #ifdef EXPCGF code into "winbase.h".
282 * winbase.h: #ifdef EXPCGF code moved here from "winsup.h".
283
f6709c07
RC
2842002-06-12 Thomas Pfaff <tpfaff@gmx.net>
285
286 * thread.h (pthread::cleanup_stack): Renamed cleanup_handlers to
287 cleanup_stack.
288 * thread.cc (pthread::pthread): Ditto.
289 (pthread::create): Fixed mutex verification.
290 (pthread::push_cleanup_handler): Renamed cleanup_handlers to
291 cleanup_stack.
292 Mutex calls removed, used InterlockedExchangePointer instead.
293 (pthread::pop_cleanup_handler): Renamed cleanup_handlers to
294 cleanup_stack.
295 (pthread::pop_all_cleanup_handlers): Ditto.
296 (__pthread_once): Check state first and return if already done.
297 (__pthread_join): DEADLOCK test reverted to __pthread_equal
298 call.
299 (__pthread_detach): Unlock mutex before deletion.
300
0278e3a3
CF
3012002-06-21 Christopher Faylor <cgf@redhat.com>
302
303 * Makefile.in (cygrun.exe): Move -lgcc where it will do some good.
304
1a7cb557
CV
3052002-06-21 Corinna Vinschen <corinna@vinschen.de>
306
307 * syscalls.cc (stat64_to_stat32): Correctly evaluate st_rdev.
308 (fstat64): Set st_rdev to same value as st_dev.
309 (stat_worker): Ditto.
310
49056987
CV
3112002-06-21 Corinna Vinschen <corinna@vinschen.de>
312
313 * security.cc (alloc_sd): Carefully check owner_sid again after trying
314 SIDs from cygheap.
315
dd0208eb
CV
3162002-06-21 Corinna Vinschen <corinna@vinschen.de>
317
318 * security.cc (alloc_sd): Remove unnecessary retrieval of owner name.
319 Check uid for current user first and use SIDs from cygheap if so.
320 Set errno to EINVAL if user SID isn't retrievable. Just print user SID
321 as debug output.
322 Don't bail out if group SID isn't retrievable. Change debug output
323 appropriately.
324
d7c2bd8e
CF
3252002-06-21 Christopher Faylor <cgf@redhat.com>
326
327 * errno.cc: Change text description for EBADF throughout.
328
7c02f861
CF
3292002-06-20 Pierre Humblet <pierre.humblet@ieee.org>
330
331 * uinfo.cc (cygheap_user::ontherange): Use env_name for NetUserGetInfo.
332 (cygheap_user::env_logsrv): Verify env_domain is valid.
333 * environ.cc: Include child_info.h and keep spenvs[] sorted.
334 (environ_init): Check child_proc_info instead of myself->ppid_handle.
335
c25ebbaf
CF
3362002-06-19 Christopher Faylor <cgf@redhat.com>
337
338 * fhandler.cc (fhandler_base::set_flags): Change priority of "linked
339 in" default binmode setting so that it has priority over optional
340 setting.
341
03a2ce9a
CF
3422002-06-19 Christopher Faylor <cgf@redhat.com>
343
d70b993f 344 Use hMainProc where appropriate, throughout.
03a2ce9a
CF
345 * environ.cc (spenv::retrieve): Add debugging statements.
346
347 * pinfo.cc (set_myself): Don't call strace.hello if already stracing.
348 * strace.cc (strace): Move NO_COPY keyword so that it will actually
349 take effect.
350
834224ab
CV
3512002-06-19 Corinna Vinschen <corinna@vinschen.de>
352
353 * uinfo.cc (cygheap_user::ontherange): Call NetUserGetInfo() only with
354 non-NULL logserver parameter.
355
e40670ee
CF
3562002-06-16 Christopher Faylor <cgf@redhat.com>
357
358 * cygheap.h (cygheap_user::issetuid): New method.
359 * dtable.cc (dtable::vfork_child_dup): Use new method to determine if
360 we are in "setuid mode."
361 * fork.cc (fork_parent): Ditto.
362 * spawn.cc (spawn_guts): Ditto.
363 * syscalls.cc (seteuid32): Ditto.
364 (setegid32): Ditto.
365 * environ.cc (spenv::retrieve): (Suggested by Pierre Humblet) Do
366 potential recalculation of cygheap_user stuff when in setuid mode.
00a9e8a0
CF
367 Return special value when environment variable should be calculated but
368 not added.
e40670ee
CF
369 (build_env): Don't add retrieved value to dstp if it is 'dont_add'.
370
a05a9e01
CF
3712002-06-16 Christopher Faylor <cgf@redhat.com>
372
373 Changes suggested by Pierre Humblet.
374 * environ.cc (NL): New macro.
375 (conv_envvars): Use NL macro to fill in name and namelen.
376 (spenv::namelen): New field.
377 (spenvs): Use NL to fill in name and namelen.
378 (spenv::retrieve): Eliminate length argument. Instead, use namelen
379 throughout.
380 (build_env): Don't calculate length of initial FOO= part of
381 environment. Accommodate spenv::retrive argument change.
382
5f25e1d1
CF
3832002-06-16 Christopher Faylor <cgf@redhat.com>
384
385 * cygheap.h (cygheap_user::winname): New field.
386 * cygheap.cc (cygheap_user::set_name): Clear winname when name changes.
387 * uinfo.cc (cygheap_user::env_logsrv): Avoid calculating server when
388 Windows user == SYSTEM.
389 (cygheap_user::env_domain): Set winname here too.
390 (cygheap_user::env_userprofile): Eliminate superfluous tests.
391 (cygheap_user::env_name): Seed winname by calling env_domain().
392
5c8bce24
CF
3932002-06-12 Pierre Humblet <pierre.humblet@ieee.org>
394
395 * spawn.cc (spawn_guts): Revert removal of ciresrv.moreinfo->uid =
396 ILLEGAL_UID.
397
6ea3e429
CF
3982002-06-15 Christopher Faylor <cgf@redhat.com>
399
400 * child_info.h (child_proc_info): Declare as base class.
401 (spawn_info): Declare as alias of child_proc_info to aid debugging.
402 (fork_info): Ditto.
403 * cygheap.cc (cygheap_fixup_in_child): Use child_proc_info global
404 rather than parameter.
405 * cygheap.h (cygheap_fixup_in_child): Reflect above change in
406 declaration.
407 * dcrt0.cc (_dll_crt0): Move 'si' definition here. Assign
408 child_proc_info.
409 (dll_crt0_1): Accommodate cygheap_fixup_in_child and *_info changes.
410 * environ.cc (spenv::retrieve): Make regparm.
411 * environ.h (environ_init): Ditto.
412 (win_env::add_cache): Ditto.
413 (build_env): Ditto.
414 (getwinenv): Ditto.
415 * fork.cc (sync_with_parent): Use fork_info global.
416 (fork_child): Ditto.
417
cff111a6
CF
4182002-06-14 Christopher Faylor <cgf@redhat.com>
419
420 * uinfo.cc (cygheap_user::ontherange): Don't set HOMEDRIVE or HOMEPATH
421 unless one or the other is specified.
422
6d171b44
CF
4232002-06-14 Christopher Faylor <cgf@redhat.com>
424
425 * cygheap.h (cygheap_user::userprofile_env_buf): New static member.
426 * environ.cc (build_env): Add debugging statement.
427 (spenvs): Switch functions for USERDOMAIN and USERNAME.
428 * spawn.cc (spawn_guts): Move environment initialization prior to
429 cygheap_setup_for_child or environment info will never be copied to
430 child.
431
a77d35f7
CF
4322002-06-14 Christopher Faylor <cgf@redhat.com>
433
434 * cygheap.h (cygheap_user): Add static members to hold home{drive,path}
435 info.
436 * uinfo.cc (cygheap_user::ontherange): Use static class members for
437 local HOME* storage.
438
9a771b29
CF
4392002-06-14 Christopher Faylor <cgf@redhat.com>
440
441 * cygheap.cc (cygheap_user::set_logsrv): Remove.
442 (cygheap_user::set_domain): Ditto.
443 * cygheap.h (cygheap_user::set_logsrv): Remove declaration.
444 (cygheap_user::set_domain): Ditto.
445 (cygheap_user::env_domain): Declare new method.
446 (cygheap_user::env_name): Ditto.
447 * environ.cc (spenvs): Add two environment variables.
448 * spawn.cc (spawn_guts): Call build_env after RevertToSelf. Always set
449 ciresrv.mount_h.
450 (cygheap_user::ontherange): Recalculate homedrive/homepath if they are
451 empty. Use env_logsrv to get logon server.
452 (cygheap_user::env_logsrv): Calculate server name here rather than
453 relying on it having been previously calculated.
454 (cygheap_user::env_domain): Ditto for domain name.
455 (cygheap-user::env_name): New method.
456
4572002-06-12 Pierre Humblet <pierre.humblet@ieee.org>
458
459 * syscalls.cc (seteuid32): Do not get or set the environment. Do not
460 call LookupAccountSid nor internal_getlogin. Set cygheap->user name
461 and sid from the passwd entry.
462 * uinfo.cc (uinfo_init): Only call internal_getlogin when starting from
463 a non Cygwin process and use the values returned in user.
464 (internal_getlogin): Simplify to case where starting from a non Cygwin
465 process. Store return values in user and return void. Do not set the
466 Windows default environment.
467 * dcrt0.cc (dll_crt0_1): Call uinfo_init only when needed. Do not set
468 myself->uid nor reset user.sid.
469 * spawn.cc (spawn_guts): Get the sid from cygheap->user. Always
470 RevertToSelf(). Don't set uid in impersonated case.
471 * cygheap.cc (cygheap_user::set_sid): Do not set orig_sig.
472 (cygheap_user::set_orig_sid): New.
473 * cygheap.h: Declare cygheap_user::set_sid.
474 * winsup.h: Add argument to uinfo_init().
475
470e8c46
CV
4762002-06-14 Corinna Vinschen <corinna@vinschen.de>
477
478 * environ.cc (build_env): If realloc moves envblock, move s with it.
479
39be53dc
CF
4802002-06-13 Nicholas S. Wourms <nwourms@netscape.net>
481
482 * winver.rc: Add more words to copyright.
483
0e6d80e4
CV
4842002-06-13 Corinna Vinschen <corinna@vinschen.de>
485
486 * cygheap.cc (cygheap_user::set_name): Revert previous change.
487 * environ.cc (spenv::retrieve): Check return value of call to
488 cygheap->user.*from_cygheap().
489
5682a6dd
CV
4902002-06-13 Corinna Vinschen <corinna@vinschen.de>
491
492 * cygheap.cc (cygheap_user::set_name): Remove setting homedrive and
493 homepath to NULL.
494 (cygheap_user::set_logsrv): Fix free'ing of plogsrv.
495 * cygheap.h (cygheap_user::cygheap_user): Initialize homedrive and
496 homepath to NULL.
497
5f74ae83
CF
4982002-06-13 Christopher Faylor <cgf@redhat.com>
499
500 * security.cc (get_logon_server): Use strcasematch rather than
501 strcasecmp.
502
4863867a
CF
5032002-06-12 Christopher Faylor <cgf@redhat.com>
504
505 * path.cc (chdir): Minor cleanup.
506
12a2ef44
CF
5072002-06-12 Christopher Faylor <cgf@redhat.com>
508
509 * environ.cc (build_env): Correctly fill out windows environment block
510 with win32 paths rather than posix paths.
511
da086d02
CF
5122002-06-12 Christopher Faylor <cgf@redhat.com>
513
514 * cygheap.cc (cygheap_user::set_name): Set homedrive and homepath to
515 NULL on user name change.
516 (cygheap_user::set_logsrv): Allocate enough space for leading \\ so
517 that we can put this in the environment, if needed.
518 * cygheap.h (homebodies): New enum.
519 (cygheap_user::homedrive): New field.
520 (cygheap_user::homepath): Ditto.
521 (cygheap_user::env_logsrv): New method.
522 (cygheap_user::env_homepath): New method.
523 (cygheap_user::env_homedrive): New method.
524 (cygheap_user::env_userprofile): New method.
525 (cygheap_user::ontherange): New method.
526 * environ.cc (envsize): Eliminate debugging argument.
527 (environ_init): Assume that envc counts number of elments not total
528 size.
529 (spenv): New class.
530 (spenvs): New array, renamed from forced_winenv_vars, using spenv.
531 (spenv::retrieve): New method.
532 (build_env): Rename from 'winenv' -- one stop shopping for building new
533 environment blocks for both windows and "unix".
534 * environ.h (build_env: Declare.
535 (winenv): Delete declaration.
536 (envsize): Ditto.
537 * spawn.cc (spawn_guts): Use build_env to build windows and cygwin
538 environment blocks.
539 * uinfo.cc (internal_getlogin): Eliminate environment manipulation.
540 Default to info from GetUserName if it exists. Move HOMEPATH and
541 HOMEDRIVE stuff elsewhere. Move HOME setting elsewhere. Only set HOME
542 environment variable in processes that are not parented by a cygwin
543 process.
544 (cygheap_user::ontherange): Define new method.
545 (cygheap_user::env_logsrv): Ditto.
546 (cygheap_user::env_homepath): Ditto.
547 (cygheap_user::env_homedrive): Ditto.
548 (cygheap_user::env_userprofile): Ditto.
549
077d8b23
CF
5502002-06-11 Christopher Faylor <cgf@redhat.com>
551
552 * spawn.cc (spawn_guts): More hToken removal cleanup.
553
d5377829
CF
5542002-06-09 Pierre Humblet <pierre.humblet@ieee.org>
555
556 * spawn.cc (spawn_guts): Define sec_attribs and call sec_user_nih()
557 only once.
558
380aaf2d
CF
5592002-06-10 Christopher Faylor <cgf@redhat.com>
560
561 * Makefile.in: Ensure that -MD gets added to CFLAGS regardless of
562 CFLAGS command-line setting.
563
564 * cygwin.din: Export sexec* functions as function which returns ENOSYS
565 (i.e., sexec* is deprecated).
566 * dtable.cc (dtable::vfork_child_dup): Ensure that impersonation is
567 restored even on failure.
568 * exec.cc: Throughout, remove references to sexec* and _spawnve.
569 * pinfo.h: Remove _spawnve declaration.
570 * spawn.cc: Rename _spawnve to spawnve and use throughout.
571 (spawn_guts): Eliminate hToken argument and processing of same. Just
572 perform special actions if impersonating.
573 (spawnve): Rename from _spawnve.
574
b01cbd5d
CF
5752002-06-10 Christopher Faylor <cgf@redhat.com>
576
577 * include/sys/strace.h (strace): Avoid use of constructor.
578
fe4283af
CF
5792002-06-10 Christopher Faylor <cgf@redhat.com>
580
581 * dcrt0.cc (dll_crt0_1): Initialize wincap and check for sanity before
582 running global ctors.
583 * wincap.h (wincap): Eliminate constructor. Default is to zero memory,
584 anyway.
585 * wincap.cc (wincap): Copy this on fork to avoid initialization in
586 forked processes.
587
3d78e129
CV
5882002-06-10 Corinna Vinschen <corinna@vinschen.de>
589
590 * fhandler.h (fhandler_socket::fixup_after_fork): Revert patch from
591 2002-06-04.
592 * fhandler_socket.cc (fhandler_socket::fixup_after_fork): Ditto.
593 (fhandler_socket::dup): Ditto.
594 * net.cc (fdsock): Make sockets explicitely noninheritable on NT.
595
c2102631
CF
5962002-06-09 Christopher Faylor <cgf@redhat.com>
597
598 * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Correctly
599 set number of links for directory, if appropriate.
600
43c3c4e3
RC
6012002-06-10 Robert Collins <rbtcollins@hotmail.com>
602
603 * thread.cc: Variation of a patch from Thomas Pffaf.
d70b993f 604 (__pthread_detach): Cleanup thread object if the thread has terminated.
43c3c4e3
RC
605 (__pthread_join): Change order of error checks, and lock against
606 join/detach/exit races.
607 (__pthread_exit): Lock object against join/detach/exit races.
608 (pthread::thread_init_wrapper): Ditto.
609 (thread_init_wrapper): Rename to pthread::thread_init_wrapper.
610 (pthread::create): Check that the mutex initialized correctly.
611 (pthread::push_cleanup_handler): Lock against potential cancellation
612 race. NB: this may not be required if pthread_cleanup_push is non-
613 cancelable.
614 * thread.h (pthread::mutex): New member.
615 (thread_init_wrapper): Rename to pthread::thread_init_wrapper.
616 (pthread::thread_init_wrapper_: New static member.
617
007276b3
RC
6182002-06-10 Robert Collins <rbtcollins@hotmail.com>
619
620 * cygwin.din: Add _pthread_cleanup_push and _pthread_cleanup_pop.
621 * pthread.cc: Change __pthread_self to pthread::self() thruoghout.
622 (_pthread_cleanup_push): New function.
623 (_pthread_cleanup_pop): Ditto.
624 * thread.cc: Thanks to Thomas Pfaff for the pthread cleanup_push,_pop
625 patch, this work is derived from that.
626 Change __pthread_self to pthread::self() thruoghout.
627 (__pthread_self): Rename to pthread::self.
628 (pthread::self): New method.
629 (pthread::pthread): Initialize new member.
630 (pthread::push_cleanup_handler): New method.
631 (pthread::pop_cleanup_handler): New method.
632 (pthread::pop_all_cleanup_handlers): New method.
633 (__pthread_exit): Pop all cleanup handlers.
634 * thread.h (pthread::push_cleanup_handler): Declare.
635 (pthread::pop_cleanup_handler): Ditto.
636 (pthread::pop_all_cleanup_handlers): Ditto.
637 (pthread::self): New static method.
638 (__pthread_exit): Give C++ linkage.
639 (__pthread_join): Ditto.
640 (__pthread_detach): Ditto.
641 (__pthread_self): Remove.
642
6432002-04-24 Thomas Pfaff <tpfaff@gmx.net>
644
c2102631
CF
645 * include/pthread.h (__pthread_cleanup_handler): New structure.
646 (pthread_cleanup_push): Rewritten.
007276b3
RC
647 (pthread_cleanup_pop): Ditto.
648 (_pthread_cleanup_push): New prototype.
c2102631 649 (_pthread_cleanup_pop): Ditto.
007276b3
RC
650
6512002-04-24 Thomas Pfaff <tpfaff@gmx.net>
652
653 * thread.cc (thread_init_wrapper): Check if thread is already joined.
654 (__pthread_join): Set joiner first.
655 (__pthread_detach): Ditto.
656
fec98ec9
RC
6572002-06-10 Robert Collins <rbtcollins@hotmail.com>
658
659 * cygserver_transport.cc (create_server_transport): Finish the split
660 out of sockets code from transport_layer_base. Thanks to Nicholas
661 Wourms and Conrad Scott for catching this.
662
7ac66bdd
CF
6632002-06-08 Christopher Faylor <cgf@redhat.com>
664
665 * pinfo.cc (pinfo_dummy): Initialize to correct size.
666
a004a5b8
CF
6672002-06-08 Christopher Faylor <cgf@redhat.com>
668
669 * path.cc: Change MOUNT_AUTO to MOUNT_CYGDRIVE throughout.
670 * shared_info.h (CURR_MOUNT_MAGIC): Update.
671
50484e8e
CF
6722002-06-08 Christopher Faylor <cgf@redhat.com>
673
674 * external.cc (cygwin_internal): Make v1 mount table access invalid.
675 * path.cc (mount_info::init): Remove had_to_create_mount_areas initialization.
676 (mount_info::from_registry): Remove v1 table import.
677 (mount_info::read_v1_mounts): Eliminate.
678 (mount_info::import_v1_mounts): Ditto.
679 * shared_info.h (mount_info): Ditto for both of above.
680 * sys/mount.h (MOUNT_DEVFS): New enum.
681 (MOUNT_PROC): Ditto.
682
2e2dcba3
CF
6832002-06-08 Christopher Faylor <cgf@redhat.com>
684
685 * include/wchar.h: Define __need_size_t.
686
9cde3cf3
CF
6872002-06-07 Christopher Faylor <cgf@redhat.com>
688
689 * fhandler_socket.cc (fhandler_socket::fstat): Don't assume that socket
690 is unix-domain socket.
691
6922002-06-07 Christopher Faylor <cgf@redhat.com>
693
694 * times.cc (hires_ms::prime): Set init flag.
695
6962002-06-07 Conrad Scott <conrad.scott@dsl.pipex.com>
697
698 * times.cc (hires_ms::prime): Adjust epoch of initime_us from 1601 to
699 1970.
700
9d0efbb3
CF
7012002-06-06 Christopher Faylor <cgf@redhat.com>
702
703 * autoload.cc (timeGetDevCaps): Define new autoload function.
704 (timeGetTime): Ditto.
705 (timeBeginPeriod): Ditto.
706 (timeEndPeriod): Ditto.
707 * hires.h (hires_base): New class. Renamed from hires.
708 (hires_us): New class.
709 (hires_ms): New class.
710 * strace.cc (strace::microseconds): Use hires_us class.
711 * times.cc (gettimeofday): Use hires-ms class.
712 (hires_us::prime): Renamed from hires::prime.
713 (hires_us::usecs): Renamed from hires:usecs.
714 (hires_ms::prime): New method.
715 (hires_ms::usecs): New method.
716 (hires_ms::~hires_ms): New destructor.
717
46b941fc
CF
7182002-06-06 Christopher Faylor <cgf@redhat.com>
719
720 * autoload.cc (noload): Correctly save argument count register.
721
c4e6ff48
CV
7222002-06-05 Conrad Scott <conrad.scott@dsl.pipex.com>
723
724 * fhandler.cc (fhandler_base::fstat): Initialise tv_nsec member of
725 st_atim, st_mtim, and st_ctim fields.
726 * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Ditto.
727 * fhandler_process.cc (fhandler_process::fstat): Ditto.
46b941fc
CF
728 * glob.c (stat32_to_STAT): Copy across the whole st_atim, st_mtime, and
729 st_ctim fields.
c4e6ff48
CV
730 * syscalls.cc (stat64_to_stat32): Ditto.
731 * times.cc (to_timestruc_t): New function.
732 (time_as_timestruc_t): New function.
733 * winsup.h: Add to_timestruc_t and time_as_timestruc_t functions.
46b941fc
CF
734 * include/cygwin/stat.h: Replace time_t with timestruc_t throughout for
735 all file times, removing the st_spare1, st_spare2, and st_spare3 fields
736 in the process. Add macros to access tv_sec fields by old names.
737 * include/cygwin/types.h: Typedef timespec_t and timestruc_t as struct
738 timespec.
c4e6ff48 739
2e8abfc1
CV
7402002-06-03 Pierre Humblet <pierre.humblet@ieee.org>
741
742 * sec_helper.cc (lookup_name): Suppress.
743 * security.cc (alloc_sd): Remove logsrv argument.
744 Remove two calls to lookup_name.
745 (set_security_attribute): Remove logsrv argument.
746 Remove logsrv argument in call to alloc_sd.
747 (set_nt_attribute): Remove logsrv argument.
748 Remove logsrv argument in call to set_security_attribute.
749 (set_file_attribute): Remove logsrv argument.
750 Remove logsrv argument in call to set_nt_attribute.
751 (set_file_attribute): Remove logsrv argument.
752 Remove logsrv argument in call to set_file_attribute.
753 * syscalls.cc (chown_worker): Remove logserver argument in
754 call to set_file_attribute.
755 (chmod): Ditto.
756 * shm.cc (shmget): Remove logsrv argument in call to alloc_sd.
757 * uinfo.cc (internal_getlogin): Replace calls to
758 lookup_name by call to LookupAccountName.
759 * security.h: Remove logsrv in declarations of set_file_attribute
760 and alloc_sd. Remove declaration of lookup_name.
761
f7a7cc90
CF
7622002-06-05 Christopher Faylor <cgf@redhat.com>
763
764 * child_info.h (CHILD_INFO_MAGIC): Oops. Revert previous change. gcc
765 3.1 bug?
766
784e340c
CF
7672002-06-05 Christopher Faylor <cgf@redhat.com>
768
769 * child_info.h (CHILD_INFO_MAGIC): Update.
770
58fcd93a
CF
7712002-06-05 Christopher Faylor <cgf@redhat.com>
772
773 * strace.cc (strace::hello): Set inited, when appropriate.
774
ee964e2f
CF
7752002-06-05 Christopher Faylor <cgf@redhat.com>
776
777 * cygwin.din: Eliminate some newlib wrappers.
778 * path.cc (get_devn): Only consider first 99 potential com devices.
779 (get_device_number): Ditto.
780 * times.cc (_times): Eliminate.
781 (_times): Renamed from times().
782
ea4e6ec8
CF
7832002-06-05 Christopher Faylor <cgf@redhat.com>
784
785 * dir.cc (rmdir): Streamline. Detect attempts to remove directories
786 from "read-only" virtual devices. (Suggested by Pavel Tsekov)
46b941fc
CF
787 * syscalls.cc (unlink): Detect attempts to remove directories from
788 "read-only" virtual devices. (From Pavel Tsekov)
ea4e6ec8 789
2bb6b3e5
CF
7902002-06-05 Christopher Faylor <cgf@redhat.com>
791
792 * dtable.cc (handle_to_fn): Check error return value from NtQueryObject
793 first before seeing if name buffer is NULL.
794
795 * grp.cc (read_etc_group): Fix gcc warning regarding snprintf format.
796 * passwd.cc (read_etc_passwd): Ditto.
797
e9259cb2
RC
7982002-04-18 Thomas Pfaff <tpfaff@gmx.net>
799
800 * thread.h (pthread::joiner): New member.
801 * thread.cc (pthread::pthread): Initialize joiner to NULL
802 (pthread::create): Increment of thread counter moved from
803 __pthread_create to this location.
804 (__pthread_create): Increment thread counter removed.
805 (thread_init_wrapper): Set joiner to self when thread was created
806 detached.
807 (__pthread_exit): delete thread when it is detached and not
808 joined.
809 (__pthread_join): Check for deadlock and delete thread when it has
810 terminated.
811 (__pthread_detach): Set joiner to self when thread state
812 changed to detached.
813
eceee297
CV
8142002-06-05 Corinna Vinschen <corinna@vinschen.de>
815
816 * grp.cc (read_etc_group): When emulating nonexisting group file on
817 NT systems, read primary group SID from process token. Use that info
818 to create correct group entry. On error or on 9x systems fallback
819 to emulating Administrators group as before.
ae1ebb81 820 * passwd.cc (read_etc_passwd): When emulating nonexisting passwd file
46b941fc 821 on NT systems, read user and primary group SID from process token.
ae1ebb81
CV
822 Use that info to create correct passwd entry. On error or on 9x
823 systems fallback to emulating user with Administrator user id and
824 Administrators group as before.
eceee297 825
38f39368
CV
8262002-06-05 Corinna Vinschen <corinna@vinschen.de>
827
828 * grp.cc (etc_group): Removed.
829 (parse_grp): Make line parameter nonconst. Don't copy data into new
830 allocated memory. Check for CR instead of LF to accomodate new
831 read method.
832 (add_grp_line): Make line parameter nonconst.
833 (read_etc_group): Rearrange using new pwdgrp_read class.
834 * passwd.cc (parse_pwd): Don't copy data into new allocated memory.
835 Check for CR instead of LF to accomodate new read method.
836 (read_etc_passwd): Rearrange using new pwdgrp_read class.
837 * pwdgrp.h (pwdgrp_check::set_last_modified): Use different
838 parameters.
839 (class pwdgrp_read): New class for opening and reading passwd and
840 group files.
841
ce006ffa
CF
8422002-06-04 Christopher Faylor <cgf@redhat.com>
843
844 * dtable.cc (handle_to_fn): Attempt to handle "raw" accesses to remote
845 shares.
846 * path.cc (mount_info::conv_to_win32_path): Set flags to binary when
847 mount entry is not found.
848 (mount_info::set_flags_from_win32_path): Ditto.
849
147d2ab4
CF
8502002-06-04 Christopher Faylor <cgf@redhat.com>
851
852 * dtable.cc (handle_to_fn): Correct placement and length of name
ea4e6ec8 853 buffer. (Suggested by Pavel Tsekov)
147d2ab4 854
e35f391f
CF
8552002-06-04 Christopher Faylor <cgf@redhat.com>
856
857 Remove fcntl.h includes throughout.
858 * fhandler.h: Move fcntl.h include here.
859 (fhandler_base::set_flags): Accept supplied_bin argument. Make
860 non-inlined.
861 * dtable.cc (dtable::init_std_file_from_handle): Just use binmode from
862 pc.
863 (reset_to_open_binmode): Use set_flags.
864 * cygwin.din (open): Avoid newlib wrapper.
865 (read): Ditto.
866 (unlink): Ditto.
867 (write): Ditto.
868 * fhandler.cc (fhandler_base::set_flags): Accept supplied_bin argument.
869 Make binmode decisions here.
870 (fhandler_base::open): Avoid using pc if it is NULL. Eliminate binmode
871 logic. Just call set_flags with binmode argument.
872 (fhandler_base::init): Call set_flags with binmode argument.
873 * fhandler_clipboard.cc (fhandler_dev_clipboard::open): Ditto.
874 * fhandler_console.cc (fhandler_console::open): Ditto.
875 (fhandler_console::init): Force binary on open.
876 * fhandler_disk_file.cc (fhandler_disk_file::open): Don't set binmode
877 here. Let it happen in base class.
878 * fhandler_dsp.cc (fhandler_dev_dsp::open): Force binmode open. Set
879 return value appropriately if unable to open.
880 * fhandler_proc.cc (fhandler_proc::open): Make sure flags are set
881 before open_status.
882 * fhandler_process.cc (fhandler_process::open): Ditto.
883 * fhandler_registry.cc (fhandler_registry::open): Ditto.
884 * fhandler_random.cc (fhandler_dev_random::fhandler_dev_random): Ditto.
885 * fhandler_raw.cc (fhandler_dev_raw::open): Force O_BINARY by default.
886 * fhandler_serial.cc (fhandler_serial::init): Ditto.
887 * fhandler_tty.cc (fhandler_tty_slave::open): Ditto.
888 (fhandler_pty_master::open): Ditto.
889 * fhandler_virtual.cc (fhandler_virtual::open): Ditto.
890 * fhandler_windows.cc (fhandler_windows::open): Ditto.
891 * fhandler_zero.cc (fhandler_dev_zero::open): Ditto.
892 * net.cc (fdsock): Ditto.
893 * path.cc (path_conv::check): Avoid checking for executable extension
894 when directory. (Suggested by Pavel Tsekov)
895 (set_flags): Set PATH_TEXT explicitly, when appropriate.
896 (mount_info::conv_to_win32_path): Use set_flags() to set path flags.
897 * path.h (PATH_TEXT): New enum.
898 (path_conv::binmode): Return appropriate constant based on binmode.
899 * pipe.cc (make_pipe): Set binmode to O_TEXT xor O_BINARY.
900 * syscalls.cc (setmode_helper): Make debugging message a little
901 clearer.
902 (setmode): Set binmode via set_flags.
903
4e138847
CV
9042002-06-04 Corinna Vinschen <corinna@vinschen.de>
905
906 * fhandler.h (class fhandler_socket): Add private method
907 fixup_after_fork (bool, HANDLE).
908 * fhandler_socket.cc (fhandler_socket::fixup_after_fork): Move
909 functionality to new private method. Add closing parent socket
910 if not called from dup(). Create method new calling private method
911 with appropriate parameter.
912 (fhandler_socket::fixup_after_exec): Call private method
913 fixup_after_fork with appropriate parameter.
914 (fhandler_socket::dup): Ditto.
915
9162002-06-04 Corinna Vinschen <corinna@vinschen.de>
6bfca3cc
CV
917
918 * fhandler_dsp.cc (fhandler_dev_dsp::open): Set errno to EACCES if
919 requested mode isn't supported.
920
e02f1e9c
CF
9212002-06-03 Christopher Faylor <cgf@redhat.com>
922
923 * fhandler.cc (fhandler_base::open): Don't set binmode if already set.
924 Don't check for file. Files should already be set. Report on binary
925 mode for debugging.
926 (fhandler_base::fhandler_base): Don't set default binmode here. That's
927 for later.
928 * fhandler_console.cc (fhandler_console::output_tcsetattr): Don't set
929 binmode, ever, for console.
930 * fhandler_disk_file.cc (fhandler_disk_file::open): Always set the
931 binary mode to the value derived from mount table.
932 * path.cc (mount_info::conv_to_win32_path): Default to binmode if path
933 does not translate into anything in the mount table.
934
31b98a62
CV
9352002-06-03 Corinna Vinschen <corinna@vinschen.de>
936
937 * external.cc (cygwin_internal): Add CW_EXTRACT_DOMAIN_AND_USER
938 handling to call extract_nt_dom_user() from applications.
939 * include/sys/cygwin.h (cygwin_getinfo_types): Add
940 CW_EXTRACT_DOMAIN_AND_USER.
941
b3c29731
CV
9422002-06-03 Corinna Vinschen <corinna@vinschen.de>
943
944 * syscalls.cc (stat64_to_stat32): Transform st_dev correctly.
945 (fstat64): Add evaluating st_ino and st_dev.
946 (stat_worker): Evaluate st_dev as 32 bit value.
947 * include/cygwin/stat.h: Use new dev_t definition throughout.
948 * include/cygwin/types.h: Define __dev16_t and __dev32_t. Define
949 dev_t according to __CYGWIN_USE_BIG_TYPES__ setting.
950 * include/sys/sysmacros.h: Define major, minor and makedev
951 according to __CYGWIN_USE_BIG_TYPES__ setting.
952
656c3192
CV
9532002-06-03 Pierre Humblet <pierre.humblet@ieee.org>
954
955 * syscalls.cc (setegid32): Verify the correctness of the gid
956 of the group returned by getgrgid32.
957
1eb934b7
CV
9582002-06-03 Pierre Humblet <pierre.humblet@ieee.org>
959
960 * security.cc (lsa2wchar): Suppressed.
961 (get_lsa_srv_inf): Suppressed.
962 (get_logon_server_and_user_domain): Suppressed.
963 (get_logon_server): Essentially new.
964 (get_user_groups): Add "domain" argument. Only lookup the
965 designated server and use "domain" in LookupAccountName.
966 (is_group_member): Simplify the arguments.
967 (get_user_local_groups): Simplify the arguments. Do only a
968 local lookup. Use "BUILTIN" and local domain in LookupAccountName.
969 (get_user_primary_group). Only lookup the designated server.
970 (get_group_sidlist): Remove logonserver argument. Do not lookup
971 any server for the SYSTEM account.
972 (create_token): Delete logonserver and call to get_logon_server.
973 Adjust arguments of get_group_sidlist, see above.
974 * security.h: Delete declaration of get_logon_server_and_user_domain
e35f391f 975 and add declaration of get_logon_server.
1eb934b7
CV
976 * uinfo.cc (internal_get_login): Call get_logon_server instead of
977 get_logon_server_and_user_domain.
978
37be5a67
CF
9792002-06-02 Christopher Faylor <cgf@redhat.com>
980
e35f391f
CF
981 * dtable.cc (handle_to_fn): Use largest match for device. Correctly
982 (?) deal with remote drive weirdness.
37be5a67 983
97478fe6
CF
9842002-06-02 Christopher Faylor <cgf@redhat.com>
985
986 * fhandler_disk_file.cc (fhandler_disk_file::fstat_by_name): Check
987 specifically for non-existent file, first.
988 (fhandler_disk_file::fstat): Perform fd open on files with funny
989 characters.
990
47413f84
CF
9912002-06-02 Christopher January <chris@atomice.net>
992
993 * fhandler_process.cc (fhandler_process::open): Set fileid.
994
6b7cd251
CF
9952002-06-02 Christopher Faylor <cgf@redhat.com>
996
997 Remove unneeded sigproc.h includes throughout.
998 * fhandler.h (fhandler_proc::fill_filebuf): Take a pinfo argument.
999 * fhandler_proc.cc (fhandler_proc::get_proc_fhandler): Simplify search
1000 for given pid.
1001 (fhandler_proc::readdir): Assume that pid exists if it shows up in the
1002 winpid list.
1003 * fhandler_process.cc (fhandler_process::open): Simplify search for
1004 given pid. Call fill_filebuf with pinfo argument.
1005 (fhandler_process::fill_filebuf): Pass pinfo here and assume that it
1006 exists.
1007 * pinfo.h (pinfo::remember): Define differently if sigproc.h is not
1008 included.
1009
10102002-06-02 Christopher Faylor <cgf@redhat.com>
1011
1012 * dll_init.cc (dll_list::detach): Don't run destructor on exit.
1013
e065a187
CF
10142002-06-01 Christopher Faylor <cgf@redhat.com>
1015
1016 * fhandler.cc (fhandler_base::fstat): Move dev and ino calculation into
1017 caller.
1018 * syscalls.cc (stat_worker): Calculate dev and ino calculation here, if
1019 zero.
1020 * fhandler_proc.cc (fhandler_proc::fhandler_proc): Minor reorg for
1021 debugging.
1022 * fhandler_process.cc (fhandler_process::exists): Return 0 on
1023 nonexistence.
1024 (fhandler_process::fstat): Simplify pid logic.
1025 * fhandler_tape.cc (fhandler_dev_tape::fstat): Minor reformatting.
1026
60abf1c4
CF
10272002-06-01 Christopher Faylor <cgf@redhat.com>
1028
1029 * path.cc (chdir): Don't allow cd'ing to a non-directory virtual path.
1030
28af03fa
CF
10312002-05-31 Christopher Faylor <cgf@redhat.com>
1032
1033 * fhandler_disk_file.cc (readdir): Move inode calculation into caller.
1034 (fhandler_cygdrive::readdir): Add "." and "..".
1035 * dir.cc (readdir): Move inode calculation here so that fhandler
1036 readdirs can benefit.
1037
8e74c320
CF
10382002-05-31 Christopher Faylor <cgf@redhat.com>
1039
1040 * fhandler_console.cc (fhandler_console::open): Reinstate setting of
1041 flags.
1042
30478f15
CF
1043 * dtable.cc (dtable::init_std_file_from_handle): Default to using
1044 binmode derived from path_conv, when required.
1045 * fhandler.h (fhandler_base::get_w_binary): Default to binmode if
1046 nothing else is specified.
1047 * fhandler.h (fhandler_base::get_r_binary): Ditto.
1048
1049 * fhandler_disk_file.cc (fhandler_disk_file::fstat_by_handle): Work
1050 around g++ warning.
1051
1052 * path.cc (path_conv::check): Remove a debugging statement.
1053
de86e35b
CF
10542002-05-31 Christopher Faylor <cgf@redhat.com>
1055
1056 * fhandler_console.cc (fhandler_console::open): Always default to
1057 binmode.
1058 (fhandler_console::write_normal): Don't honor binmode setting. There
1059 is already a termios setting for this.
1060 (fhandler_console::init): Correct argument order in init call.
1061
8461f41e
CF
10622002-05-31 Christopher Faylor <cgf@redhat.com>
1063
1064 * fhandler.cc (fhandler_base::open): Make default open mode == binmode.
1065 (fhandler_base::init): Set open flags based on derived binmode argument.
1066
bcd0ed9f
CF
10672002-05-31 Christopher Faylor <cgf@redhat.com>
1068
1069 * dll_init.cc (dll_list::init): Eliminate unneeded debugging statement.
1070
18c04cc4
CF
10712002-05-31 Christopher Faylor <cgf@redhat.com>
1072
1073 * fhandler_proc.cc (fhandler_proc::readdir): Set errno when no more
1074 files.
1075 * fhandler_process.cc (fhandler_process::readdir): Ditto.
1076 * fhandler_registry.cc (fhandler_registry::readdir): Ditto.
1077
69be001c
CF
10782002-05-30 Christopher Faylor <cgf@redhat.com>
1079
1080 * path.cc (path_conv::check): Set fileattr to INVALID_FILE_ATTRIBUTES
1081 for nonexistent virtual device path.
1082 (chdir): Set correct errno when attempt is made to cd to nonexistent
1083 virtual device path.
1084
5d8c7a56
CF
10852002-05-30 Christopher Faylor <cgf@redhat.com>
1086
1087 * fhandler_disk_file.cc (fhandler_disk_file::fstat): Always call
1088 fstat_by_name if fd is not opened to allow fstat_by_name to properly
1089 set errno.
1090
d74eced5
CV
10912002-05-30 Corinna Vinschen <corinna@vinschen.de>
1092
1093 * autoload.cc: Replace autoload statments for ZwXXX by NtXXX.
1094 Drop ZwQuerySystemInformation since NtQuerySystemInformation was
1095 already available.
1096 * fhandler_proc.cc (format_proc_uptime): Replace call to
1097 ZwQuerySystemInformation by call to NtQuerySystemInformation.
1098 (format_proc_stat): Ditto.
1099 * fhandler_process.cc (format_process_stat): Replace call to
1100 ZwQueryInformationProcess by call to NtQueryInformationProcess.
1101 (get_process_state): Ditto.
1102 (get_mem_values): Ditto. Replace call to ZwQueryVirtualMemory by
1103 call to NtQueryVirtualMemory.
1104 * ntdll.h: Cleanup. Drop ZwQuerySystemInformation since
1105 NtQuerySystemInformation was already available. Replace declarations
1106 of ZwXXX functions by declarations of NtXXX.
1107 * pinfo.cc (winpids::enumNT): Replace call to ZwQuerySystemInformation
1108 by call to NtQuerySystemInformation.
1109
5d8c7a56
CF
11102002-05-29 Christopher Faylor <cgf@redhat.com>
1111
1112 * fhandler.cc (binmode): Default to binmode when mode is not known.
1113
186637a5
CF
11142002-05-29 Christopher Faylor <cgf@redhat.com>
1115
1116 * include/sys/cygwin.h (EXTERNAL_PINFO_VERSION): Reinstate.
1117 * external.cc (fillout_pinfo): Use it.
1118
3a571063
CV
11192002-05-29 Corinna Vinschen <corinna@vinschen.de>
1120
1121 * external.cc (fillout_pinfo): Use new version define.
1122 * include/sys/cygwin.h (external_pinfo): Define
1123 EXTERNAL_PINFO_VERSION_16_BIT and EXTERNAL_PINFO_VERSION_32_BIT
1124 instead of just EXTERNAL_PINFO_VERSION.
1125
9fef0139
CF
11262002-05-29 Christopher Faylor <cgf@redhat.com>
1127
1128 * external.cc (fillout_pinfo): Set new version field in external_pinfo
1129 structure.
1130 * include/sys/cygwin.h (external_pinfo): Replace strace_file with
1131 version field.
1132
a8d7ae61
CV
11332002-05-29 Corinna Vinschen <corinna@vinschen.de>
1134
1135 Change internal uid datatype from __uid16_t to __uid32_t
1136 throughout.
1137 * cygwin.din: Export new symbols getpwuid32, getpwuid_r32, getuid32,
1138 geteuid32, setuid32, seteuid32.
1139 * passwd.cc (getpwuid32): New function.
1140 (getpwuid_r32): Ditto.
1141 * syscalls.cc (seteuid32): Ditto.
1142 (setuid32): Ditto.
1143 * uinfo.cc (getuid32): Ditto.
1144 (geteuid32): Ditto.
d4000bc4 1145 * winsup.h (uid16touid32): New macro, correct casting from __uid16_t
a8d7ae61
CV
1146 to __uid32_t.
1147 (gid16togid32): Ditto fir gids.
1148 (getuid32): Declare.
1149 (geteuid32): Ditto.
1150 (getpwuid32): Ditto.
1151 * include/sys/cygwin.h (struct external_pinfo): Add members uid32 and
1152 gid32.
1153
9854c44c
CV
11542002-05-29 Corinna Vinschen <corinna@vinschen.de>
1155
1156 * include/cygwin/socket.h: Protect some symbols against multiple
1157 definition.
1158 * include/netinet/ip.h: Ditto.
1159 * include/netinet/tcp.h: Ditto.
1160
11612002-05-29 Wu Yongwei <adah@netstd.com>
1162
1163 * include/netinet/ip.h: Replace by BSD derived version of the file.
1164 * include/netinet/tcp.h: Ditto.
1165 * include/netinet/udp.h: New file.
1166 * include/cygwin/ip.h: Remove.
1167
cef69559
CF
11682002-05-29 Christopher Faylor <cgf@redhat.com>
1169
1170 * dtable.cc (dtable::init_std_file_from_handle): Attempt stronger
1171 detection of invalid handle.
1172 (handle_to_fn): Detect pathological condition where NT resets the
1173 buffer pointer to NULL on an invalid handle.
1174
a761ad82
CF
11752002-05-28 Christopher Faylor <cgf@redhat.com>
1176
1177 * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Properly
1178 check for whether we should be opening the file to search for #!
654783b6
CF
1179 characters. Set path_conv structure execability, too, when
1180 appropriate.
a761ad82 1181
7ea70e99
CV
11822002-05-28 Corinna Vinschen <corinna@vinschen.de>
1183
1184 * security.cc (set_security_attribute): Call getegid32() instead of
1185 getegid().
1186 * include/cygwin/grp.h: Declare getegid32().
1187
57196405
CV
11882002-05-28 Corinna Vinschen <corinna@vinschen.de>
1189
1190 Change internal gid datatype from __gid16_t to __gid32_t
1191 throughout.
1192 * cygwin.din: Export new symbols chown32, fchown32, getegid32,
1193 getgid32, getgrgid32, getgrnam32, getgroups32, initgroups32, lchown32,
1194 setgid32, setegid32, getgrent32.
1195 * grp.cc (grp32togrp16): New static function.
1196 (getgrgid32): New function.
1197 (getgrnam32): Ditto.
1198 (getgrent32): Ditto.
1199 (getgroups32): Change name of internal function from getgroups.
1200 (getgroups32): New function.
1201 (initgroups32): Ditto.
1202 * syscalls.cc (chown32): Ditto.
1203 (lchown32): Ditto.
1204 (fchown32): Ditto.
1205 (setegid32): Ditto.
1206 (setgid32): Ditto.
1207 * uinfo.cc (getgid32): Ditto.
1208 (getegid32): Ditto.
1209 * include/cygwin/grp.h: Remove declaration of getgrgid() and getgrnam().
1210 Declare getgrgid32() and getgrnam32() instead. Declare getgid32().
1211
0c12979b
CF
12122002-05-27 Christopher Faylor <cgf@redhat.com>
1213
1214 * autoload.cc (noload): Properly mask low order word for determining
1215 number of bytes to pop.
1216
57e2ae68
CF
12172002-05-27 Christopher Faylor <cgf@redhat.com>
1218
1219 * fhandler_disk_file.cc (fhandler_disk_file::fstat): Minor logic
1220 cleanup.
1221
2402700d
CF
12222002-05-27 Christopher Faylor <cgf@redhat.com>
1223
1224 * autoload.cc (LoadFuncEx): Define via new LoadFuncEx2 macro.
1225 (LoadFuncEx2): Adapted from LoadFuncEx. Provides control of return
1226 value for nonexistent function.
1227 (NtQueryObject): Declare.
1228 (IsDebuggerPresent): Declare via LoadFuncEx2 and always return true if
1229 not available.
1230 * debug.h (being_debugged): Just rely on IsDebuggerPresent return
1231 value.
1232 * dtable.cc (handle_to_fn): New function.
1233 (dtable::init_std_file_from_handle): Attempt to derive std handle's
1234 name via handle_to_fn.
1235 (dtable::build_fhandler_from_name): Fill in what we can in path_conv
1236 structure when given a handle and path doesn't exist.
1237 * fhandler.cc (fhandler_base::open): Don't set the file pointer here.
1238 Use pc->exists () to determine if file exists rather than calling
1239 GetFileAttributes again.
1240 * fhandler.h (fhandler_base::exec_state_isknown): New method.
1241 (fhandler_base::fstat_helper): Add extra arguments to declaration.
1242 (fhandler_base::fstat_by_handle): Declare new method.
1243 (fhandler_base::fstat_by_name): Declare new method.
1244 * fhandler_disk_file (num_entries): Make __stdcall.
1245 (fhandler_base::fstat_by_handle): Define new method.
1246 (fhandler_base::fstat_by_name): Define new method.
1247 (fhandler_base:fstat): Call fstat_by_{handle,name} as appropriate.
1248 (fhandler_disk_file::fstat_helper): Accept extra arguments for filling
1249 out stat structure. Move handle or name specific stuff to new methods
1250 above.
1251 (fhandler_disk_file::open): Use real_path->exists rather than calling
1252 GetFileAttributes again.
1253 * ntdll.h (FILE_NAME_INFORMATION): Define new structure.
1254 (OBJECT_INFORMATION_CLASS): Partially define new enum.
1255 (OBJECT_NAME_INFORMATION): Define new structure.
1256 (NtQueryInformationFile): New declaration.
1257 (NtQueryObject): New declaration.
1258 * path.cc (path_conv::fillin): Define new method.
1259 * path.h (path_conv::fillin): Declare new method.
1260 (path_conv::drive_thpe): Rename from 'get_drive_type'.
1261 (path_conv::volser): Declare new method.
1262 (path_conv::volname): Declare new method.
1263 (path_conv::root_dir): Declare new method.
1264 * syscalls.cc (fstat64): Send real path_conv to fstat as second
1265 argument.
1266
74b2f73e
CV
12672002-05-24 Pierre Humblet <pierre.humblet@ieee.org>
1268
1269 * security.cc (lsa2str): New function.
1270 (get_priv_list): Call lsa2str instead of sys_wcstombs.
1271
75bf2931
CV
12722002-05-22 Pierre Humblet <pierre.humblet@ieee.org>
1273
1274 * syscalls.cc (seteuid): Do not take allow_ntsec into account.
1275 Attempt to use an existing or new token even when the uid
1276 matches orig_uid, but the gid is not in the process token.
1277 Major reorganization after several incremental changes.
1278 (setegid): Do not take allow_ntsec into account. Minor
1279 reorganization after several incremental changes.
1280
918a268c
CF
12812002-05-26 Christopher Faylor <cgf@redhat.com>
1282
1283 * debug.h (being_debugged): New macro.
1284 * dtable.cc (dtable::extend): Use new macro.
1285 * exceptions.cc (try_to_debug): Ditto.
1286 * strace.cc (strace::hello): Only output debugging info when we think
1287 we're being debugged.
1288
0cfbfc24
CF
12892002-05-25 Robert Collins <rbtcollins@hotmail.com>
1290
1291 * winsup.h: Remove duplicate declarations of malloc_lock and
1292 malloc_unlock.
1293
d7b4a300
CF
12942002-05-24 Christopher Faylor <cgf@redhat.com>
1295
1296 Remove unneeded sync.h, where appropriate, throughout.
1297 Remove unneeded heap.h, where appropriate, throughout.
1298 Remove unneeded exceptions.h, where appropriate, throughout.
1299 Remove unneeded perprocess.h, where appropriate, throughout.
1300
908f9b65
CV
13012002-05-22 Pierre Humblet <pierre.humblet@ieee.org>
1302
1303 * security.cc (create_token): Call __sec_user() instead of
1304 sec_user() to remove dependence on allow_ntsec. Verify that
1305 the returned sd is non-null.
1306
a6247be9
RC
13072002-05-25 Robert Collins <rbtcollins@hotmail.com>
1308
1309 * gmon.c (fake_sbrk): Correctly return -1 on failed malloc's.
1310
ff938546
CF
13112002-05-24 Christopher Faylor <cgf@redhat.com>
1312
1313 * dtable.cc (dtable::build_fhandler_from_name): Just pass posix path
1314 along to set_name via return_and_clear_normalized_path.
1315 (dtable::build_fhandler): New method with const char * argument.
1316 (dtable::reset_unix_path_name): Eliminate.
1317 (dtable::dup_worker): Use correct build_fhandler method.
1318 * mmap.cc (mmap_record::alloc_fh): Ditto.
1319 * dtable.h (dtable::build_fhandler): New method.
1320 (dtable::reset_unix_path_name): Eliminate.
1321 * fhandler.cc (fhandler_base::set_name): Assume that unix_name has
1322 already been cmalloced.
1323 (fhandler_base::reset_unix_path_name): Eliminate.
1324 (fhandler_base::~fhandler_base): Coercion for cfree.
1325 * fhandler.h (fhandler_base::unix_path_name): Make const char *.
1326 (fhandler_base::win32_path_name): Ditto.
1327 (fhandler_base::reset_unix_path_name): Eliminate.
1328 * fhandler_disk_file.cc (fhandler_cygdrive::set_drives): Accommodate
1329 const char *ness of win32_path_name.
1330 * fhandler_socket.cc (fhandler_socket::fstat): Accommodate new set_name
1331 requirements.
1332 * path.cc (path_conv::return_and_clear_normalized_path): New method.
1333 (path_conv::clear_normalized_path): Eliminate.
1334 (path_conv::~path_conv): Ditto.
1335 (path_conv::check): Accommodate new build_fhandler method.
1336 * path.h (path_conv::~path_conv): Eliminate.
1337 (path_conv::clear_normalized_path): Ditto.
1338 (path_conv::return_and_clear_normalized_path): Declare new method.
1339
b4bb31ad
CF
13402002-05-23 Christopher Faylor <cgf@redhat.com>
1341
1342 * path.cc (path_conv::check): Make sure any trailing path component is
1343 part of potential normalized posix path.
1344
b2f338e9
CF
13452002-05-23 Christopher Faylor <cgf@redhat.com>
1346
1347 * smallprint.c (__small_vsprintf): Implement '%o' after all these
1348 years.
1349
fc240f58
CF
13502002-05-22 Christopher Faylor <cgf@redhat.com>
1351
1352 * fhandler.h (fhandler_virtual::exists): Eliminate path argument.
1353 (fhandler_proc::exists): Ditto.
1354 (fhandler_registry::exists): Ditto.
1355 (fhandler_process::exists): Ditto.
1356 * fhandler_proc.cc (fhandler_proc::exists): Ditto. Use built-in name.
1357 * fhandler_process.cc (fhandler_process::exists): Ditto.
1358 (fstat): Ditto.
1359 * fhandler_registry.cc (fhandler_registry::exists): Ditto.
1360 (fhandler_registry::fstat): Ditto.
1361 * fhandler_virtual.cc (fhandler_virtual::opendir): Ditto.
1362 * path.cc (path_conv::check): Ditto. Add debugging.
1363
13642002-05-22 Christopher Faylor <cgf@redhat.com>
1365
1366 * syscalls.cc (dup): Always call dup2 for error handling.
1367
1d2b71d6
CV
13682002-05-22 Corinna Vinschen <corinna@vinschen.de>
1369
1370 * include/cygwin/types.h: Revert previous patch.
1371
36f86a55
CV
13722002-05-22 Corinna Vinschen <corinna@vinschen.de>
1373
1374 * include/cygwin/types.h: Define pthread stuff only if _POSIX_THREADS
1375 is defined.
1376
2d6ce5c2
CV
13772002-05-19 Pierre Humblet <pierre.humblet@ieee.org>
1378
fc240f58 1379 * security.cc (open_local_policy): Initialize lsa to
2d6ce5c2
CV
1380 INVALID_HANDLE_VALUE instead of NULL.
1381 (get_logon_server_and_user_domain): Test for INVALID_HANDLE_VALUE
1382 instead of NULL.
1383 (create_token): Both of the above.
1384
9ded8bd8
CF
13852002-05-18 Christopher Faylor <cgf@redhat.com>
1386
1387 * fhandler_disk_file.cc (fhandler_disk_file::fstat): Make handling of
1388 nlink consistent for remote files.
1389
2701126a
CF
13902002-05-18 Christopher Faylor <cgf@redhat.com>
1391
1392 * path.cc (path_conv::check): Always set executable bit for executable
1393 extension.
1394
b05b7d84
CF
13952002-05-17 Christopher Faylor <cgf@redhat.com>
1396
1397 * fhandler.cc (fhandler_base::lseek): Avoid calling SetFilePointer with
1398 high order part of 64 bit address on OS's which do not support that
1399 kind of operation. Otherwise Windows 95 will become confused.
1400
d6dc9825
CV
14012002-05-16 Pierre Humblet <pierre.humblet@ieee.org>
1402
1403 * fhandler_raw.cc (fhandler_dev_raw::open): Replace set_errno()
1404 by __seterrno_from_win_error().
1405 * security.cc (open_local_policy): Ditto.
1406 (get_lsa_srv_inf): Ditto.
1407 (get_user_groups): Ditto.
1408 (get_user_primary_group): Ditto.
1409 (create_token): Ditto.
1410 (subauth): Ditto.
1411
35a89cbe
CV
14122002-05-17 Corinna Vinschen <corinna@vinschen.de>
1413
1414 * times.cc (utimes): Use FILE_WRITE_ATTRIBUTES even on 9x/Me when
1415 opening file for writing timestamp.
1416 * wincap.cc: Remove flag has_specific_access_rights.
1417 * wincap.h: Ditto.
1418
ebbdc703
CV
14192002-05-13 Pierre Humblet <pierre.humblet@ieee.org>
1420
1421 * syscalls.cc (seteuid): Set default dacl in process token.
1422 Replace in-line code by call to verify_token().
1423 (setegid): Reverse change from 2002-01-21. Add call to
1424 RevertToSelf and set primary group in impersonation token.
1425 * security.cc (create_token): Store pgrpsid in token security
1426 descriptor, except if it already appears in my_grps.
1427 Use sec_acl() in place of get_dacl().
1428 (verify_token): Create from code in seteuid(), with tighter checks.
c2102631 1429 (get_dacl): Deleted.
ebbdc703
CV
1430 (get_group_sidlist): Add argument to indicate if pgrpsid is already
1431 in the groups.
1432 * security.h: Define verify_token().
1433 * autoload.cc: Load GetKernelObjectSecurity().
1434
feb7f1a9
CF
14352002-05-13 Mark Bradshaw <bradshaw@staff.crosswalk.com>
1436
1437 * cygwin.din: Add strlcat and strlcpy.
1438 * include/cygwin/version.h: Increment API minor version number.
1439
fc240f58 14402002-05-09 Pierre Humblet <pierre.humblet@ieee.org>
043bc3e1
CV
1441
1442 * shared.cc (__sec_user): Split into sec_acl() and call orig_sid().
1443 (sec_acl): Create from part of __sec_user(), except creator/owner.
1444 * security.h: Define sec_acl() and MAX_DACL_LEN.
1445
c8b20196
CF
14462002-05-12 Christopher Faylor <cgf@redhat.com>
1447
1448 * fhandler_disk_file.cc (fhandler_disk_file::open): Avoid using
1449 O_DIROPEN when OS doesn't support it. Return proper errno in that
1450 case.
1451
b4f8d31f
CF
14522002-05-12 Christopher Faylor <cgf@redhat.com>
1453
56caca1d
CF
1454 * syscalls.cc (_read): Change error to EBADF if attempt to read from a
1455 non-readable fd.
b4f8d31f 1456
29ee580d
CF
14572002-05-11 Christopher Faylor <cgf@redhat.com>
1458
1459 * fhandler.h (executable_states): For now, make dont_care_if_executable
1460 equivalent to not_executable.
1461 * sys/mount.h: Define MOUNT_NOTEXEC.
1462 * path.h (fs_info): New class.
1463 (path_conv): Move fs-specific fields to new 'fs' structure.
1464 (path_conv::update_fs_info): Move to fs_info and rename to just 'update'.
1465 * path.cc (fs_info::update): Ditto. Return 'true' if successful.
1466 (fillout_mntent): Add ',noexec' to list of reported options.
1467
b84621d2
CF
14682002-05-11 Christopher Faylor <cgf@redhat.com>
1469
1470 * fhandler_virtual.cc (fhandler_virtual::close): Quiet a compiler
1471 warning.
1472
9ba913a5
CF
14732002-05-10 Christopher January <chris@atomice.net>
1474
1475 * autoload.cc: Add dynamic load statements for
1476 'ZwQueryInformationProcess' and 'ZwQueryVirtualMemory'.
1477 * fhandler.h: Change type of bufalloc and filesize members of
1478 fhandler_virtual from int to size_t. Change type of position member
1479 from __off32_t to __off64_t. Add new fileid member to fhandler_virtual
1480 class. Make seekdir take an __off64_t argument. Make lseek take an
1481 __off64_t argument. Add fill_filebuf method to fhandler_virtual. Add
1482 fill_filebuf method to fhandler_proc. Add fill_filebuf method to
1483 fhandler_registry. Add fill_filebuf method to fhandler_process. Add
1484 saved_pid and saved_p members to fhandler_process.
1485 * fhandler_proc.cc (proc_listing_array): Add 'loadavg', 'meminfo', and 'stat'.
1486 (proc_fhandlers array): Ditto.
1487 (fhandler_proc::open): Use fill_filebuf to flesh out the file contents.
1488 (fhandler_proc::fill_filebuf): New method.
1489 (fhandler_proc::format_proc_meminfo): Ditto.
1490 (fhandler_proc::format_proc_stat): Ditto.
1491 (fhandler_proc::format_proc_uptime): Ditto.
1492 * fhandler_process.cc (process_listing): Add 'stat' and 'statm'.
1493 (fhandler_process::fstat): Find the _pinfo structure for the process
1494 named in the filename. Return ENOENT if the process is no longer
1495 around. Set the gid and uid fields of the stat structure.
1496 (fhandler_process::open): Store pid and pointer to _pinfo structure in
1497 saved_pid and saved_p respectively. Use fill_filebuf to flesh out file
1498 contents.
1499 (fhandler_proc::fill_filebuf): New method.
1500 (format_process_stat): New function.
1501 (format_process_status): Ditto.
1502 (format_process_statm): Ditto.
1503 (get_process_state): Ditto.
1504 (get_mem_values): Ditto.
1505 * fhandler_registry.cc (fhandler_registry::seekdir): Change argument
1506 type from __off32_t to __off64_t.
1507 (fhandler_registry::fill_filebuf): New method.
1508 * fhandler_virtual.cc (fhandler_virtual::seekdir): Change argument type
1509 from __off32_t to __off64_t.
1510 (fhandler_virtual::lseek): Ditto.
1511 (fhandler_virtual::fill_filebuf): New method.
1512 (fhandler_virtual::fhandler_virtual): Initialise fileid to -1.
1513 * wincap.cc: Set flag has_process_io_counters appropriately.
1514 * wincap.h: Add flag has_process_io_counters.
1515
15162002-05-09 Christopher Faylor <cgf@redhat.com>
f561f644
CF
1517
1518 * syscalls.cc (_write): Change error to EBADF if attempt to write to a
56caca1d 1519 non-writeable fd.
f561f644 1520
6327de5f
CV
15212002-05-08 Corinna Vinschen <corinna@vinschen.de>
1522
1523 * cygheap.h (class cygheap_user): Add member `orig_psid'.
1524 Add method `orig_sid()'.
1525 * cygheap.cc (cygheap_user::set_sid): Maintain orig_psid.
1526
795b46cf
CV
15272002-04-28 Norbert Schulze <norbert.schulze@web.de>
1528
1529 * localtime.cc (tzsetwall): Use wildabbr if generated timezone name
1530 length < 3.
1531
a9917779
CV
15322002-05-05 Pierre Humblet <pierre.humblet@ieee.org>
1533
1534 * spawn.cc (spawn_guts): Move call to set_process_privilege()
1535 to load_registry_hive().
1536 * registry.cc (load_registry_hive): ditto.
1537 * fork.cc (fork_parent): Call sec_user_nih() only once.
1538
15392002-05-04 Christopher January <chris@atomice.net>
13ee3618
CF
1540
1541 * path.h (path_conv::path_conv): Initialise normalized_path to NULL.
1542
8761c1dc
CF
15432002-05-03 Christopher Faylor <cgf@redhat.com>
1544
1545 * net.cc (getdomainname): Change second argument of getdomainname to
1546 size_t.
1547
15482002-05-03 Christopher January <chris@atomice.net>
1549
1550 * fhandler_proc.cc (proc_listing): Add '.' and '..' to directory
1551 listing.
1552 (fhandler_proc::open): Change use of mode to flags. If the file does
1553 not exist already, fail with EROFS if O_CREAT flag is set. Change
1554 EROFS error to EACCES error when writing to a file. Use cmalloc to
1555 allocate memory for filebuf.
1556 (fhandler_proc::close): Use cfree to free filebuf.
1557 (fhandler_proc::get_proc_fhandler): Properly detect attempts to access
1558 unknown subdir.
1559 * fhandler_process.cc (process_listing): Add '.' and '..' to directory
1560 listing.
1561 (fhandler_process::open): Use cmalloc to allocate memory for filebuf.
1562 (fhandler_process::close): Use cfree to free filebuf.
1563 * fhandler_registry.cc (registry_listing): Add . and '..' to directory
1564 listing.
1565 (fhandler_registry::open): Move check for open for writing before
1566 open_key. Use cmalloc to allocate memory for filebuf.
1567 (fhandler_registry::close): Use cfree to free filebuf.
1568 (fhandler_registry::telldir): Use lower 16 bits of __d_position as
1569 position in directory.
1570 (fhandler_registry::seekdir): Ditto.
1571 * fhandler_virtual.cc (fhandler_virtual::write): Change EROFS error to
1572 EACCES error.
1573 (fhandler_virtual::open): Set the NOHANDLE flag.
1574 (fhandler_virtual::dup): Add call to fhandler_base::dup. Allocate
1575 child's filebuf using cmalloc. Copy filebuf from parent to child.
1576 (fhandler_virtual::close): Use cfree to free filebuf.
1577 (fhandler_virtual::~fhandler_virtual): Ditto.
1578 (from Chris Faylor <cgf@redhat.com>).
1579 (fhandler_registry::readdir): Add support for '.' and '..' files in
1580 subdirectories of /proc/registry.
1581 * path.cc (path_conv::check): Do not return ENOENT if a file is not
1582 found in /proc.
1583
335c87f9
CF
15842002-05-02 Christopher Faylor <cgf@redhat.com>
1585
1586 * fhandler_proc.cc (fhandler_proc::fstat): Use fhandler name rather
1587 than path_conv name.
1588 (fhandler_proc::open): Ditto.
1589 * fhandler_process.cc (fhandler_process::fstat): Use fhandler name
1590 rather than path_conv name.
1591 (fhandler_process::open): Ditto.
1592 * fhandler_registry.cc (fhandler_registry::fstat): Use fhandler name
1593 rather than path_conv name.
1594 (fhandler_registry::open): Ditto.
1595 * path.cc (path_conv::check): Don't copy posix path when virtual.
1596 (mount_info::conv_to_win32_path): Don't zero string when isproc. Just
1597 derive normal windows path.
1598
1599 * path.h (path_conv::clear_normalized_path): Declare new method.
1600 * path.cc (path_conv::clear_normalized_path): Define new method.
1601 * dtable.cc (build_fhandler_from_name): Clear normalized path when
1602 finished to conserve space.
1603
3bb7eb44
CF
16042002-05-02 Christopher Faylor <cgf@redhat.com>
1605
1606 * fhandler_proc.cc (fhandler_proc::fstat): Prime with information from
1607 fhandler_base::fstat. Use defines rather than constants for permission
1608 settings.
1609
d055ecb0
CV
16102002-04-30 Eric Blake <ebb9@email.byu.edu>
1611
1612 * path.cc (hash_path_name): Improve hash function strength.
1613
37143995
RC
16142002-05-02 Robert Collins <rbtcollins@hotmail.com>
1615
1616 * thread.cc (__pthread_cond_dowait): Fix a race on signalling from a
1617 thread woken by the same condition variable it's signalling on. Thanks
1618 to Michael Beach for the report and test case.
1619
291be307
CF
16202002-05-02 Christopher Faylor <cgf@redhat.com>
1621
1622 * path.h (pathconv_arg): Add PC_POSIX.
1623 (path_conv): Add normalized_path field.
1624 * path.cc (path_conv::~path_conv): New destructor.
1625 (path_conv::check): Set normalized_path, where appropriate.
1626 * dtable.cc (build_fhandler_from_name): Use normalized path from
1627 path_conv.
1628 * syscalls.cc (chroot): Ditto.
1629
1630 * cygheap.h: Remove path_prefix_p declaration.
1631
16322002-02-26 Christopher January <chris@atomice.net>
1633 Christopher Faylor <cgf@redhat.com> (minor fixups)
1634
1635 * Makefile.in: Add fhandler_proc.o, fhandler_registry.o,
1636 fhandler_process.o and fhandler_virtual.o.
1637 * dtable.cc (dtable::build_fhandler): Add entries for FH_PROC,
1638 FH_REGISTRY and FH_PROCESS. Set unix_name to the normalized posix
1639 path.
1640 * fhandler.h: Add constants for FH_PROC, FH_REGISTRY and FH_PROCESS.
1641 Add class declarations for fhandler_virtual, fhandler_proc,
1642 fhandler_registry and fhandler_virtual. Update fhandler_union
1643 accordingly.
1644 * fhandler_proc.cc: New file. Add implementation for fhandler_proc.
1645 * fhandler_virtual.cc: New file. Add implementation for
1646 fhandler_virtual.
1647 * fhandler_process.cc: New file. Add implementation for
1648 fhandler_process.
1649 * fhandler_registry.cc: New file. Add implementation for
1650 fhandler_registry.
8761c1dc
CF
1651 * path.cc (isproc): New macro.
1652 (isvirtual_dev): Ditto.
291be307
CF
1653 * path.cc (path_conv::check): Add check for virtual devices.
1654 * path.cc (mount_info::conv_to_win32_path): Convert paths in /proc to
1655 empty Win32 paths.
1656 * path.cc (chdir): Replace check for FH_CYGDRIVE with more generic
1657 isvirtual_dev macro. Force setting of posix path for virtual
1658 fhandlers.
8761c1dc 1659 * path.h (path_prefix_p): Declare.
291be307
CF
1660
1661
fee93846
CF
1662Wed May 1 16:06:02 2002 Jason Tishler <jason@tishler.net>
1663
1664 * include/cygwin/types.h: Include <sys/sysmacros.h>.
1665
9b15f5fa
CV
1666Wed Apr 17 11:27:04 2002 Jason Tishler <jason@tishler.net>
1667
1668 * security.cc (get_lsa_srv_inf): Prevent extraneous backslashes for
1669 the NT Domain case.
1670
4deace13
CV
16712002-04-12 Corinna Vinschen <corinna@vinschen.de>
1672
1673 * net.cc (cygwin_accept): Set socket type for accepted socket.
1674 (socketpair): Set socket type for both sockets.
1675
16762002-04-12 Egor Duda <deo@logos-m.ru>
1677
291be307 1678 * fhandler.h (class fhandler_socket): New member to store socket type.
4deace13
CV
1679 (fhandler_socket::get_socket_type): Access it.
1680 (fhandler_socket::set_socket_type): Ditto.
1681 * net.cc (cygwin_socket): Store socket type.
1682 (cygwin_connect): Disable security checks for connectionless sockets.
1683 (cygwin_accept): Ditto.
1684
dbe67a81
CF
16852002-04-09 Mark Bradshaw <bradshaw@staff.crosswalk.com>
1686
1687 * cygwin.din: Add strptime.
1688 * include/cygwin/version.h: Increment API version number.
1689
464b3e80
CV
16902002-04-09 Corinna Vinschen <corinna@vinschen.de>
1691
1692 * fork.cc (fork_child): Call fixup_mmaps_after_fork() somewhat earlier.
1693
d78bda7b
CV
16942002-04-09 Corinna Vinschen <corinna@vinschen.de>
1695
1696 * fhandler.cc (fhandler_base::open): Set read-only bit in
1697 file_attributes when adequate.
1698
8996623b
CF
16992002-03-28 Christopher Faylor <cgf@redhat.com>
1700
1701 * times.cc (gettimeofday): Fix typo in previous patch.
1702
7d7524e5
CF
17032002-03-27 Wu Yongwei <adah@netstd.com>
1704
1705 * times.cc (gettimeofday): Revert to setting timezone info if tz !=
1706 NULL.
1707
2f3126f6
CF
17082002-03-21 Christopher Faylor <cgf@redhat.com>
1709
1710 * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Always set
1711 st_[ug]id to value derived from get_file_attributes.
1712
45d2ea8a
CF
17132002-03-21 Christopher Faylor <cgf@redhat.com>
1714
1715 * spawn.cc (find_exec): Return input if file not found.
1716
99dbafac
CV
17172002-03-19 Boris Schaeling <boriss@web.de>
1718
291be307 1719 * poll.cc (poll): Add support for invalid descriptors.
99dbafac 1720
b0359971
RC
17212002-03-15 Robert Collins <rbtcollins@hotmail.com>
1722
1723 * fhandler.h (fhandler_termios::lseek): Override lseek.
1724 * fhandler_termios.cc (fhandler_termios::lseek): Implement this.
1725
59a2339f
CF
17262002-03-15 Christopher Faylor <cgf@redhat.com>
1727
1728 * cygserver.cc: Include stdlib.h for exit declaration.
1729 * threaded_queue.cc: Ditto.
1730
ca175377
CF
17312002-03-15 Christopher Faylor <cgf@redhat.com>
1732
1733 * pinfo.cc (pinfo::init): Use PID_ALLPIDS flag to control when a
1734 redirected block should be marked as nonexistent.
1735 (winpids::add): Use PID_ALLPIDS when looking for all pids.
1736 * cygwin.h (PID_ALLPIDS): New enum element.
1737
d78bda7b 17382002-03-15 Corinna Vinschen <corinna@vinschen.de>
2f263187 1739
291be307 1740 * glob.c (stat32_to_STAT): New function.
2f263187
CV
1741 (g_lstat): Call user space functions always with 32 bit struct stat
1742 as a workaround.
1743 (g_stat): Ditto.
1744 * include/glob.h (struct glob): Don't prototype function pointers
1745 when compiling Cygwin.
1746
4af6d4a9
CF
17472002-03-14 Christopher Faylor <cgf@redhat.com>
1748
1749 * pinfo.cc (pinfo::init): Properly handle execed process stub when
1750 PID_NOREDIR is specified.
1751
6ea9c716
CV
17522002-03-13 Boris Schaeling <boriss@web.de>
1753
e10c087b
CF
1754 * poll.cc (poll): Remove variable open_fds. Rearrange and add code to
1755 fix settings of revents.
6ea9c716 1756
d78bda7b 17572002-03-13 Corinna Vinschen <corinna@vinschen.de>
bbe09139
CV
1758
1759 * mmap.cc (mmap_record::map_map): Return -1 if VirtualProtect fails.
1760 (list::erase): New method with no argument. Erase latest record
1761 added.
1762 (mmap64): Fail if map_map() fails.
1763
d78bda7b 17642002-03-12 Corinna Vinschen <corinna@vinschen.de>
cb4589f4
CV
1765
1766 * sysconf.cc (sysconf): Fix condition.
1767
d78bda7b 17682002-03-11 Corinna Vinschen <corinna@vinschen.de>
2817e0dc
CV
1769
1770 * mmap.cc (msync): Check area given by addr and len for being a
1771 contigeous mmap'd region.
1772
d78bda7b 17732002-03-11 Corinna Vinschen <corinna@vinschen.de>
713fb38b
CV
1774
1775 * fork.cc (fork_child): Call fixup_mmaps_after_fork() before
1776 closing parent process handle. Call fixup_mmaps_after_fork()
1777 with parent process handle as parameter.
1778 * mmap.cc (mmap_record::access): New method.
1779 (fixup_mmaps_after_fork): Take process handle as parameter.
1780 In case of FILE_MAP_COPY access, copy valid memory regions to child.
1781 * pinfo.h (fixup_mmaps_after_fork): Change prototype accordingly.
1782
d78bda7b 17832002-03-07 Corinna Vinschen <corinna@vinschen.de>
c8c3824d
CV
1784
1785 * autoload.cc (NetGetDCName): Add symbol.
1786 (NetServerEnum): Remove symbol.
1787 * security.cc (get_lsa_srv_inf): Call NetGetDCName() instead of
1788 NetServerEnum() since it's faster. Don't call it at all if machine
1789 is not a domain member.
1790
9420d2b8
CF
17912002-03-06 Christopher Faylor <cgf@redhat.com>
1792
1793 * path.cc (normalize_posix_path): Avoid runs of '.'s > 2.
1794
07a21bce
CF
17952002-03-05 Christopher Faylor <cgf@redhat.com>
1796
1797 * errno.cc: Change EPERM associated text to "Operation not permitted"
1798 throughout.
1799
eeac69d8
CF
18002002-03-05 Christopher Faylor <cgf@redhat.com>
1801
1802 * fhandler_socket.cc (fhandler_socket::close): Respond to signals while
1803 looping, waiting for socket to close. Superstitiously clear last error
1804 when WSAEWOULDBLOCK.
1805
241a7c5a
RC
18062002-03-05 Robert Collins <rbtcollins@hotmail.com>
1807
291be307 1808 * cygserver_transport_pipes.cc (transport_layer_pipes::transport_layer_pipes):
241a7c5a
RC
1809 Always init - until static members work correctly.
1810 * shm.cc (shmget): Initialize the security descriptor - thanks Corinna!
291be307 1811 * include/sys/ipc.h: Make the ipc control constants partitioned off from the sem
241a7c5a
RC
1812 control constants.
1813
ad2864f4
CV
18142002-03-04 Christian Lestrade <christian.lestrade@free.fr>
1815
1816 * include/sys/termios.h: Define _POSIX_VDISABLE. Define CCEQ macro.
1817 * fhandler_termios.cc: Include <sys/termios.h>.
1818 (line_edit): Recognize disabled c_cc[] chars. Ignore VDISCARD when
1819 not in ICANON mode.
1820
59149930
CV
18212002-03-04 Dmitry Timoshkov <dmitry@baikal.ru>
1822
1823 * syscalls.cc (truncate64): Use ftruncate64 directly to not lose
1824 upper 32 bits.
1825
7c3617cc
RC
18262002-03-04 Robert Collins <rbtcollins@hotmail.com>
1827
1828 * cygserver_shm.cc (delete_shmnode): New function.
1829 (client_request_shm::serve): Use it.
1830
038c71f1
RC
18312002-03-04 Robert Collins <rbtcollins@hotmail.com>
1832
1833 * cygserver_shm.cc (client_request_shm::serve): Implement SHM_DETACH.
1834 * shm.cc (shmdt): Implement.
1835
67be0adb
RC
18362002-03-04 Robert Collins <rbtcollins@hotmail.com>
1837
1838 * cygserver_shm.cc: Run indent.
1839 (deleted_head): New global for storing shm id's pending deletion.
1840 (client_request_shm::serve): Return ENOSYS for invalid request types.
1841 Implement SHM_DEL - delete a shm id.
1842 * cygserver_shm.h (SHM_DEL): New type value.
1843 * shm.cc (delete_inprocess_shmds): New function, does what it's name implies.
1844 (shmctl): Implement shm_rmid control type.
1845
74c3173a
RC
18462002-03-04 Robert Collins <rbtcollins@hotmail.com>
1847
1848 * Makefile.in (install): Remove install-bin to allow make install to work.
1849
009314a4
RC
18502002-03-03 Robert Collins <rbtcollins@hotmail.com>
1851
1852 * shm.cc (shmat): Prevent a compile error.
1853 (shmdt): Set errno as this function is incomplete.
1854
e7729287
CF
18552002-02-28 Christopher Faylor <cgf@redhat.com>
1856
1857 * times.cc: Remove if 0'd code. Clean up slightly.
1858
f449bfef
RC
18592002-02-28 Robert Collins <rbtcollins@hotmail.com>
1860
1861 * Merged cygwin_daemon into head minus the new shm and ipc exports.
1862
18632002-02-28 Robert Collins <rbtcollins@hotmail.com>
1864
1865 * fhandler_tty.cc (fhandler_tty_slave::open): More debugging.
1866 (fhandler_tty_slave::read): Fix printf type for the handle.
1867 * tty.cc (tty::common_init): Add a FIXME for security.
1868
18692002-01-29 Robert Collins <rbtcollins@hotmail.com>
1870
1871 * Makefile.in (OBJS): Remove duplicate localtime.o.
1872
18732002-01-17 Robert Collins <rbtcollins@hotmail.com>
1874
291be307 1875 * cygserver.cc (check_and_dup_handle): Consolidate the two variants for
f449bfef
RC
1876 simplicity.
1877 Add Some basic debug output.
1878 (client_request_attach_tty::serve): Use the new debug_printf for clarity.
1879 Mark the duplicated handles as inheritable - fixup_after_fork() doesn't reopen
1880 tty's.
1881
18822002-01-16 Robert Collins <rbtcollins@hotmail.com>
1883
1884 * cygserver.cc (transport): Correct scope.
1885 (client_request_attach_tty::serve): Add more debug information.
1886 Fix erroneous use of transport instead of conn.
1887 * cygserver_transport_pipes.cc (transport_layer_pipes::close): More debug.
1888 (transport_layer_pipes::read): Ditto.
1889 (transport_layer_pipes::write): Ditto.
1890 (transport_layer_pipes::impersonate_client): Ditto.
1891
1892Mon Oct 8 7:41:00 2001 Robert Collins <rbtcollins@hotmail.com>
1893
1894 * cygserver.cc (server_request::process): Rename client_request_shm_get to
1895 client_request_shm.
1896 * cygserver_process.cc (process_cache::add): Rename to add_task.
1897 Use process_cleanup instead of process_request.
1898 (process_cache::remove_process): New method.
1899 (process::process): Initialize new members.
1900 (process::~process): New member.
1901 (process::cleanup): New method.
1902 (process::add_cleanup_routine): New method.
1903 (process_request::process): Rename to process_cleanup.
1904 Call the process object's cleanup method and then delete it.
1905 (process_process_param::request_loop): Remove the signalling process.
1906 * cygserver_shm.cc: Globally rename client_request_shm_get to client_request_shm.
1907 (client_request_shm_get::serve): Handle attach request counting.
1908 * cygserver_shm.h: Globally rename client_request_shm_get to client_request_shm.
1909 (class shm_cleanup): New class.
1910 * shm.cc: Globally rename client_request_shm_get to client_request_shm.
1911 (client_request_shm::client_request_shm): New constructor for attach requests.
1912 (shmat): Use it.
291be307 1913 * include/cygwin/cygserver_process.h (class process_request): Rename to
f449bfef
RC
1914 process_cleanup.
1915 (class cleanup_routine): New class.
1916 (class process): New members and methods to allow calling back when the process
1917 terminates.
1918
1919Thu Oct 4 14:12:00 2001 Robert Collins <rbtcollins@hotmail.com>
1920 * cygserver.cc (request_loop): Make static.
1921 (main): Use new cache constructor syntax.
1922 Start cache worker threads.
1923 Cleanup the cache at shutdown.
1924 * cygserver_process.cc: Run indent.
1925 (process_cache::process_cache): Add a trigger to use when adding a process.
1926 (process_cache::process): Move process_entry to process.
1927 Insert at the end of the list.
1928 Trigger the request loop when new process's inserted.
1929 (process_cache::process_requests): Do it.
1930 (process_cache::add): New method.
1931 (process_cache::handle_snapshot): New method.
1932 (process::process): Merge in the process_entry fields.
1933 (process::handle): Make a stub function.
1934 (process::exit_code): New method.
1935 (process_request::process): New method.
1936 (process_process_param::request_loop): New method.
1937 * cygserver_shm.cc: New header dependency - threaded_queue.h.
1938 * threaded_queue.cc (threaded_queue::cleanup): Clearer messages.
1939 (queue_process_param::stop): Short spinlock on interruptible threads.
1940 * threaded_queue.h (class threaded_queue): New constructor.
1941 * include/cygwin/cygserver_process.h (process_request): New class.
1942 (process_entry): Remove.
1943 (process): Merge in process_entry.
1944 (process_cache): Inherit from threaded_queue.
1945
1946Tue Oct 2 23:24:00 2001 Robert Collins <rbtcollins@hotmail.com>
1947
1948 * cygserver.cc (class server_process_param): Use new constructor syntax.
1949 * cygserver_process.cc (process_cache::~process_cache): New function.
1950 * threaded_queue.cc: Define condition debug_printf.
1951 Run indent.
1952 (threaded_queue::cleanup): Move queue_process_param guts to a method.
1953 (threaded_queue::process_requests): Ditto.
1954 (queue_process_param::queue_process_param): New method.
1955 (queue_process_param::~queue_process_param): Ditto.
1956 (queue_process_param::start): Ditto.
1957 (queue_process_param::stop): Ditto.
291be307 1958 * threaded_queue.h (class queue_process_param): Add support for
f449bfef
RC
1959 interruptible request loops.
1960 * cygwin/include/cygwin/cygserver_process.h (class process_cache): Add
1961 destructor.
1962
1963Tue Oct 2 23:24:00 2001 Robert Collins <rbtcollins@hotmail.com>
1964
1965 * cygserver_client.cc: New flag allow_daemon to disable the daemon completely.
1966 (cygserver_request): Check it.
1967 (cygserver_init): Ditto.
1968 * environ.cc (parse_thing): Add (no)daemon option.
1969
1970Tue Oct 2 23:00:00 2001 Robert Collins <rbtcollins@hotmail.com>
1971
1972 * shm.cc: Update to handle include changes from HEAD.
1973
1974Tue Oct 2 16:06:00 2001 Robert Collins <rbtcollins@hotmail.com>
1975
291be307 1976 * Makefile.in: Remove cygserver_shm.o from cygwin1.dll.
f449bfef
RC
1977 Rename cygserver_shm_outside.o to cygserver_shm.o.
1978 * cygserver.cc (server_request::process): Use the new client_request
1979 constructor.
1980 * cygserver_client.cc: Remove the #ifdef's stubs for the server method
1981 within cygwin.
1982 (client_request_attach_tty::client_request_attach_tty): Use the new
1983 client_request constructor.
1984 (client_request_shutdown::client_request_shutdown): Ditto.
1985 (client_request::client_request): Ditto.
291be307 1986 * cygserver_shm.cc (client_request_shm_get::serve): Remove the
f449bfef
RC
1987 #ifdef'd stub for in-cygwin builds.
1988 (client_request_shm_get::client_request_shm_get): Use the new
1989 client_request constructor, and remove the in-cygwin variants.
1990 * cygserver_shm.h (class client_request_shm_get): #ifndef test the
1991 serve method - it's only used in cygserver.
1992 * shm.cc (client_request_shm_get::client_request_shm_get): New function.
1993 * include/cygwin/cygserver.h (request_header): New constructor.
291be307 1994 (class client_request): Use it.
f449bfef
RC
1995 New constructor accepting the header size.
1996 #ifndef test the server method - it's only used within cygserver.
1997 (client_request_get_version): #ifdef test the server method.
1998 (client_request_shutdown): Ditto.
1999 (client_request_attach_tty): Ditto.
2000
2001Tue Oct 2 9:57:00 2001 Robert Collins <rbtcollins@hotmail.com>
2002
2003 * Makefile.in: add threaded_queue.o to cygserver.exe.
2004 * cygserver.cc: Include threaded_queue.h
2005 (class server_request): Inherit from queue_request.
2006 (class server_process_param): Inherit from queue_process_param.
2007 (class server_request_queue): Inherit from threaded_queue.
2008 (request_loop): Adjust for new types.
291be307 2009 (server_request_queue::process_requests): Remove guts to
f449bfef
RC
2010 threaded_queue::process_requests.
2011 (server_request::server_request): Adjust for new types.
2012 (worker_function): Delete.
2013 (server_request_queue::create_workers): Delete.
2014 (server_request_queue::cleanup): Delete.
2015 (server_request_queue::add): Move guts to threaded_queue::add.
2016 * threaded_queue.cc: New file.
2017 * threaded_queue.h: New file.
2018
2019Mon Oct 1 12:38:00 2001 Robert Collins <rbtcollins@hotmail.com>
2020
2021 * cygserver.cc (client_request::serve): New function.
2022 * cygserver_process.cc: Inlude <pthread.h> for pthread_once.
2023 (process_cache::process_cache): Initialise a crtiical section for write access.
291be307 2024 (process_cache::process): Use the critical section. Also add missing entries to
f449bfef
RC
2025 the cache.
2026 (do_process_init): New function to initalise class process static variables.
291be307 2027 (process::process): Ensure that the process access critical section is
f449bfef
RC
2028 initialised.
2029 (process::handle): Close the handle of old process's when they have terminated
2030 and we are returning the handle for a process with the same pid.
2031 * cygserver_shm.cc: Run indent.
2032 Include cygserver_process.h to allow process cache functionality.
2033 (client_request_shm_get::serve): New parameter for process cache support.
2034 Use the process cache, not OpenProcess to get a handle to the originating process.
2035 Fix a handle leak with token_handle.
291be307 2036 * cygserver_shm.h (class client_request_shm_get): Update ::serve for process
f449bfef
RC
2037 cache support.
2038 * cygserver_transport_pipes.cc: Redefine debug_printf to be conditional on DEBUG.
291be307 2039 * include/cygwin/cygserver.h: Do not implement client_request::serve in the
f449bfef 2040 header.
291be307
CF
2041 * include/cygwin/cygserver_process.h (class process_cache): Add a write access
2042 critical section to prevent races when requests from a multithreaded
f449bfef
RC
2043 application arrive.
2044
2045Sun Sep 30 23:41:00 2001 Robert Collins <rbtcollins@hotmail.com>
2046
2047 * Makefile.in: Add cygserver_process.o to cygserver.exe.
2048 * cygserver.cc: Include signal.h and cygwin_version.h.
2049 Define debug_printf as a macro.
2050 Define DEBUG to a value.
2051 (client_request_attach_tty::serve): Add beginning of process cache support.
2052 Change from #ifdef DEBUG to work with new DEBUG style.
2053 (client_request_get_version::serve): Add beginning of process cache support.
2054 (class server_request): New prototype for support of process cache.
2055 (class queue_process_param): New class to allow request loop threading.
2056 (class server_request_queue): Add beginning of process cache support.
2057 Allow request loop threading.
2058 (request_loop): Thread function for request loops.
2059 (server_request_queue::process_requests): Initiator for threaded request loops.
2060 (client_request_shutdown::serve): Add beginning of process cache support.
2061 (server_request::server_request): Ditto.
291be307 2062 (server_request::process): Use debug_printf. Add beginning of process cache
f449bfef
RC
2063 support.
2064 (server_request_queue::cleanup): Kill off any request loop threads.
2065 (server_request_queue::add): Add beginning of process cache support.
2066 (handle_signal): Trigger a shutdown.
2067 (main): Print out some useful info at startup - version, date time.
2068 Add process cache support.
2069 Spawn a separate thread for the transport request loop, thus allowing concurrent
2070 support for multiple transports.
291be307 2071 * cygserver_client.cc (client_request_get_version::serve): Add process cache
f449bfef
RC
2072 support.
2073 (client_request_attach_tty::serve): Add process cache support.
2074 (client_request_shutdown::serve): Add process cache support.
2075 * cygsserver_process.cc: New file with the process cache support.
2076 * cygserver_shm.cc: Redefine debug_printf to allow conditional output.
2077 * cygwin.din: Export shmdt().
2078 * shm.cc: Run indent.
2079 Update FIXME's.
2080 (shmdt): New function.
2081 * include/cygwin/cygserver.h (class client_request): Add process cache support.
2082 (class client_request_get_version): Ditto.
2083 (class client_request_shutdown): Ditto.
2084 (class client_request_attach_tty): Ditto.
2085 * include/cygwin/cygserver_process.h: New header for process cache support.
2086
2087Sun Sep 30 8:52:00 2001 Robert Collins <rbtcollins@hotmail.com>
2088
2089 * include/cygwin/cygserver_transport.h: Add copyright header.
2090 * include/cygwin/cygserver_transport_pipes.h: Ditto.
2091 * include/cygwin/cygserver_transport_sockets.h: Ditto.
2092
2093Sat Sep 29 20:40:00 2001 Robert Collins <rbtcollins@hotmail.com>
2094
2095 * Makefile.in: Add cygserver_transport_sockets.o to DLL_OFILES.
2096 Add cygserver_transport_sockets_outside.o to cygserver.exe.
2097 * cygserver.cc: Include new include files.
2098 * cygserver_client.cc: Ditto.
2099 * cygserver_shm.h: No need to include <sys/socket.h> now.
2100 * cygerver_transport.cc: Include new include files.
2101 (transport_layer_base::transport_layer_base): Strip back to a stub.
2102 (transport_layer_base::listen): Ditto.
2103 (transport_layer_base::accept): Ditto.
2104 (transport_layer_base::close): Ditto.
2105 (transport_layer_base::read): Ditto.
2106 (transport_layer_base::write): Ditto.
2107 (transport_layer_base::connect): Ditto.
291be307 2108 * cygserver_transport_pipes.cc: Include new header
f449bfef
RC
2109 "cygwin/cygserver_transport_pipes.h".
2110 * cygserver_transport_sockets.cc: New file.
2111 * dcrt0.cc: No need to include <sys/socket.h> now.
2112 * fhandler_tty.cc: Ditto.
2113 * tty.cc: Ditto.
2114 * include/cygwin/cygserver_transport.h: Strip the base class to a stub.
2115 Remove the cygserver_transport_pipes class.
2116 * include/cygwin/cygserver_transport_pipes.h: New file.
2117 * include/cygwin/cygserver_transport_sockets.h: New file.
2118
2119Tue Sep 25 16:22:00 2001 Robert Collins <rbtcollins@hotmail.com>
2120
2121 * autoload.cc: Add dynamic load statement for 'ImpersonateNamedPipeClient'.
2122 * Makefile.in: Add new object files, and build instructions for cygserver.exe.
2123 * cygwin.din: Export ftok, shmat, shmctl and shmget.
2124 * dcrt0.cc: Additional includes for cygserver support.
2125 (dll_crt0_1): Initialise the cygserver client.
2126 * fhandler.h (fhandler_tty): New method cygserver_attach_tty.
2127 * fhandler_tty.cc: Additional includes for cygserver support.
2128 (fhandler_tty_slave::open): Attempt to use the cygserver when obtaining
2129 handles from the parent process. On failure or 9x use the current method.
2130 (fhandler_tty_slave::cygserver_attach_tty): New function.
2131 * fork.cc (fork_child): Fixup shm memory mapped areas.
2132 * pinfo.h: Declare fixup_shms_after_fork().
2133 * security.h: Declare alloc_sd().
2134 * tty.cc: Additonal includes to support cygserver.
2135 (tty::common_init): Don't allow others to open us if the cygserver is running.
2136 * winsup.h: Declare cygserver_running.
2137 * cygserver.cc: New file.
2138 * cygserver_client.cc: New file.
2139 * cygserver_shm.cc: New file.
2140 * cygserver_shm.h: New file.
2141 * cygserver_transport.cc: New file.
2142 * cygserver_transport_pipes.cc: New file.
2143 * ipc.cc: New file.
2144 * shm.cc: New file.
2145 * include/cygwin/cygserver.h: New file.
2146 * include/cygwin/cygserver_transport.h: New file.
2147 * include/sys/ipc.h: New file.
2148 * include/sys/shm.h: New file.
2149
062401c9
RC
21502002-02-28 Robert Collins <rbtcollins@hotmail.com>
2151
2152 * thread.cc (semaphore::TryWait): Set errno as required by posix 1003.1.
2153 (__sem_wait): Ditto.
2154 (__sem_trywait): Ditto.
2155
d1f50ae5
CF
21562002-02-27 Christopher Faylor <cgf@redhat.com>
2157
2158 * include/cygwin/version.h: Bump DLL minor number.
2159
acb56175
CV
21602002-02-23 Corinna Vinschen <corinna@vinschen.de>
2161
2162 * cygwin.din (fstat64): New symbol.
2163 (ftruncate64): Ditto.
2164 (lseek64): Ditto.
2165 (lstat64): Ditto.
2166 (mmap64): Ditto.
2167 (seekdir64): Ditto.
2168 (stat64): Ditto.
2169 (telldir64): Ditto.
2170 (truncate64): Ditto.
2171 * dir.cc (telldir64): New function.
2172 (telldir): Call telldir64().
2173 (seekdir64): New function.
2174 (seekdir): Call seekdir64().
2175 * fhandler.h: Redefine all methods using __off32_t to use __off64_t.
2176 * fhandler.cc: Use __off64_t and struct __stat64 throughout.
2177 * fhandler_clipboard.cc: Ditto.
2178 * fhandler_disk_file.cc: Ditto.
2179 * fhandler_dsp.cc: Ditto.
2180 * fhandler_floppy.cc: Ditto.
2181 * fhandler_mem.cc: Ditto.
2182 * fhandler_random.cc: Ditto.
2183 * fhandler_socket.cc: Ditto.
2184 * fhandler_tape.cc: Ditto.
2185 * fhandler_zero.cc: Ditto.
2186 * pipe.cc: Ditto.
2187 * glob.c: Ditto, call lstat64 and stat64 in Cygwin.
2188 * mmap.cc: Use __off64_t throughout.
2189 (mmap64): New function.
2190 * sec_acl.cc (acl_worker): Use struct __stat64, call stat64 and lstat64.
2191 * syscalls.cc (lseek64): New function.
2192 (stat64_to_stat32): Ditto.
2193 (fstat64): Ditto.
2194 (stat64): Ditto.
2195 (lstat64): Ditto.
2196 (ftruncate64): Ditto.
2197 (truncate64): Ditto.
2198 (_fstat): Call fstat64.
2199 (_stat): Call stat64.
2200 (cygwin_lstat): Rename to avoid declaration problem. Call lstat64.
2201 (stat_worker): Use struct __stat64.
2202 (access): Ditto.
2203 (ftruncate): Call ftruncate64.
2204 (truncate): Call truncate64.
2205 * wincap.cc: Set flag has_64bit_file_access appropriately.
2206 * wincap.h: Add flag has_64bit_file_access.
2207 * winsup.h (ILLEGAL_SEEK): Define as __off64_t.
2208 (stat_dev): Declare using struct __stat64.
2209 (stat_worker): Ditto.
2210 * include/cygwin/stat.h (struct __stat32): Define if compiling Cygwin.
2211 (struct __stat64): Ditto.
2212 (struct stat): Revert definition with explicitly sized datatypes.
2213 Eliminate sized field names.
2214 * include/cygwin/types.h (blksize_t): New type.
2215 (__blkcnt32_t): Ditto.
2216 (__blkcnt64_t): Ditto.
2217 (blkcnt_t): Ditto.
2218
083abe54
CF
22192002-02-22 Christopher Faylor <cgf@redhat.com>
2220
2221 * sync.h (new_muto): Just accept an argument which denotes the name of
2222 the muto. Use this argument to construct static storage.
2223 * cygheap.cc (cygheap_init): Reflect above change.
2224 * exceptions.cc (events_init): Ditto.
2225 * malloc.cc (malloc_init): Ditto.
2226 * path.cc (cwdstuff::init): Ditto.
2227 * cygheap.h (cwdstuff): Change name of lock element to make it less
2228 generic.
2229 * path.cc (cwdstuff::get_hash): Ditto.
2230 (cwdstuff::get_initial): Ditto.
2231 (cwdstuff::set): Ditto.
2232 (cwdstuff::get): Ditto.
2233 * sigproc.cc (proc_subproc): Ditto.
2234
2235 * debug.cc (lock_debug): Change to method. Use method rather than
2236 macro throughout.
2237
2238 * tty.h (tty_min::kill_pgrp): Declare new method.
2239 * fhandler_termios.cc (tty_min::kill_pgrp): New method.
2240 (fhandler_termios::line_edit): Use new method for killing process.
2241 * dcrt0.cc (do_exit): Ditto.
2242
2243 * dtable.cc (dtable::get_debugger_info): New method for inheriting
2244 dtable info from a debugger.
2245 * tty.cc (tty_init): Attempt to grab file handle info from parent
2246 debugger, if appropriate.
2247
2248 # dtable.cc (dtable::stdio_init): Make this a method.
2249 (dtable::init_std_file_from_handle): Don't set fd unless it's not open.
2250 (dtable::build_fhandler_from_name): Move name setting to
2251 dtable::build_fhandler.
2252 (dtable::build_fhandler): Add win32 name parameter.
2253 * dcrt0.cc (dll_crt0_1): Change to use dtable stdio_init.
2254 * dtable.h (dtable): Reflect build_fhandler parameter change.
2255 * mmap.cc (mmap_record::alloc_fh): Don't set name parameter in
2256 build_fhandler.
2257 * net.cc (fdsock): Remove set_name call since it is now handled by
2258 build_fhandler.
2259
2260 * sigproc.cc (proc_subproc): Release muto as early as possible.
2261
a6790c5f
CV
22622001-02-22 Corinna Vinschen <corinna@vinschen.de>
2263
2264 * smallprint.c (rn): Allow long long values.
2265 (__small_vsprintf): Add 'D', 'U' and 'X' formats for long long
2266 parameters.
2267
aa6df8d7
CF
22682002-02-19 Christopher Faylor <cgf@redhat.com>
2269
2270 * fhandler.cc (fhandler_base::puts_readahead): Remove default parameter
2271 setting. Newer gcc's complain about this.
2272 (fhandler_base::set_readahead_valid): Ditto.
2273 * fhandler_dsp.cc (Audio::open): Ditto.
2274 (fhandler_dev_dsp::open): Ditto.
2275
cecb74ae
CF
22762002-02-19 Christopher Faylor <cgf@redhat.com>
2277
2278 * fork.cc (fork_parent): Use sec_user_nih to control process/thread
2279 inheritance/permission.
2280 * spawn.cc (spawn_guts): Ditto.
2281 * security.cc (create_token): Initialize token so that it is not tested
2282 for bogus value later. Use sec_user to control process/thread
2283 creation.
2284 * security.h (__sec_user): Rename declaration from sec_user.
2285 (sec_user_nih): Declare here as inline function wrapper for __sec_user.
2286 (sec_user): Ditto.
2287 * sigproc.cc (czombies): Allocate a character array for zombies to
2288 avoid constructor overhead
2289 (extremely hackish, I know).
2290 (cpchildren): Ditto.
2291 (pchildren): New define.
2292 (zombies): Ditto.
2293 (getsem): Use sec_user_nih to control semaphore inheritance/permission.
2294
2bd22312
CF
22952002-02-16 Christopher Faylor <cgf@redhat.com>
2296
2297 * times.cc (hires::prime): Restore thread priority on failure
2298 condition.
2299
2300 * uinfo.cc (uinfo_init): Use more robust method for determining if
2301 process was invoked from a non-cygwin process.
2302
2303 * sync.h (muto::init): Eliminate "inheritance" parameter.
2304 (new_muto): Reflect removal of parameter.
2305 * sync.cc (muto::init): Ditto.
2306 * cygheap.cc (cygheap_init): Ditto.
2307 * debug.cc (threadname_init): Ditto.
2308 * exceptions.cc (events_init): Ditto.
2309 * malloc.cc (malloc_init): Ditto.
2310 * path.cc (cwdstuff::init): Ditto.
2311 * sigproc.cc (sigproc_init): Ditto.
2312
4c761646
CF
2313 * grp.cc (group_lock): Use different method for locking with static
2314 member.
2bd22312 2315 (read_etc_group): REALLY ensure that read lock mutex is released.
4c761646
CF
2316 * passwd.cc (passwd_lock): Use different method for locking with static
2317 member.
2318 (read_etc_passwd): REALLY ensure that read lock mutex is released.
2bd22312
CF
2319
2320 * shared.cc (sec_user): Correct reversed inheritance test.
2321
60b68f0d
CF
23222002-02-15 Christopher Faylor <cgf@redhat.com>
2323
2324 * hires.h (hires::usecs): Rename from utime. Accept an argument.
2325 * strace.cc (strace::microseconds): Use hires class for calculating
2326 times.
2327 * sync.h (new_muto): Use NO_COPY explicitly in declaration.
2328 * times.cc (gettimeofday): Reflect change in usecs argument.
2329 (hires::usecs): Ditto. Changed name from utime.
2330 * winsup.h (NO_COPY): Add nocommon attribute to force setting aside
2331 space for variable.
2332 * regcomp.c (REQUIRE): Add a void cast to bypass a warning.
2333
dce87b21
CF
23342002-02-15 Christopher Faylor <cgf@redhat.com>
2335
2336 * hires.h: New file.
2337 * times.cc (gettimeofday): Use hires class for calculating current time.
2338 (hires::prime): New method.
2339 (hires::utime): Ditto.
2340
3d456520
CF
23412002-02-14 Christopher Faylor <cgf@redhat.com>
2342
2343 * include/sys/cygwin.h (cygwin_getinfo_types): New CW_STRACE_ACTIVE.
2344 * external.cc (cygwin_internal): Handle CW_STRACE_ACTIVE.
2345
907dc7d0
CF
23462002-02-14 Christopher Faylor <cgf@redhat.com>
2347
2348 * exceptions.cc (unused_sig_wrapper): Eliminate unused parameter to
2349 asm.
2350 * external.cc (cygwin_internal): Change CW_STRACE_ON to
2351 CW_STRACE_TOGGLE.
2352 * strace.cc (strace::hello): Toggle strace on and off.
2353 * sync.cc (muto::init): Renamed from constructor.
2354 * sync.h (muto::new): Delete.
2355 (muto::delete): Ditto.
2356 (new_muto): Simplify. Use muto.init for nearly everything.
2357 * uinfo.cc (uinfo_init): Avoid closing a NULL handle.
2358 * include/sys/cygwin.h (cygwin_getinfo_types): Rename CW_STRACE_OFF to
2359 CW_STRACE_TOGGLE. Delete CW_STRACE_OFF.
2360 * include/sys/strace.h (strace): Add "inited" field.
2361
4753a17b
CV
23622001-02-12 Corinna Vinschen <corinna@vinschen.de>
2363
2364 * include/cygwin/acl.h: Fix definition of aclent_t.
2365
909acaf6
CF
23662002-02-10 Christopher Faylor <cgf@redhat.com>
2367
2368 * Makefile.in (DLL_OFILES): Consolidate object files.
2369
de4e0d30
CV
23702002-02-10 Corinna Vinschen <corinna@vinschen.de>
2371
b31c68c4
CV
2372 * child_info.h, cygheap.h, fhandler_clipboard.cc, fhandler_dsp.cc,
2373 fhandler_floppy.cc, fhandler_mem.cc, fhandler_random.cc,
2374 fhandler_tape.cc, fhandler_zero.cc, grp.cc, mmap.cc, passwd.cc,
2375 pinfo.cc, pinfo.h, pipe.cc, sec_acl.cc, sec_helper.cc, security.cc,
2376 security.h, thread.h, uinfo.cc, include/cygwin/acl.h: Fix copyright.
2377
23782002-02-10 Corinna Vinschen <corinna@vinschen.de>
2379
2380 * child_info.h, cygheap.h, dcrt0.cc, dir.cc, fhandler.cc, fhandler.h,
de4e0d30
CV
2381 fhandler_clipboard.cc, fhandler_disk_file.cc, fhandler_dsp.cc,
2382 fhandler_floppy.cc, fhandler_mem.cc, fhandler_random.cc,
2383 fhandler_tape.cc, fhandler_zero.cc, grp.cc, mmap.cc, passwd.cc,
2384 pinfo.cc, pinfo.h, pipe.cc, sec_acl.cc, sec_helper.cc, security.cc,
b31c68c4 2385 security.h, spawn.cc, syscalls.cc, thread.h, uinfo.cc, winsup.h:
de4e0d30
CV
2386 Change usage of uid_t to __uid16_t, gid_t to __gid16_t and
2387 off_t to __off32_t throughout. Use INVALID_UID, INVALID_GID and
2388 INVALID_SEEK instead casting -1 to the appropriate type.
2389 * winsup.h: Define INVALID_UID, INVALID_GID and INVALID_SEEK.
2390 * include/cygwin/acl.h: Define internal __aclent16_t and __aclent32_t
2391 types. Don't declare acl functions when compiling Cygwin.
2392 * include/cygwin/grp.h: Declare getgrgid() and getgrnam() with
2393 correct types for internal usage.
2394
39b553b8
CV
23952002-02-10 Corinna Vinschen <corinna@vinschen.de>
2396
2397 Patch suggested by Pierre A. Humblet <Pierre.Humblet@ieee.org>:
2398 * uinfo.cc (internal_getlogin): Try evaluating user by SID even if
2399 ntsec is off.
2400 (uinfo_init): Set primary group even if ntsec is off.
2401
52296b85
CV
24022002-02-09 Corinna Vinschen <corinna@vinschen.de>
2403
2404 * include/cygwin/grp.h: New file.
2405 * include/cygwin/stat.h: Ditto.
2406 * include/cygwin/types.h: Add definitions for __off32_t,
2407 __off64_t, off_t, __uid16_t, __uid32_t, uid_t, __gid16_t,
2408 __gid32_t and gid_t.
2409 * include/sys/cygwin.h: Use correct uid and gid types.
2410
ff86860b
CV
24112002-02-09 Corinna Vinschen <corinna@vinschen.de>
2412
2413 * dtable.cc (dtable::dup2): Revert previous patch.
2414 * fhandler.h: Ditto.
2415 (fhandler_socket::recv): Define new method.
2416 (fhandler_socket::send): Ditto.
2417 * fhandler_socket.cc (fhandler_socket::recv): New method.
2418 (fhandler_socket::send): Ditto.
2419 (fhandler_socket::read): Call fhandler_socket::recv() now.
2420 (fhandler_socket::write): Call fhandler_socket::send() now.
2421 * net.cc (class wsock_event): Move definition to wsock_event.h.
2422 (fdsock): Revert previous patch.
2423 (cygwin_recv): Move implementation to fhandler_socket::recv().
2424 (cygwin_send): Move implementation to fhandler_socket::send().
2425 * wsock_event.h: New file.
2426
d0672acc
CV
24272002-02-06 Alexander Gottwald <Alexander.Gottwald@s1999.tuchemnitz.de>
2428
2429 * net.cc (get_2k_ifconf): Create interface entries for tokenring cards.
2430
fae28904
CV
24312002-02-08 Corinna Vinschen <corinna@vinschen.de>
2432
2433 * dtable.cc (dtable::dup2): Store fd for fhandler_socket.
2434 * fhandler.h (fhandler_base::set_fd): New virtual method.
2435 (fhandler_base::get_fd): Ditto.
2436 (fhandler_socket::set_fd): Ditto.
2437 (fhandler_socket::get_fd): Ditto.
2438 * fhandler_socket.cc (fhandler_socket::read): Call cygwin_recv instead
2439 of native Winsock recv.
2440 (fhandler_socket::write): Call cygwin_send instead of native Winsock
2441 send.
2442 * net.cc (fdsock): Store fd in fhandler_socket.
2443
1f64102f
CV
24442002-02-07 Corinna Vinschen <corinna@vinschen.de>
2445
2446 * net.cc (cygwin_getsockname): Fix handling of NULL sun_path.
2447
562d9745
CV
24482002-01-29 Corinna Vinschen <corinna@vinschen.de>
2449
2450 * net.cc (getdomainname): Fix registry key for 9x systems, too.
2451
94ee02fa
CV
24522002-01-29 Corinna Vinschen <corinna@vinschen.de>
2453
2454 * net.cc (getdomainname): Fix registry key for NT systems.
2455
494a66d9
CF
24562002-01-28 Christopher Faylor <cgf@redhat.com>
2457
2458 * external.cc (cygwin_internal): Initialize various internal settings
2459 if required to allow use of some things from user loaded DLL.
2460 (CW_STRACE_ON): Add new feature.
2461 (CW_CYGWIN_PID_TO_WINPID): Ditto.
2462 * pinfo.cc (set_myself): Call "strace.hello" to initiate possible
2463 strace session.
2464 (pinfo::init): Guard against dereferencing uninitialized myself.
2465 * sigproc.cc (wait_sig): Call strace.hello() when __SIGTRACE "signal"
2466 received.
2467 * strace.cc (strace::hello): New method.
2468 * wincap.cc (wincapc::init): Avoid initializing if already initialized.
2469 * wincap.h (wincapc::wincapc): New method.
2470 * include/sys/cygwin.h: Add new CW_ enums. Kludge typedefs of
2471 {g,u}id_t if required.
2472 * strace.h (strace::hello): Declare new method.
2473
6616e6cf
CF
24742002-01-28 Earnie Boyd <earnie@users.sf.net>
2475
2476 * include/sys/strace.h (_STRACE_ON): Define.
2477 (_STRACE_OFF): Ditto.
2478
dfb4c347
CF
24792002-01-24 Christopher Faylor <cgf@redhat.com>
2480
2481 * speclib: Ensure that temporary def file is removed.
2482
3c07fbeb
CF
24832002-01-23 Christopher Faylor <cgf@redhat.com>
2484
2485 * speclib: Use rm -f to remove temp file just to quiet any potential
2486 warnings.
2487
f6fc31e1
CV
24882002-01-23 Corinna Vinschen <corinna@vinschen.de>
2489
2490 * security.cc (create_token): Use sec_user() to create
be6d8567
CV
2491 SECURITY_ATTRIBUTES structure for primary token. Use
2492 MAXIMUM_ALLOWED access rights instead of TOKEN_ALL_ACCESS.
f6fc31e1 2493
adbd01af
CV
24942002-01-23 Corinna Vinschen <corinna@vinschen.de>
2495
2496 * path.cc (symlink): Fix check for already existing file.
2497
aed69a5b
CF
24982002-01-21 Christopher Faylor <cgf@redhat.com>
2499
2500 * cygmagic: Suppress error output when figuring out if sum takes an
2501 option.
2502
f3647dd7
CF
25032002-01-21 Christopher Faylor <cgf@redhat.com>
2504
2505 * cygmagic: Attempt to figure out if sum takes an option.
2506
51076b73
CF
25072002-01-21 DJ Delorie <dj@redhat.com>
2508
2509 * Makefile.in (libpthread.a): Pass the assembler also.
291be307 2510 (libm.a): Ditto.
51076b73
CF
2511 (libc.a): Ditto.
2512 * speclib: Specify the assembler to dlltool.
2513
0ac2abea
CF
25142002-01-21 Christopher Faylor <cgf@redhat.com>
2515
2516 * include/cygwin/version.h: Bump DLL minor number.
2517
ac11ec88
CV
25182002-01-21 Corinna Vinschen <corinna@vinschen.de>
2519
28982aa8 2520 * grp.cc (getgrgid): Don't return default gid entry when ntsec is on.
ac11ec88
CV
2521 * syscalls.cc (setegid): Don't set primary group in process token.
2522
8ef47135
CF
25232002-01-21 Christopher Faylor <cgf@redhat.com>
2524
2525 * speclib: Don't use /dev/null as DLL name. Just default to what's
2526 already in .def file.
2527
25282002-01-21 Christopher Faylor <cgf@redhat.com>
2529
2530 * exceptions.cc (sig_handle): Remove last vestiges of SA_NOCLDSTOP code
2531 which caused SIGCHLD to be ignored.
2532
07cc1f1f
CF
25332002-01-20 Christopher Faylor <cgf@redhat.com>
2534
2535 * include/cygwin/version.h: Bump DLL minor number.
2536
385437d4
CF
25372002-01-20 Christopher Faylor <cgf@redhat.com>
2538
2539 * syscalls.cc (regfree): Make dll_export.
2540
d7c16d8d
CF
25412002-01-20 Christopher Faylor <cgf@redhat.com>
2542
2543 * exceptions.cc (ctrl_c_handler): Convert windows pid to cygwin pid
2544 when detecting if we should actually handle CTRL-C.
2545
216109a8
CF
25462002-01-19 Christopher Faylor <cgf@redhat.com>
2547
2548 * Makefile.in (new-cygwin1.dll): Revert previous change. libsupc++.a
2549 is only available in libstdc++-v3.
2550
9e73b339
CF
25512002-01-19 Christopher Faylor <cgf@redhat.com>
2552
2553 * exceptions.cc (sig_handle_tty_stop): Don't send SIGCHLD if parent
2554 doesn't want it.
2555 (sig_handle): Don't check for SA_NOCLDSTOP here. We don't have enough
2556 information.
2557
5946622e
CF
25582002-01-19 Christopher Faylor <cgf@redhat.com>
2559
2560 * include/cygwin/version.h: Bump DLL minor number.
2561
994fe87b
CF
25622002-01-19 Christopher Faylor <cgf@redhat.com>
2563
2564 * Makefile.in (new-cygwin1.dll): Just use -lsupc++ for link.
2565 * sigproc.cc (proc_exists): Change existence criteria.
2566 * sync.h (new_muto): Add volatile to definition to avoid gcc
2567 optimization problems.
2568
df3af773
CV
25692002-01-19 Corinna Vinschen <corinna@vinschen.de>
2570
2571 * include/cygwin/version.h: Bump API minor version to 51.
2572
7d6be0d6
CV
25732002-01-19 Mark Bradshaw <bradshaw@staff.crosswalk.com>
2574
291be307
CF
2575 * cygwin.din: Add recvmsg and sendmsg.
2576 * net.cc: Add cygwin_recvmsg and cygwin_sendmsg.
2577 * /usr/include/sys/socket.h: Add recvmsg and sendmsg.
7d6be0d6 2578
2d3dab2e
CV
25792002-01-19 Corinna Vinschen <corinna@vinschen.de>
2580
2581 * security.cc (create_token): Close processes token handle as soon
2582 as it's not used anymore.
2583
104c3be6
CV
25842002-01-17 Corinna Vinschen <corinna@vinschen.de>
2585
2586 * Makefile.in: Add fnmatch.o to DLL_OFILES.
2587 * cygwin.din: Add fnmatch export symbol.
2588 * fnmatch.c: New file.
2589 * include/fnmatch.h: Ditto.
2590 * include/cygwin/version.h: Bump API minor version to 50.
2591
9a7e1562
CV
25922002-01-15 Corinna Vinschen <corinna@vinschen.de>
2593
2594 * path.cc (fchdir): Call chdir with full windows path.
2595
7eddac1b
CV
25962002-01-14 Corinna Vinschen <corinna@vinschen.de>
2597
2598 * dir.cc: Use INVALID_FILE_ATTRIBUTES instead of "(DWORD) -1"
2599 for file attributes throughout.
2600 * fhandler.cc: Ditto.
2601 * fhandler_disk_file.cc: Ditto.
2602 * path.cc: Ditto.
2603 * path.h: Ditto.
2604 * syscalls.cc: Ditto.
2605 * times.cc (utimes): Use path_conv::isdir() instead of explicit
2606 GetFileAttributes() call.
2607
5daa0835
CF
26082002-01-13 Christopher Faylor <cgf@redhat.com>
2609
2610 * dcrt0.cc (multiple_cygwin_problem): Clarify logic and make
2611 CYGWIN_MISMATCH_OK more powerful.
2612
06486d9e
CF
26132002-01-10 Christopher Faylor <cgf@redhat.com>
2614
2615 * exceptions.cc (sig_handle): Accept a second argument indicating
2616 whether the signal came from this process or not.
2617 * sigproc.h: Reflect sig_handle arg change.
2618 * signal.cc (kill_pgrp): Add sigframe info.
2619 (abort): New function. Eliminates newlib function of same name.
2620 * sigproc.cc (wait_sig): Pass "signal from this process" value as arg
2621 2.
2622
bb5225c2
CV
26232002-01-10 Corinna Vinschen <corinna@vinschen.de>
2624
2625 * syscalls.cc (pathconf): Guard _PC_PATH_MAX branch against invalid
2626 file parameter.
2627
c0a8e8d0 26282002-01-09 Christopher Faylor <cgf@redhat.com>
291be307 2629 Robert Collins <rbtcollins@hotmail.com>
c0a8e8d0
CF
2630
2631 * exceptions.cc (early_stuff_init): Rename from misnamed
2632 set_console_handler.
2633 (ctrl_c_handler): Attempt to work around potential signal duplication
2634 during process startup.
2635 (sig_handle): Ignore SIGINT when we're just an "exec stub".
2636 * spawn.cc (spawn_guts): Store pid of spawned process in global for use
2637 by ctrl_c_handler.
2638 * dcrt0.cc (dll_crt0_1): Call renamed initialization function.
2639 * winsup.h: Reflect function name change.
2640
fe37dd79
CV
26412002-01-08 Corinna Vinschen <corinna@vinschen.de>
2642
2643 * net.cc (cygwin_accept): Set sun_path for newly connected socket.
2644
cbf7a9eb
CF
26452002-01-07 Ralf Habacker <Ralf.Habacker@freenet.de>
2646
2647 * Makefile.in: Add uninstall target.
2648
a2e12d0c
CF
26492002-01-07 Christopher Faylor <cgf@redhat.com>
2650
2651 * sigproc.cc (getsem): Clean up debugging output.
2652
4a08cbfe
CF
26532002-01-07 Christopher Faylor <cgf@redhat.com>
2654
2655 * sigproc.cc (getsem): Set errno when unable to create own semaphore.
2656 Reorganize to make clearer that error should only come from initial
2657 creation of process semaphore.
2658
10dedaaa
CF
26592002-01-06 Christopher Faylor <cgf@redhat.com>
2660
2661 * dtable.cc (dtable::init_std_file_from_handle): Add some defensive
2662 code to invalid handle case.
2663
d6154fb7
CV
26642002-01-06 Corinna Vinschen <corinna@vinschen.de>
2665
2666 * ioctl.cc (ioctl): Make third argument optional.
2667 * include/sys/ioctl.h: Ditto in declaration.
2668 * dtable.cc (dtable::init_std_file_from_handle): Revert previous
2669 bogus patch.
2670 * window.cc (WndProc): Raise SIGURG instead of SIGIO in case of FD_OOB
2671 message.
2672
9125cbd7 26732002-01-05 Christopher Faylor <cgf@redhat.com>
fcb76c5d 2674
9125cbd7
CF
2675 * dir.cc (opendir): Guarantee release of alloced fhandler structure on
2676 error.
fcb76c5d 2677
9125cbd7
CF
26782002-01-05 Corinna Vinschen <corinna@vinschen.de>
2679
2680 * exceptions.cc (sig_handle): Set default action for SIGURG to SIG_IGN.
2681
26822002-01-05 Corinna Vinschen <corinna@vinschen.de>
2edba236
CV
2683
2684 * dtable.cc (dtable::init_std_file_from_handle): Don't treat NULL
2685 handle as errorneous.
2686
acf05df7
CF
26872002-01-04 Christopher Faylor <cgf@redhat.com>
2688
2689 * cygmagic: Change logic for equality test.
2690
7acba971
CF
26912002-01-04 Christopher Faylor <cgf@redhat.com>
2692
2693 * dir.cc (opendir): Don't attempt to call sub-opendir if ENOENT.
2694
9125cbd7 26952002-01-04 Corinna Vinschen <corinna@vinschen.de>
dc63cea5
CV
2696
2697 * net.cc: Replace usage of AF_UNIX by Posix compliant AF_LOCAL
2698 throughout.
2699 (socketpair): Explicitly allow SOCK_STREAM and SOCK_DGRAM socket types
2700 in families AF_UNIX and AF_LOCAL. Explicitly allow PF_UNSPEC, PF_LOCAL
2701 and PF_INET protocols. Return error otherwise. Implement datagram
2702 socketpairs.
2703
3b789217
CF
27042002-01-01 Christopher Faylor <cgf@redhat.com>
2705
291be307 2706 * speclib: Remove temp files automatically.
3b789217 2707
2fe27909 27082002-01-01 Corinna Vinschen <corinna@vinschen.de>
2fe27909
CV
2709 * fhandler.h (fhandler_socket::sun_path): New private member.
2710 (fhandler_socket::set_sun_path): New method.
2711 (fhandler_socket::get_sun_path): Ditto.
2712 * fhandler_socket.cc (fhandler_socket::fhandler_socket): Initialize
2713 sun_path to NULL.
2714 (fhandler_socket::~fhandler_socket): Free sun_path if needed.
2715 (fhandler_socket::set_sun_path): New method.
2716 * net.cc (cygwin_bind): Set sun_path to path of local socket file.
2717 (cygwin_getsockname): Add code to return correct sockaddr for unix
2718 domain sockets.
This page took 0.325176 seconds and 5 git commands to generate.