1 2003-02-07 Corinna Vinschen <corinna@vinschen.de>
3 * mmap.cc (mmap_record::alloc_map): De-inline. Add offset and length
4 parameter. Only protect pages actually unused currently. Do job
5 of map_map() when initializing a map.
6 (mmap_record::map_map): Reduce functionality for the reuse case
7 of private anonymous mapping.
8 (mmap_record::fixup_map): Format change.
9 (list::add_record): Add offset and length parameter to call
10 mmap_record::alloc_map() correctly.
11 (mmap64): Rename `l' variable to `map_list'. Accomodate above changes.
12 (munmap): Rename `l' variable to `map_list'.
14 (fhandler_disk_file::mmap): Streamline code.
16 (fixup_mmaps_after_fork): Rename `l' variable to `map_list'.
18 2003-02-07 Vaclav Haisman <V.Haisman@sh.cvut.cz>
19 Christopher Faylor <cgf@redhat.com>
21 * exceptions.cc (try_to_debug): Set priority of current thread rather
22 than the main thread. Make busy waiting loop less busy. Restore
23 priority when function returns.
25 2003-02-07 Christopher Faylor <cgf@redhat.com>
27 * malloc.cc (DEFAULT_MMAP_THRESHOLD): Set high to avoid mmaps.
29 2003-02-07 Christopher Faylor <cgf@redhat.com>
31 * pipe.cc (fhandler_pipe::close): Avoid extraneous this->.
33 2003-02-06 Christopher Faylor <cgf@redhat.com>
35 * heap.cc (heap_init): Remove debugging code.
37 2003-02-06 Pierre Humblet <pierre.humblet@ieee.org>
39 * security.h: Introduce names UNKNOWN_UID and UNKNOWN_GID and delete
40 declaration of is_grp_member.
41 * uinfo.cc (internal_getlogin): Use UNKNOWN_GID.
42 * passwd.cc (pwdgrp::read_passwd): Use UNKNOWN_UID.
43 * grp.cc (pwdgrp::read_group): Change group name to provide better
45 (getgrgid): Use gid16togid32.
46 * sec_helper.cc (is_grp_member): Delete.
48 2003-02-05 Christopher Faylor <cgf@redhat.com>
50 * path.cc: Change 'to_posix_p' to 'to_posix' throughout.
51 (conv_path_list_buf_size): Accommodate relative paths.
53 2003-02-05 Christopher Faylor <cgf@redhat.com>
55 * path.cc (etc::dir_changed): Fix debug printf.
57 2003-02-05 Corinna Vinschen <corinna@vinschen.de>
59 * sec_acl.cc (setacl): Move all permission settings to beginning of
60 loop. Set default rights to same values as in alloc_sd(). Set DELETE
61 for owner and default owner only if S_IWOTH is given.
63 2003-02-05 Pierre Humblet <pierre.humblet@ieee.org>
65 * sec_acl.cc: Change all __aclent16_t to __aclent32_t except in
66 wrapper function definitions. Replace call to the aclXYZ functions by
68 (searchace): Change type of third argument to __uid32_t and use
69 ILLEGAL_UID instead of -1;
70 (setacl): Remove some initializations. Only give STANDARD_RIGHTS_WRITE
71 for S_IWOTH. Replace -1 by ILLEGAL_UID.
72 (getacl): Change type of owner_sid, group_sid and ace_sid to cygpsid.
73 In last else clause, suppress second call to ace_sid.get_id and use
74 TRUE in first call. Replace EqualSid by ==.
75 (acl_access): Call internal_getgroups in USER and GROUP cases.
76 (acecmp: Define static.
77 (acl32): Create from 16 bit type.
83 (aclfrommode32): Ditto.
84 (acltopbits32): Ditto.
85 (aclfrompbits32): Ditto.
87 (aclfromtext32): Ditto, and use strechr.
89 (acl): Make it a wrapper function.
97 (aclfrompbits): Ditto.
100 * security.cc (write_sd): Call set_process_privilege and check
102 (alloc_sd): Remove call to set_process_privilege and the owner check.
104 2003-02-05 Christopher Faylor <cgf@redhat.com>
106 * include/sys/cygwin.h: Use C-style comments.
108 2003-02-05 Pierre Humblet <pierre.humblet@ieee.org>
110 * sec_helper.cc (get_sids_info): New function.
111 * security.cc (extract_nt_dom_user): Simplify with strechr.
112 (get_user_groups): Initialize glen to MAX_SID_LEN.
113 (get_user_local_groups): Ditto.
114 (get_attribute_from_acl): Define ace_sid as cygpsid.
115 (get_nt_attribute): Define owner_sid and group_sid as cygpsid.
116 Call get_sids_info instead of cygsid.get_{u,g}id and is_grp_member.
117 (get_nt_object_attribute): Ditto.
118 (alloc_sd): Define ace_sid as cygpsid.
120 2003-02-04 Thomas Pfaff <tpfaff@gmx.net>
122 * syscalls.cc (struct system_cleanup_args): New struct.
123 (system_cleanup): New function.
124 (system): Use pthread_cleanup_push and _pop to save and restore
125 signal handlers and sigprocmask.
127 2003-02-04 Corinna Vinschen <corinna@vinschen.de>
129 * path.cc (symlink): Create security attributes so that only the
130 user can modify the symlink.
131 * security.cc (set_security_attribute): Remove symlink special
134 2003-02-04 Pierre Humblet <pierre.humblet@ieee.org>
136 * grp.cc (internal_getgroups): Do not return without closing
139 2003-02-04 Pierre Humblet <pierre.humblet@ieee.org>
141 * security.h (class cygpsid): New class.
142 (class cygsid): Use cygpsid as base. Remove members psid, get_id,
143 get_uid, get_gid, string, debug_printf and the == and != operators.
144 (cygsidlist::clear_supp): Only do work if setgroups has been called.
145 * sec_helper.cc: Define sid_auth NO_COPY.
146 (cygpsid::operator==): New operator.
147 (cygpsid::get_id): New function.
148 (cygpsid::string): New function.
149 (cygsid::string): Delete.
150 (cygsid::get_id): Delete.
151 * pwdgrp.h: Change arguments of internal_getpwsid,
152 internal_getgrsid and internal_getgroups to cygpsid.
153 * passwd.cc (internal_getpwsid): Change argument from cygsid to cygpsid.
154 * grp.cc (internal_getgrsid): Ditto.
155 (internal_getgroups): Ditto.
157 2003-02-03 Christopher Faylor <cgf@redhat.com>
159 Eliminate most unneeded this-> pointers throughout.
161 2003-02-03 Pierre Humblet <pierre.humblet@ieee.org>
163 * security.h: Add third argument to set_process_privilege.
164 * autoload.cc: Add OpenThreadToken.
165 * sec_helper.cc (set_process_privilege): Add and use use_thread
167 * security.cc (alloc_sd): Modify call to set_process_privilege.
168 Remember the result in each process. If failed and file owner is not
171 2003-02-03 Corinna Vinschen <corinna@vinschen.de>
173 * fhandler_socket.cc (fhandler_socket::recvfrom): Return buffer
174 length and don't set errno in case of WSAEMSGSIZE error.
175 (fhandler_socket::recvmsg): Ditto.
177 2003-02-01 Christopher Faylor <cgf@redhat.com>
179 * grp.cc (getgrent32): Only refresh group entries when at beginning.
180 (internal_getgrsid): Only refresh if uninitialized.
181 (internal_getgrent): Ditto.
182 * passwd.cc (getpwent): Only refresh passwd entries when at beginning.
183 (pwdgrp::read_passwd): linebuf *cannot* be NO_COPY.
184 (internal_getpwsid): Only refresh if uninitialized.
185 (getpass): No need to refresh passwd data here.
186 * pwdgrp.h (refresh): Eliminate default.
188 2003-01-31 Christopher Faylor <cgf@redhat.com>
190 * dlfcn.cc (dlerror): Only report load errors once per error.
192 2003-01-31 Christopher Faylor <cgf@redhat.com>
194 * fhandler_serial.cc (fhandler_serial::open): Avoid extraneous setting
197 * termios.cc (tcsetattr): Correctly record errno after tcsetattr call.
199 2003-01-31 Troy Curtiss <troyc@usa.net>
201 * fhandler_serial.cc (fhandler_serial::tcsetattr): Add error-checking
202 so that if any Win32 SetComm*() calls fail, errno gets set to EINVAL
203 and tcsetattr() returns -1. Catch invalid bitrates, mostly. If baud
204 rate setting is B0, just drop DTR and leave Win32 DCB bitrate as-is
205 since 0 is not a valid Win32 setting.
206 (fhandler_serial::tcgetattr): If DTR is low, populate the bitrate as
207 B0, otherwise get it from the DCB.
209 2003-01-31 Christopher Faylor <cgf@redhat.com>
211 * passwd.cc (pwdgrp::read_passwd): linebuf *must* be static (from
213 * pwdgrp.h (pwdgrp::refresh): Avoid calling read function if we already
214 have lock since that means we are in the process of reading the file.
216 2003-01-31 Jason Tishler <jason@tishler.net>
218 * shared.cc (shared_info::heap_chunk_size): Use correct variable when
221 2003-01-30 Christopher Faylor <cgf@redhat.com>
223 * fhandler_registry.cc (fhandler_registry::exists): Fix off-by-one
224 error when inspecting path.
226 2003-01-29 Christopher Faylor <cgf@redhat.com>
228 * lib/getopt.c: Allow environment variable control of POSIXLY_INCORRECT
231 2003-01-28 Corinna Vinschen <corinna@vinschen.de>
233 * fhandler_socket.cc (fhandler_socket::accept): On successful execution
234 set connection state of returned socket to CONNECTED.
236 2003-01-27 Christopher Faylor <cgf@redhat.com>
238 * passwd.cc (pwdgrp::parse_passwd): Be more unforgiving about
241 2003-01-26 Christopher Faylor <cgf@redhat.com>
243 * uinfo.cc (pwdgrp::next_num): Remove check for NULL since it is no
244 longer a valid return from next_str.
245 (pwdgrp::add_line): Duh. Revert to use strchr.
247 2003-01-26 Christopher Faylor <cgf@redhat.com>
249 * string.h (strechr): New function.
250 * uinfo.cc (pwdgrp::next_str): Search only for input char in string.
251 Return EOS on failure. Don't check for NULL since it shouldn't be
253 (pwdgrp::add_line): Revert to replacing '\n' in input line with '\0'.
254 (pwdgrp::next_num): Pass explicit separator character to next_str.
255 * grp.cc (pwdgrp::parse_group): Ditto.
256 * passwd.cc (pwdgrp::parse_passwd): Ditto. Revamp test for garbage
258 * pwdgrp.h (pwdgrp::next_str): Don't use default parameter.
260 2003-01-26 Christopher Faylor <cgf@redhat.com>
262 * uinfo.cc (pwdgrp::load): Regularize strace output. Add warning for
265 2003-01-26 Christopher Faylor <cgf@redhat.com>
267 * passwd.cc (pwdgrp::parse_passwd): Eliminate use of memset. The
268 structure should always be completely filled out.
269 * grp.cc (pwdgrp::parse_group): Ditto.
271 2003-01-26 Christopher Faylor <cgf@redhat.com>
273 * grp.cc (pwdgrp::parse_group): Fix off-by-one problem in allocating
276 2003-01-26 Christopher Faylor <cgf@redhat.com>
278 * include/sys/strace.h (paranoid_printf): Define as not being part of
281 2003-01-25 Christopher Faylor <cgf@redhat.com>
283 * pwdgrp.h (pwdgrp::next_num): Rename from next_int. Returns
284 true/false if parse operation succeeded.
285 (pwdgrp::reparse): Remove.
286 (pwdgrp::raw_ptr): New function. Returns pointer in line.
287 (pwdgrp::next_num): New functions for parsing other than unsigned long.
288 * grp.cc (pwdgrp::parse_group): Reinstate previous parsing behavior.
289 Don't fill in fields with NULL and assign empty gr_mem to known pointer
290 rather than doing a pointless calloc. Streamline gr_mem parsing.
291 Don't increment curr_lines here.
292 * passwd.cc (pwdgrp::parse_passwd): Use new behavior of next_num.
293 Don't increment curr_lines here.
294 * uinfo.cc (pwdgrp::next_str): Keep returning EOL if out of data.
295 (pwdgrp::reparse): Remove.
296 (pwdgrp::next_num): Rename from next_int. Return bool indicating
297 success of parse, argument returns value parsed.
298 (pwdgrp::add_line): Increment curr_lines here on successful parse.
299 (pwdgrp::load): (from Pierre Humblet) Don't return status. Just report
302 2003-01-25 Christopher Faylor <cgf@redhat.com>
304 * pwdgrp.cc (pwdgrp::reparse): Declare.
305 * uinfo.cc (pwdgrp::reparse): Define.
306 * grp.cc (pwdgrp::parse_group): Use reparse.
308 2003-01-25 Pierre Humblet <pierre.humblet@ieee.org>
310 * syscalls.cc (seteuid32): On Win95 get the pw entry. If it exists
311 update the euid and call cygheap->user.set_name. Remove special
312 handling of ILLEGAL_UID.
313 (setgid32): Add a debug_printf. On Win95, always set the egid.
314 Remove special handling of ILLEGAL_GID. Do not compare gid and gr_gid.
315 * child_info.h (class cygheap_exec_info): Remove uid.
316 * spawn.cc (spawn_guts): Do not set ciresrv.moreinfo->uid.
317 * dcrto.cc (dll_crt0_1): Always call uinfo_init.
318 * uinfo.cc (uinfo_init): Reorganize and close handle if needed.
319 (cygheap_user::ontherange): Do not call internal_getpwnam if pw is NULL.
321 2003-01-24 Christopher Faylor <cgf@redhat.com>
323 * fhandler_console.cc (fhandler_console::send_winch_maybe): Reset
324 scroll region if size changes.
326 2003-01-24 Pierre Humblet <pierre.humblet@ieee.org>
327 Jason Tishler <jason@tishler.net>
329 * cygwin.din: Export setreuid32, setreuid, setregid32, setregid.
330 * syscalls.cc (setreuid32): New function.
334 * include/cygwin/version.h: Bump API minor number.
336 2003-01-23 Christopher Faylor <cgf@redhat.com>
338 * pwdrp.h (pwdgrp::refresh): Lock entire test prior to reading.
340 2003-01-23 Christopher Faylor <cgf@redhat.com>
342 * grp.cc (pwdgrp::parse_group): Eliminate arg and use class member
343 instead. Use next_str and next_int to parse arguments.
344 * passwd.cc (pwdgrp::parse_passwd): Ditto.
345 (grab_string): Eliminate.
347 * pwdgrp.h (pwdgrp::parse): Eliminate input arg.
348 (pwdgrp::parse_passwd): Reflect above change.
349 (pwdgrp::parse_group): Reflect above change.
350 (pwdgrp::next_str): New function.
351 (pwdgrp::next_int): Ditto.
352 (pwdgrp::gets): Eliminate.
353 * uinfo.cc (pwdgrp::next_str): New function.
354 (pwdgrp::next_int): Ditto.
355 (pwdgrp::add_line): Subsume gets.
356 (pwdgrp::gets): Eliminate.
357 (pwdgrp::load): Just call add_line to parse input buffer.
359 2003-01-22 Thomas Pfaff <tpfaff@gmx.net>
361 * include/pthread.h (PTHREAD_MUTEX_RECURSIVE): Revert changes from
362 2003-01-09 mutex patch.
363 (PTHREAD_MUTEX_ERRORCHECK): Ditto.
365 2003-01-22 Corinna Vinschen <corinna@vinschen.de>
367 * cygrun.c: Move from here to ../testsuite.
368 * Makefile.in: Remove cygrun.exe dependencies.
370 2003-01-21 Jason Tishler <jason@tishler.net>
372 * cygwin.din: Export nanosleep().
373 * signal.cc (nanosleep): New function.
374 (sleep): Move old functionality to nanosleep(). Call nanosleep().
375 (usleep): Remove old functionality. Call nanosleep().
376 * include/cygwin/version.h: Bump API minor number.
378 2003-01-21 Christopher Faylor <cgf@redhat.com>
380 * grp.cc: Call gr.refresh() rather than doing isunitialized tests
382 (gr): Use constructor (sigh).
383 (pwdgrp::parse_group): Rename from parse_grp.
384 (pwdgrp::read_group): Rename from read_etc_group. Just call gr.load
385 with a single argument.
386 * passwd.cc: Call pr.refresh() rather than doing isunitialized tests
388 (pr): Use constructor (sigh).
389 (pwdgrp::parse_passwd): Rename from "parse_pwd".
390 (pwdgrp::read_passwd): Rename from read_etc_passwd. Just call pr.load
391 with a single argument.
392 * pwdgrp.h (pwdgrp_state): Eliminate.
393 (pwdgrp): Reflect above renamings.
394 (pwdgrp::etc_ix): Rename from pwd_ix.
395 (pwdgrp::read): New element.
396 (pwdgrp::lock): New element.
397 (pwdgrp::refresh): New function.
398 (pwdgrp::load): Eliminate variations which take buffer arguments.
399 (pwdgrp::pwdgrp): New constructors. Initialize mutex here.
400 * uinfo.cc (pwdgrp::load): Accommodate pwd_ix -> etc_ix renaming.
401 (pwdgrp::load): Set initialized state to true rather than setting state
404 2003-01-21 Christopher Faylor <cgf@redhat.com>
406 * include/cygwin/version.h: Bump DLL minor number.
408 2003-01-21 Pierre Humblet <pierre.humblet@ieee.org>
410 * path.h (etc::change_possible): Revert the type to bool.
411 (etc::set_last_modified): Remove obsolete function.
412 * path.cc (etc::change_possible): Revert type to bool.
413 (etc::test_file_change): Do not test for negative values of
414 change_possible and do not set it to -res.
415 (etc::dir_changed): When the handle is NULL, call memset instead of
416 test_file_changed. When the handle is invalid, return true. Detect
417 filename change in /etc.
418 (etc::file_changed): Remove unneeded check for !fn[n].
419 * uinfo.cc (pwdgrp::load): Eliminate spurious setting of fh to NULL.
420 * pwdgrp.h (pwdgrp::operator =): Eliminate.
422 2003-01-19 Christopher Faylor <cgf@redhat.com>
424 * pwdgrp.h (etc): Move to path.h.
425 (pwdgrp::max_lines): New field.
426 (pwdgrp::curr_lines): New field.
427 (pwdgrp::pwdgrp_buf): Ditto.
428 (pwdgrp_buf_elem_size): Ditto.
429 (pwdgrp_parse): Ditto.
430 (pwdgrp::gets): Just declare here.
431 (pwdgrp::load): Ditto. Just take one argument.
432 (pwdgrp::load): Define overloaded function accepting passwd buf.
433 (pwdgrp::load): Define overloaded function accepting group buf.
434 * grp.cc: Use pwdgrp elements rather than standalone static variables
436 (curr_lines): Eliminate.
438 (add_grp_line): Ditto.
439 (parse_grp): Define as returning boolean. Accept void * arg and line
440 count. Coerce first argument into __group32 buf reference. Increment
441 curr_line as appropriate.
442 (read_etc_group): Pass pwdgrp buffer to gr.load.
443 * passwd.cc: Use pwdgrp elements rather than standalone static variables
445 (curr_lines): Eliminate.
447 (add_grp_line): Ditto.
448 (parse_passwd): Define as returning boolean. Accept void * arg and line
449 count. Coerce first argument into passwd buf reference. Increment
450 curr_line as appropriate.
451 (read_etc_group): Pass pwdgrp buffer to pr.load.
452 * path.cc (etc::fn): Extend buffer size to allow index by 1 rather than
454 (etc::last_modified): Ditto.
455 (etc::change_possible): Ditto. Renamed from sawchange. Change to
456 signed char since elements are now tri-state.
457 (etc::init): Assume "handle" is 1 based rather than 0.
458 (etc::test_file_change): New function. Sets change_possible based on
459 file date comparison.
460 (etc::dir_changed): Check file states immediately after changed_h is
461 initialized to avoid a race.
462 (etc::file_changed): Use test_file_change to detect if file needs to be
464 * path.h (etc): Move class here from pwdgrp.h.
465 * uinfo.cc: Move etc:: functions to path.cc. Move pwdgrp functions
467 (pwdgrp::gets): Eliminate buf checks. Just check eptr and set lptr.
468 (pwdgrp::add_line): New function.
469 (pwdgrp::load): Call generic add_line function which will call correct
472 2003-01-17 Christopher Faylor <cgf@redhat.com>
474 * cygheap.cc: Change most 'int's to 'unsigned's.
475 (_cmalloc): Only check for size of malloced region when calculating
476 bucket. Add overhead when performing the sbrk. Previous change broke
479 2003-01-17 Christopher Faylor <cgf@redhat.com>
481 * dcrt0.cc (initialize_env): Use colon for CYGWIN_DEBUG separator.
482 * grp.cc: Change most statics to NO_COPY throughout.
485 2003-01-17 Christopher Faylor <cgf@redhat.com>
487 * pwdgrp.h: Change some BOOLs to bools.
488 (pwdgrp::pwdgrp): Remove unneeded constructor.
489 * passwd.cc: Change BOOL to bool throughout.
491 2003-01-17 Corinna Vinschen <corinna@vinschen.de>
493 * cygwin.din: Add strerror_r.
494 * include/cygwin/version.h: Bump API minor number.
496 2003-01-17 Christopher Faylor <cgf@redhat.com>
498 * uinfo.cc (etc::dir_changed): Don't print a warning if can't open
499 /etc, unless debugging.
501 2003-01-17 Pierre Humblet <pierre.humblet@ieee.org>
503 * grp.cc (read_etc_group): On NT, add a line for gid = -1. Change name
504 "unknown" to "mkgroup".
505 (internal_getgrgid): Do not return default in nontsec case.
506 (internal_getgroups): Add argument srchsid and look for it in groups if
508 * passwd.cc (read_etc_passwd): On NT, add a line for uid = -1. Use
509 same default uid for Win95 and NT. Call cygheap_user::ontherange to
512 2003-01-16 Christopher Faylor <cgf@redhat.com>
514 * cygheap.cc (init_cygheap::etc_changed): Move to uinfo.cc.
515 * cygheap.h (init_cygheap::etc_changed_h): Remove.
516 (init_cygheap::etc_changed): Ditto.
517 * grp.cc (group_state): Remove. Use gr instead throughout.
518 (gr): Define as class pwdgrp.
519 (read_etc_group): Remove gr definition. Remove calls to
520 set_last_modified and close. Pass add_grp to gr.load to load file.
521 * passwd.cc (passwd_state): Remove. Use pr instead, throughout.
522 (pr): Define as class pwdgrp.
523 (read_etc_passwd): Remove pr definition. Remove calls to
524 set_last_modified and close. Pass add_pwd_line to pr.load to load
526 * pwdgrp.h (etc): New helper class for pwdgrp.
527 (pwdgrp): Combine pwdgrp_check and pwdgrp_read into one class. Remove
528 file_w32 and last_modified fields.
529 (pwdgrp::set_last_modified): Remove.
530 (pwdgrp::isinitializing): Remove FindFirstFile stuff. Move to
532 (pwdgrp::load): Rename from 'open'. Call etc::init to initialize etc
533 scanning. Close file handle after reading buffer into memory. Parse
534 buffer by calling second argument.
535 (pwdgrp::gets): Reorganize slightly to rely on eptr starting at
537 (pwdgrp::close): Remove.
538 * uinfo.cc (etc::dir_changed): New function.
540 (etc::file_changed): Ditto.
541 (etc::set_last_modified): Ditto.
543 2003-01-16 Jason Tishler <jason@tishler.net>
545 * mmap.cc (fixup_mmaps_after_fork): Add ERROR_NOACCESS to the list of
546 ReadProcessMemory() error codes that trigger a retry with temporary
547 PAGE_READONLY access. Note that this can occur on NT 4.0.
549 2003-01-15 Christopher Faylor <cgf@redhat.com>
551 * path.cc (normalize_posix_path): Convert win32 path separators to
552 slashes when full path is specified.
554 2003-01-15 Pierre Humblet <pierre.humblet@ieee.org>
556 * cmalloc.cc (_cmalloc): Fix memory leak.
558 2003-01-15 Corinna Vinschen <corinna@vinschen.de>
560 * autoload.cc: Fix copyright date.
561 * fhandler_dsp.cc: Ditto.
566 * syscalls.cc: Ditto.
570 2003-01-14 Corinna Vinschen <corinna@vinschen.de>
572 * mmap.cc (fixup_mmaps_after_fork): Copy protection to child process.
573 Change ambiguous debug output.
575 2003-01-14 Corinna Vinschen <corinna@vinschen.de>
577 * mmap.cc (mmap_record::access): Change argument type to caddr_t
579 (mprotect): Protect against calling VirtualProtect() for shared
581 (fixup_mmaps_after_fork): If ReadProcessMemory() fails, try to
582 change protection of parent page to PAGE_READONLY, then try again.
583 Revert protection afterwards.
585 2003-01-14 Thomas Pfaff <tpfaff@gmx.net>
587 * syscalls.cc (system): Add pthread_testcancel call.
588 * thread.cc: Update list of cancellation points.
590 2003-01-14 Thomas Pfaff <tpfaff@gmx.net>
592 * wait.cc: Include thread.h
593 (wait4): Add pthread_testcancel call.
594 Wait for child process and cancellation event.
595 * thread.cc: Update list of cancellation points.
597 2003-01-14 Thomas Pfaff <tpfaff@gmx.net>
599 * signal.cc (sleep): Add pthread_testcancel call.
600 Wait for signal and cancellation event.
603 2003-01-14 Thomas Pfaff <tpfaff@gmx.net>
605 * exceptions.cc (handle_sigsuspend): Add pthread_testcancel call.
606 Wait for signal and cancellation event.
607 * thread.cc: Update list of cancellation points.
609 2003-01-14 David Huang <davehzhr@hotmail.com>
611 * fhandler_dsp.cc (fhandler_dsp::ioctl): Add limited support for
614 2003-01-12 Christopher Faylor <cgf@redhat.com>
618 2003-01-12 Corinna Vinschen <corinna@vinschen.de>
620 * uname.cc (uname): Use cygwin_gethostname() to retrieve hostname.
622 2003-01-12 Pierre Humblet <pierre.humblet@ieee.org>
624 * sec_acl.cc (search_ace): Use id == -1, instead of < 0, as wildcard.
625 (setacl): Start the search for a matching default at the next entry.
626 Invalidate the type of merged entries instead of clearing it.
627 Use well_known_creator for default owner and owning group and do
628 not try to merge non-default and default entries in these cases.
629 (getacl): Recognize well_known_creator for default owner and group.
630 (acl_worker): Improve errno settings and streamline the nontsec case.
631 * security.cc (write_sd): Remove the call to set_process_privilege.
632 (alloc_sd): If the owner changes, call set_process_privilege and return
633 immediately on failure. Change inheritance rules: on new directories add
634 inherit only allow ACEs for creator_owner, creator_group and everyone.
635 Preserve all inheritances through chmod and chown calls. Introduce
636 isownergroup to implement the uid == gid case, to keep the inheritance
637 code simple. Do not initialize owner_sid and group_sid and stop using
640 2003-01-10 Christopher Faylor <cgf@redhat.com>
642 * net.cc: Use gethostname define from winsock2.h.
644 2003-01-10 Christopher Faylor <cgf@redhat.com>
646 * path.cc: Unrevert below reversion except for
647 mount_info::conv_to_posix_path part.
649 2003-01-10 Corinna Vinschen <corinna@vinschen.de>
651 * path.cc: Revert patch from 2003-01-09 to normalize a windows path
652 rather than converting to posix.
654 2003-01-10 Corinna Vinschen <corinna@vinschen.de>
656 * autoload.cc (gethostname): Make call optional, return 1 if function
658 * net.cc (cygwin_gethostname): Call GetComputerName if return value
659 of gethostname is non-zero.
661 2003-01-10 Charles Wilson <cwilson@ece.gatech.edu>
663 * cygwin.din: Add asprintf and vasprintf, as well as the reentrant
664 versions and underscore variants.
665 * include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR.
667 2003-01-10 Corinna Vinschen <corinna@vinschen.de>
669 * net.cc (cygwin_gethostname): Fix call to wsock function gethostname.
671 2003-01-09 Christopher Faylor <cgf@redhat.com>
673 * cygthread.cc (cygthread::cygthread): Be more noisy about odd
675 * miscfuncs.cc (low_priority_sleep): Sleep in regular priority if
676 that's what we're currently running at.
678 2003-01-09 Thomas Pfaff <tpfaff@gmx.net>
680 * include/semaphore.h: Modify typedef for sem_t.
681 * include/cygwin/types.h: Modify typedefs for pthread_t,
682 pthread_mutex_t, pthread_key_t, pthread_attr_t,
683 pthread_mutexattr_t, pthread_condattr_t, pthread_cond_t,
684 pthread_rwlock_t and pthread_rwlockattr_t.
686 2003-01-09 Thomas Pfaff <tpfaff@gmx.net>
688 * thread.h (WAIT_CANCELED): New define.
689 (pthread::cancelable_wait): New static method.
690 * thread.cc (pthread::cancelable_wait): Implement.
691 (semaphore::Wait): Wait on semaphore and thread cancellation.
692 (pthread::join): Wait on joined thread and thread cancellation.
693 (semaphore::wait): Add testcancel to check for thread
694 cancellation even if the semaphore is available.
696 2003-01-09 Thomas Pfaff <tpfaff@gmx.net>
698 * include/pthread.h: Add define for errorchecking mutexes.
699 Change default mutex type.
700 * thread.cc (pthread_cond::TimedWait): Update mutex unlock
702 (pthread_mutex::pthread_mutex): New implement.
703 (pthread_mutex::~pthread_mutex): Ditto.
704 (pthread_mutex::Lock): Ditto.
705 (pthread_mutex::TryLock): Ditto.
706 (pthread_mutex::UnLock): Ditto.
707 (pthread_mutex::Destroy): Implement new method.
708 (pthread_mutex::SetOwner): Ditto.
709 (pthread_mutex::LockRecursive): Ditto.
710 (pthread_mutex::fixup_after_fork): Restore locking state after
712 (__pthread_mutex_lock): Return pthread_mutex::Lock errorcode.
713 (__pthread_mutex_trylock): Return pthread_mutex::TryLock
715 (__pthread_mutex_unlock): Return pthread_mutex::UnLock
717 (__pthread_mutex_destroy): Call pthread_mutex::Destroy to
719 (__pthread_mutexattr_settype): Allow errorchecking and recursive
721 * thread.h (MUTEX_LOCK_COUNTER_INITIAL): New define.
722 (pthread_mutex::criticalsection): Remove.
723 (pthread_mutex::lock_counter): New member.
724 (pthread_mutex::recursion_counter): Ditto.
725 (pthread_mutex::owner): Ditto.
726 (pthread_mutex::type): Ditto.
727 (pthread_mutex::Destroy): New method.
728 (pthread_mutex::SetOwner): Ditto.
729 (pthread_mutex::LockRecursive): Ditto.
731 2003-01-09 Thomas Pfaff <tpfaff@gmx.net>
733 * pthread.cc (pthread_cond_init): Use new pthread_cond::init.
734 * thread.cc: Some white spaces cleanups.
735 Change __pthread_cond_init to pthread_cond::init throughout.
736 (nativeMutex): Move class methods outside pthread_mutex.
737 (MTinterface::Init): Initialize pthread_cond init lock.
738 (pthread_cond::condInitializationLock): Instantiate.
739 (pthread_cond::initMutex): New Method.
740 (pthread_cond::isGoodInitializerOrBadObject): Ditto.
741 * thread.h: Some white spaces cleanups.
742 (nativeMutex): Move class declaration outside pthread_mutex.
743 (pthread_cond::condInitializationLock): New static member.
744 (pthread_cond::initMutex): New Method.
745 (pthread_cond::isGoodInitializerOrBadObject): Ditto.
746 (__pthread_cond_init): Remove prototype.
748 2003-01-09 Corinna Vinschen <corinna@vinschen.de>
750 * fhandler_disk_file.cc (num_entries): Return 2 as link count if
751 directory unreadable.
753 2003-01-09 Corinna Vinschen <corinna@vinschen.de>
755 * security.cc (get_nt_attribute): Always return -1 when read_sd()
757 (get_file_attribute): Set permissions to 0 and owner/group to -1
758 if security descriptor is unreadable.
760 2003-01-09 Christopher Faylor <cgf@redhat.com>
762 Use isdirsep rather than SLASH_P throughout.
763 * path.cc (iscygdrive): Disallow /cygdrive\x.
764 (normalize_posix_path): "Normalize" a windows path, if detected, rather
765 than converting to posix.
767 2003-01-06 Troy Curtiss <troyc@usa.net>
769 * fhandler_serial.cc (fhandler_serial::tcsetattr): Add support and
770 capability checking for B230400 bitrate.
771 (fhandler_serial::tcgetattr): Add support for B230400 bitrate.
772 * include/sys/termios.h: Add B230400 definition for Posix support of
775 2003-01-05 Christopher Faylor <cgf@redhat.com>
777 * pinfo.cc (_pinfo::commune_send): Use myself->lock rather than just
780 2003-01-03 Christopher Faylor <cgf@redhat.com>
782 * dtable.h (dtable::in_vfork_cleanup): New function. True if vfork
784 * dtable.cc (dtable::vfork_parent_restore): Remove assertion.
785 * pipe.cc (fhandler_pipe::close): Don't close read_state during
786 fork_fixup since it wasn't inherited.
788 2003-01-01 Christopher Faylor <cgf@redhat.com>
790 * passwd.cc (getpwuid_r32): Revert previous change.
792 2003-01-01 Christopher Faylor <cgf@redhat.com>
794 * sysconf.cc (sysconf): Return arbitrary values for
795 _SC_GETGR_R_SIZE_MAX, _SC_LOGIN_NAME_MAX, _SC_GETPW_R_SIZE_MAX.
797 * passwd.cc (getpwuid_r32): Add uid/gid fields to size check