]> sourceware.org Git - newlib-cygwin.git/blob - winsup/cygwin/ChangeLog
* pwdgrp.cc (pwdgrp::reparse): Declare.
[newlib-cygwin.git] / winsup / cygwin / ChangeLog
1 2003-01-25 Christopher Faylor <cgf@redhat.com>
2
3 * pwdgrp.cc (pwdgrp::reparse): Declare.
4 * uinfo.cc (pwdgrp::reparse): Define.
5 * grp.cc (pwdgrp::parse_group): Use.
6
7 2003-01-25 Pierre Humblet <pierre.humblet@ieee.org>
8
9 * syscalls.cc (seteuid32): On Win95 get the pw entry. If it exists
10 update the euid and call cygheap->user.set_name. Remove special
11 handling of ILLEGAL_UID.
12 (setgid32): Add a debug_printf. On Win95, always set the egid.
13 Remove special handling of ILLEGAL_GID. Do not compare gid and gr_gid.
14 * child_info.h (class cygheap_exec_info): Remove uid.
15 * spawn.cc (spawn_guts): Do not set ciresrv.moreinfo->uid.
16 * dcrto.cc (dll_crt0_1): Always call uinfo_init.
17 * uinfo.cc (uinfo_init): Reorganize and close handle if needed.
18 (cygheap_user::ontherange): Do not call internal_getpwnam if pw is NULL.
19
20 2003-01-24 Christopher Faylor <cgf@redhat.com>
21
22 * fhandler_console.cc (fhandler_console::send_winch_maybe): Reset
23 scroll region if size changes.
24
25 2003-01-24 Pierre Humblet <pierre.humblet@ieee.org>
26 Jason Tishler <jason@tishler.net>
27
28 * cygwin.din: Export setreuid32, setreuid, setregid32, setregid.
29 * syscalls.cc (setreuid32): New function.
30 (setreuid): Ditto.
31 (setregid32): Ditto.
32 (setregid): Ditto.
33 * include/cygwin/version.h: Bump API minor number.
34
35 2003-01-23 Christopher Faylor <cgf@redhat.com>
36
37 * pwdrp.h (pwdgrp::refresh): Lock entire test prior to reading.
38
39 2003-01-23 Christopher Faylor <cgf@redhat.com>
40
41 * grp.cc (pwdgrp::parse_group): Eliminate arg and use class member
42 instead. Use next_str and next_int to parse arguments.
43 * passwd.cc (pwdgrp::parse_passwd): Ditto.
44 (grab_string): Eliminate.
45 (grab_int): Ditto.
46 * pwdgrp.h (pwdgrp::parse): Eliminate input arg.
47 (pwdgrp::parse_passwd): Reflect above change.
48 (pwdgrp::parse_group): Reflect above change.
49 (pwdgrp::next_str): New function.
50 (pwdgrp::next_int): Ditto.
51 (pwdgrp::gets): Eliminate.
52 * uinfo.cc (pwdgrp::next_str): New function.
53 (pwdgrp::next_int): Ditto.
54 (pwdgrp::add_line): Subsume gets.
55 (pwdgrp::gets): Eliminate.
56 (pwdgrp::load): Just call add_line to parse input buffer.
57
58 2003-01-22 Thomas Pfaff <tpfaff@gmx.net>
59
60 * include/pthread.h (PTHREAD_MUTEX_RECURSIVE): Revert changes from
61 2003-01-09 mutex patch.
62 (PTHREAD_MUTEX_ERRORCHECK): Ditto.
63
64 2003-01-22 Corinna Vinschen <corinna@vinschen.de>
65
66 * cygrun.c: Move from here to ../testsuite.
67 * Makefile.in: Remove cygrun.exe dependencies.
68
69 2003-01-21 Jason Tishler <jason@tishler.net>
70
71 * cygwin.din: Export nanosleep().
72 * signal.cc (nanosleep): New function.
73 (sleep): Move old functionality to nanosleep(). Call nanosleep().
74 (usleep): Remove old functionality. Call nanosleep().
75 * include/cygwin/version.h: Bump API minor number.
76
77 2003-01-21 Christopher Faylor <cgf@redhat.com>
78
79 * grp.cc: Call gr.refresh() rather than doing isunitialized tests
80 throughout.
81 (gr): Use constructor (sigh).
82 (pwdgrp::parse_group): Rename from parse_grp.
83 (pwdgrp::read_group): Rename from read_etc_group. Just call gr.load
84 with a single argument.
85 * passwd.cc: Call pr.refresh() rather than doing isunitialized tests
86 throughout.
87 (pr): Use constructor (sigh).
88 (pwdgrp::parse_passwd): Rename from "parse_pwd".
89 (pwdgrp::read_passwd): Rename from read_etc_passwd. Just call pr.load
90 with a single argument.
91 * pwdgrp.h (pwdgrp_state): Eliminate.
92 (pwdgrp): Reflect above renamings.
93 (pwdgrp::etc_ix): Rename from pwd_ix.
94 (pwdgrp::read): New element.
95 (pwdgrp::lock): New element.
96 (pwdgrp::refresh): New function.
97 (pwdgrp::load): Eliminate variations which take buffer arguments.
98 (pwdgrp::pwdgrp): New constructors. Initialize mutex here.
99 * uinfo.cc (pwdgrp::load): Accommodate pwd_ix -> etc_ix renaming.
100 (pwdgrp::load): Set initialized state to true rather than setting state
101 to loaded.
102
103 2003-01-21 Christopher Faylor <cgf@redhat.com>
104
105 * include/cygwin/version.h: Bump DLL minor number.
106
107 2003-01-21 Pierre Humblet <pierre.humblet@ieee.org>
108
109 * path.h (etc::change_possible): Revert the type to bool.
110 (etc::set_last_modified): Remove obsolete function.
111 * path.cc (etc::change_possible): Revert type to bool.
112 (etc::test_file_change): Do not test for negative values of
113 change_possible and do not set it to -res.
114 (etc::dir_changed): When the handle is NULL, call memset instead of
115 test_file_changed. When the handle is invalid, return true. Detect
116 filename change in /etc.
117 (etc::file_changed): Remove unneeded check for !fn[n].
118 * uinfo.cc (pwdgrp::load): Eliminate spurious setting of fh to NULL.
119 * pwdgrp.h (pwdgrp::operator =): Eliminate.
120
121 2003-01-19 Christopher Faylor <cgf@redhat.com>
122
123 * pwdgrp.h (etc): Move to path.h.
124 (pwdgrp::max_lines): New field.
125 (pwdgrp::curr_lines): New field.
126 (pwdgrp::pwdgrp_buf): Ditto.
127 (pwdgrp_buf_elem_size): Ditto.
128 (pwdgrp_parse): Ditto.
129 (pwdgrp::gets): Just declare here.
130 (pwdgrp::load): Ditto. Just take one argument.
131 (pwdgrp::load): Define overloaded function accepting passwd buf.
132 (pwdgrp::load): Define overloaded function accepting group buf.
133 * grp.cc: Use pwdgrp elements rather than standalone static variables
134 throughout.
135 (curr_lines): Eliminate.
136 (max_lines): Ditto.
137 (add_grp_line): Ditto.
138 (parse_grp): Define as returning boolean. Accept void * arg and line
139 count. Coerce first argument into __group32 buf reference. Increment
140 curr_line as appropriate.
141 (read_etc_group): Pass pwdgrp buffer to gr.load.
142 * passwd.cc: Use pwdgrp elements rather than standalone static variables
143 throughout.
144 (curr_lines): Eliminate.
145 (max_lines): Ditto.
146 (add_grp_line): Ditto.
147 (parse_passwd): Define as returning boolean. Accept void * arg and line
148 count. Coerce first argument into passwd buf reference. Increment
149 curr_line as appropriate.
150 (read_etc_group): Pass pwdgrp buffer to pr.load.
151 * path.cc (etc::fn): Extend buffer size to allow index by 1 rather than
152 zero.
153 (etc::last_modified): Ditto.
154 (etc::change_possible): Ditto. Renamed from sawchange. Change to
155 signed char since elements are now tri-state.
156 (etc::init): Assume "handle" is 1 based rather than 0.
157 (etc::test_file_change): New function. Sets change_possible based on
158 file date comparison.
159 (etc::dir_changed): Check file states immediately after changed_h is
160 initialized to avoid a race.
161 (etc::file_changed): Use test_file_change to detect if file needs to be
162 updated.
163 * path.h (etc): Move class here from pwdgrp.h.
164 * uinfo.cc: Move etc:: functions to path.cc. Move pwdgrp functions
165 here.
166 (pwdgrp::gets): Eliminate buf checks. Just check eptr and set lptr.
167 (pwdgrp::add_line): New function.
168 (pwdgrp::load): Call generic add_line function which will call correct
169 parser.
170
171 2003-01-17 Christopher Faylor <cgf@redhat.com>
172
173 * cygheap.cc: Change most 'int's to 'unsigned's.
174 (_cmalloc): Only check for size of malloced region when calculating
175 bucket. Add overhead when performing the sbrk. Previous change broke
176 _crealloc.
177
178 2003-01-17 Christopher Faylor <cgf@redhat.com>
179
180 * dcrt0.cc (initialize_env): Use colon for CYGWIN_DEBUG separator.
181 * grp.cc: Change most statics to NO_COPY throughout.
182 * passwd.cc: Ditto.
183
184 2003-01-17 Christopher Faylor <cgf@redhat.com>
185
186 * pwdgrp.h: Change some BOOLs to bools.
187 (pwdgrp::pwdgrp): Remove unneeded constructor.
188 * passwd.cc: Change BOOL to bool throughout.
189
190 2003-01-17 Corinna Vinschen <corinna@vinschen.de>
191
192 * cygwin.din: Add strerror_r.
193 * include/cygwin/version.h: Bump API minor number.
194
195 2003-01-17 Christopher Faylor <cgf@redhat.com>
196
197 * uinfo.cc (etc::dir_changed): Don't print a warning if can't open
198 /etc, unless debugging.
199
200 2003-01-17 Pierre Humblet <pierre.humblet@ieee.org>
201
202 * grp.cc (read_etc_group): On NT, add a line for gid = -1. Change name
203 "unknown" to "mkgroup".
204 (internal_getgrgid): Do not return default in nontsec case.
205 (internal_getgroups): Add argument srchsid and look for it in groups if
206 not NULL.
207 * passwd.cc (read_etc_passwd): On NT, add a line for uid = -1. Use
208 same default uid for Win95 and NT. Call cygheap_user::ontherange to
209 initialize HOME.
210
211 2003-01-16 Christopher Faylor <cgf@redhat.com>
212
213 * cygheap.cc (init_cygheap::etc_changed): Move to uinfo.cc.
214 * cygheap.h (init_cygheap::etc_changed_h): Remove.
215 (init_cygheap::etc_changed): Ditto.
216 * grp.cc (group_state): Remove. Use gr instead throughout.
217 (gr): Define as class pwdgrp.
218 (read_etc_group): Remove gr definition. Remove calls to
219 set_last_modified and close. Pass add_grp to gr.load to load file.
220 * passwd.cc (passwd_state): Remove. Use pr instead, throughout.
221 (pr): Define as class pwdgrp.
222 (read_etc_passwd): Remove pr definition. Remove calls to
223 set_last_modified and close. Pass add_pwd_line to pr.load to load
224 file.
225 * pwdgrp.h (etc): New helper class for pwdgrp.
226 (pwdgrp): Combine pwdgrp_check and pwdgrp_read into one class. Remove
227 file_w32 and last_modified fields.
228 (pwdgrp::set_last_modified): Remove.
229 (pwdgrp::isinitializing): Remove FindFirstFile stuff. Move to
230 etc::file_changed.
231 (pwdgrp::load): Rename from 'open'. Call etc::init to initialize etc
232 scanning. Close file handle after reading buffer into memory. Parse
233 buffer by calling second argument.
234 (pwdgrp::gets): Reorganize slightly to rely on eptr starting at
235 beginning of buffer.
236 (pwdgrp::close): Remove.
237 * uinfo.cc (etc::dir_changed): New function.
238 (etc::init): Ditto.
239 (etc::file_changed): Ditto.
240 (etc::set_last_modified): Ditto.
241
242 2003-01-16 Jason Tishler <jason@tishler.net>
243
244 * mmap.cc (fixup_mmaps_after_fork): Add ERROR_NOACCESS to the list of
245 ReadProcessMemory() error codes that trigger a retry with temporary
246 PAGE_READONLY access. Note that this can occur on NT 4.0.
247
248 2003-01-15 Christopher Faylor <cgf@redhat.com>
249
250 * path.cc (normalize_posix_path): Convert win32 path separators to
251 slashes when full path is specified.
252
253 2003-01-15 Pierre Humblet <pierre.humblet@ieee.org>
254
255 * cmalloc.cc (_cmalloc): Fix memory leak.
256
257 2003-01-15 Corinna Vinschen <corinna@vinschen.de>
258
259 * autoload.cc: Fix copyright date.
260 * fhandler_dsp.cc: Ditto.
261 * mmap.cc: Ditto.
262 * net.cc: Ditto.
263 * ntdll.h: Ditto.
264 * signal.cc: Ditto.
265 * syscalls.cc: Ditto.
266 * uname.cc: Ditto.
267 * wait.cc: Ditto.
268
269 2003-01-14 Corinna Vinschen <corinna@vinschen.de>
270
271 * mmap.cc (fixup_mmaps_after_fork): Copy protection to child process.
272 Change ambiguous debug output.
273
274 2003-01-14 Corinna Vinschen <corinna@vinschen.de>
275
276 * mmap.cc (mmap_record::access): Change argument type to caddr_t
277 for strictness.
278 (mprotect): Protect against calling VirtualProtect() for shared
279 pages on 9x/Me.
280 (fixup_mmaps_after_fork): If ReadProcessMemory() fails, try to
281 change protection of parent page to PAGE_READONLY, then try again.
282 Revert protection afterwards.
283
284 2003-01-14 Thomas Pfaff <tpfaff@gmx.net>
285
286 * syscalls.cc (system): Add pthread_testcancel call.
287 * thread.cc: Update list of cancellation points.
288
289 2003-01-14 Thomas Pfaff <tpfaff@gmx.net>
290
291 * wait.cc: Include thread.h
292 (wait4): Add pthread_testcancel call.
293 Wait for child process and cancellation event.
294 * thread.cc: Update list of cancellation points.
295
296 2003-01-14 Thomas Pfaff <tpfaff@gmx.net>
297
298 * signal.cc (sleep): Add pthread_testcancel call.
299 Wait for signal and cancellation event.
300 (usleep): Ditto.
301
302 2003-01-14 Thomas Pfaff <tpfaff@gmx.net>
303
304 * exceptions.cc (handle_sigsuspend): Add pthread_testcancel call.
305 Wait for signal and cancellation event.
306 * thread.cc: Update list of cancellation points.
307
308 2003-01-14 David Huang <davehzhr@hotmail.com>
309
310 * fhandler_dsp.cc (fhandler_dsp::ioctl): Add limited support for
311 SNDCTL_DSP_GETFMTS.
312
313 2003-01-12 Christopher Faylor <cgf@redhat.com>
314
315 * ntdll.h: Fix typo.
316
317 2003-01-12 Corinna Vinschen <corinna@vinschen.de>
318
319 * uname.cc (uname): Use cygwin_gethostname() to retrieve hostname.
320
321 2003-01-12 Pierre Humblet <pierre.humblet@ieee.org>
322
323 * sec_acl.cc (search_ace): Use id == -1, instead of < 0, as wildcard.
324 (setacl): Start the search for a matching default at the next entry.
325 Invalidate the type of merged entries instead of clearing it.
326 Use well_known_creator for default owner and owning group and do
327 not try to merge non-default and default entries in these cases.
328 (getacl): Recognize well_known_creator for default owner and group.
329 (acl_worker): Improve errno settings and streamline the nontsec case.
330 * security.cc (write_sd): Remove the call to set_process_privilege.
331 (alloc_sd): If the owner changes, call set_process_privilege and return
332 immediately on failure. Change inheritance rules: on new directories add
333 inherit only allow ACEs for creator_owner, creator_group and everyone.
334 Preserve all inheritances through chmod and chown calls. Introduce
335 isownergroup to implement the uid == gid case, to keep the inheritance
336 code simple. Do not initialize owner_sid and group_sid and stop using
337 the variable psd.
338
339 2003-01-10 Christopher Faylor <cgf@redhat.com>
340
341 * net.cc: Use gethostname define from winsock2.h.
342
343 2003-01-10 Christopher Faylor <cgf@redhat.com>
344
345 * path.cc: Unrevert below reversion except for
346 mount_info::conv_to_posix_path part.
347
348 2003-01-10 Corinna Vinschen <corinna@vinschen.de>
349
350 * path.cc: Revert patch from 2003-01-09 to normalize a windows path
351 rather than converting to posix.
352
353 2003-01-10 Corinna Vinschen <corinna@vinschen.de>
354
355 * autoload.cc (gethostname): Make call optional, return 1 if function
356 can't get loaded.
357 * net.cc (cygwin_gethostname): Call GetComputerName if return value
358 of gethostname is non-zero.
359
360 2003-01-10 Charles Wilson <cwilson@ece.gatech.edu>
361
362 * cygwin.din: Add asprintf and vasprintf, as well as the reentrant
363 versions and underscore variants.
364 * include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR.
365
366 2003-01-10 Corinna Vinschen <corinna@vinschen.de>
367
368 * net.cc (cygwin_gethostname): Fix call to wsock function gethostname.
369
370 2003-01-09 Christopher Faylor <cgf@redhat.com>
371
372 * cygthread.cc (cygthread::cygthread): Be more noisy about odd
373 condition.
374 * miscfuncs.cc (low_priority_sleep): Sleep in regular priority if
375 that's what we're currently running at.
376
377 2003-01-09 Thomas Pfaff <tpfaff@gmx.net>
378
379 * include/semaphore.h: Modify typedef for sem_t.
380 * include/cygwin/types.h: Modify typedefs for pthread_t,
381 pthread_mutex_t, pthread_key_t, pthread_attr_t,
382 pthread_mutexattr_t, pthread_condattr_t, pthread_cond_t,
383 pthread_rwlock_t and pthread_rwlockattr_t.
384
385 2003-01-09 Thomas Pfaff <tpfaff@gmx.net>
386
387 * thread.h (WAIT_CANCELED): New define.
388 (pthread::cancelable_wait): New static method.
389 * thread.cc (pthread::cancelable_wait): Implement.
390 (semaphore::Wait): Wait on semaphore and thread cancellation.
391 (pthread::join): Wait on joined thread and thread cancellation.
392 (semaphore::wait): Add testcancel to check for thread
393 cancellation even if the semaphore is available.
394
395 2003-01-09 Thomas Pfaff <tpfaff@gmx.net>
396
397 * include/pthread.h: Add define for errorchecking mutexes.
398 Change default mutex type.
399 * thread.cc (pthread_cond::TimedWait): Update mutex unlock
400 calls.
401 (pthread_mutex::pthread_mutex): New implement.
402 (pthread_mutex::~pthread_mutex): Ditto.
403 (pthread_mutex::Lock): Ditto.
404 (pthread_mutex::TryLock): Ditto.
405 (pthread_mutex::UnLock): Ditto.
406 (pthread_mutex::Destroy): Implement new method.
407 (pthread_mutex::SetOwner): Ditto.
408 (pthread_mutex::LockRecursive): Ditto.
409 (pthread_mutex::fixup_after_fork): Restore locking state after
410 fork.
411 (__pthread_mutex_lock): Return pthread_mutex::Lock errorcode.
412 (__pthread_mutex_trylock): Return pthread_mutex::TryLock
413 errorcode.
414 (__pthread_mutex_unlock): Return pthread_mutex::UnLock
415 errorcode.
416 (__pthread_mutex_destroy): Call pthread_mutex::Destroy to
417 destroy mutex.
418 (__pthread_mutexattr_settype): Allow errorchecking and recursive
419 types.
420 * thread.h (MUTEX_LOCK_COUNTER_INITIAL): New define.
421 (pthread_mutex::criticalsection): Remove.
422 (pthread_mutex::lock_counter): New member.
423 (pthread_mutex::recursion_counter): Ditto.
424 (pthread_mutex::owner): Ditto.
425 (pthread_mutex::type): Ditto.
426 (pthread_mutex::Destroy): New method.
427 (pthread_mutex::SetOwner): Ditto.
428 (pthread_mutex::LockRecursive): Ditto.
429
430 2003-01-09 Thomas Pfaff <tpfaff@gmx.net>
431
432 * pthread.cc (pthread_cond_init): Use new pthread_cond::init.
433 * thread.cc: Some white spaces cleanups.
434 Change __pthread_cond_init to pthread_cond::init throughout.
435 (nativeMutex): Move class methods outside pthread_mutex.
436 (MTinterface::Init): Initialize pthread_cond init lock.
437 (pthread_cond::condInitializationLock): Instantiate.
438 (pthread_cond::initMutex): New Method.
439 (pthread_cond::isGoodInitializerOrBadObject): Ditto.
440 * thread.h: Some white spaces cleanups.
441 (nativeMutex): Move class declaration outside pthread_mutex.
442 (pthread_cond::condInitializationLock): New static member.
443 (pthread_cond::initMutex): New Method.
444 (pthread_cond::isGoodInitializerOrBadObject): Ditto.
445 (__pthread_cond_init): Remove prototype.
446
447 2003-01-09 Corinna Vinschen <corinna@vinschen.de>
448
449 * fhandler_disk_file.cc (num_entries): Return 2 as link count if
450 directory unreadable.
451
452 2003-01-09 Corinna Vinschen <corinna@vinschen.de>
453
454 * security.cc (get_nt_attribute): Always return -1 when read_sd()
455 fails.
456 (get_file_attribute): Set permissions to 0 and owner/group to -1
457 if security descriptor is unreadable.
458
459 2003-01-09 Christopher Faylor <cgf@redhat.com>
460
461 Use isdirsep rather than SLASH_P throughout.
462 * path.cc (iscygdrive): Disallow /cygdrive\x.
463 (normalize_posix_path): "Normalize" a windows path, if detected, rather
464 than converting to posix.
465
466 2003-01-06 Troy Curtiss <troyc@usa.net>
467
468 * fhandler_serial.cc (fhandler_serial::tcsetattr): Add support and
469 capability checking for B230400 bitrate.
470 (fhandler_serial::tcgetattr): Add support for B230400 bitrate.
471 * include/sys/termios.h: Add B230400 definition for Posix support of
472 230.4Kbps.
473
474 2003-01-05 Christopher Faylor <cgf@redhat.com>
475
476 * pinfo.cc (_pinfo::commune_send): Use myself->lock rather than just
477 lock when leaving.
478
479 2003-01-03 Christopher Faylor <cgf@redhat.com>
480
481 * dtable.h (dtable::in_vfork_cleanup): New function. True if vfork
482 cleanup needed.
483 * dtable.cc (dtable::vfork_parent_restore): Remove assertion.
484 * pipe.cc (fhandler_pipe::close): Don't close read_state during
485 fork_fixup since it wasn't inherited.
486
487 2003-01-01 Christopher Faylor <cgf@redhat.com>
488
489 * passwd.cc (getpwuid_r32): Revert previous change.
490
491 2003-01-01 Christopher Faylor <cgf@redhat.com>
492
493 * sysconf.cc (sysconf): Return arbitrary values for
494 _SC_GETGR_R_SIZE_MAX, _SC_LOGIN_NAME_MAX, _SC_GETPW_R_SIZE_MAX.
495
496 * passwd.cc (getpwuid_r32): Add uid/gid fields to size check
497 calculation.
498
This page took 0.060015 seconds and 6 git commands to generate.