]>
Commit | Line | Data |
---|---|---|
4136fdb1 CV |
1 | 2003-02-07 Corinna Vinschen <corinna@vinschen.de> |
2 | ||
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'. | |
13 | (msync): Ditto. | |
14 | (fhandler_disk_file::mmap): Streamline code. | |
15 | (mprotect): Ditto. | |
16 | (fixup_mmaps_after_fork): Rename `l' variable to `map_list'. | |
17 | ||
49b84ce4 CF |
18 | 2003-02-07 Vaclav Haisman <V.Haisman@sh.cvut.cz> |
19 | Christopher Faylor <cgf@redhat.com> | |
20 | ||
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. | |
24 | ||
bc5b63ed CF |
25 | 2003-02-07 Christopher Faylor <cgf@redhat.com> |
26 | ||
27 | * malloc.cc (DEFAULT_MMAP_THRESHOLD): Set high to avoid mmaps. | |
28 | ||
29 | 2003-02-07 Christopher Faylor <cgf@redhat.com> | |
30 | ||
31 | * pipe.cc (fhandler_pipe::close): Avoid extraneous this->. | |
32 | ||
1de8d164 CF |
33 | 2003-02-06 Christopher Faylor <cgf@redhat.com> |
34 | ||
35 | * heap.cc (heap_init): Remove debugging code. | |
36 | ||
565e8015 CV |
37 | 2003-02-06 Pierre Humblet <pierre.humblet@ieee.org> |
38 | ||
39 | * security.h: Introduce names UNKNOWN_UID and UNKNOWN_GID and delete | |
1de8d164 | 40 | declaration of is_grp_member. |
565e8015 CV |
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 | |
44 | feedback. | |
45 | (getgrgid): Use gid16togid32. | |
46 | * sec_helper.cc (is_grp_member): Delete. | |
47 | ||
d238c1b4 CF |
48 | 2003-02-05 Christopher Faylor <cgf@redhat.com> |
49 | ||
50 | * path.cc: Change 'to_posix_p' to 'to_posix' throughout. | |
51 | (conv_path_list_buf_size): Accommodate relative paths. | |
52 | ||
b7f52fe8 CF |
53 | 2003-02-05 Christopher Faylor <cgf@redhat.com> |
54 | ||
55 | * path.cc (etc::dir_changed): Fix debug printf. | |
56 | ||
62cd433e CV |
57 | 2003-02-05 Corinna Vinschen <corinna@vinschen.de> |
58 | ||
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. | |
62 | ||
63 | 2003-02-05 Pierre Humblet <pierre.humblet@ieee.org> | |
64 | ||
65 | * sec_acl.cc: Change all __aclent16_t to __aclent32_t except in | |
66 | wrapper function definitions. Replace call to the aclXYZ functions by | |
67 | calls aclXYZ32. | |
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. | |
78 | (facl32): Ditto. | |
79 | (lacl32): Ditto. | |
80 | (aclcheck32): Ditto. | |
81 | (aclsort32): Ditto. | |
82 | (acltomode32): Ditto. | |
83 | (aclfrommode32): Ditto. | |
84 | (acltopbits32): Ditto. | |
85 | (aclfrompbits32): Ditto. | |
86 | (acltotext32): Ditto. | |
87 | (aclfromtext32): Ditto, and use strechr. | |
88 | (acl16to32): Create. | |
89 | (acl): Make it a wrapper function. | |
90 | (facl): Ditto. | |
91 | (lacl): Ditto. | |
92 | (aclcheck): Ditto. | |
93 | (aclsort): Ditto. | |
94 | (acltomode): Ditto. | |
95 | (aclfrommode): Ditto. | |
96 | (acltopbits): Ditto. | |
97 | (aclfrompbits): Ditto. | |
98 | (acltotext): Ditto. | |
99 | (aclfromtext): Ditto. | |
100 | * security.cc (write_sd): Call set_process_privilege and check | |
101 | ownership. | |
102 | (alloc_sd): Remove call to set_process_privilege and the owner check. | |
103 | ||
cadd065b CF |
104 | 2003-02-05 Christopher Faylor <cgf@redhat.com> |
105 | ||
106 | * include/sys/cygwin.h: Use C-style comments. | |
107 | ||
0c8455c3 CV |
108 | 2003-02-05 Pierre Humblet <pierre.humblet@ieee.org> |
109 | ||
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. | |
119 | ||
5ae9331a TP |
120 | 2003-02-04 Thomas Pfaff <tpfaff@gmx.net> |
121 | ||
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. | |
126 | ||
3dbafd87 CV |
127 | 2003-02-04 Corinna Vinschen <corinna@vinschen.de> |
128 | ||
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 | |
132 | handling. | |
133 | ||
0daf2561 CV |
134 | 2003-02-04 Pierre Humblet <pierre.humblet@ieee.org> |
135 | ||
136 | * grp.cc (internal_getgroups): Do not return without closing | |
137 | the process handle. | |
138 | ||
4a21c2d5 CV |
139 | 2003-02-04 Pierre Humblet <pierre.humblet@ieee.org> |
140 | ||
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. | |
d238c1b4 | 154 | * grp.cc (internal_getgrsid): Ditto. |
4a21c2d5 CV |
155 | (internal_getgroups): Ditto. |
156 | ||
335556d5 CF |
157 | 2003-02-03 Christopher Faylor <cgf@redhat.com> |
158 | ||
159 | Eliminate most unneeded this-> pointers throughout. | |
160 | ||
153e83c6 CV |
161 | 2003-02-03 Pierre Humblet <pierre.humblet@ieee.org> |
162 | ||
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 | |
166 | argument. | |
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 | |
169 | the user, fail. | |
170 | ||
f0f3ea68 CV |
171 | 2003-02-03 Corinna Vinschen <corinna@vinschen.de> |
172 | ||
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. | |
176 | ||
6688a061 CF |
177 | 2003-02-01 Christopher Faylor <cgf@redhat.com> |
178 | ||
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. | |
187 | ||
a5a93a62 CF |
188 | 2003-01-31 Christopher Faylor <cgf@redhat.com> |
189 | ||
190 | * dlfcn.cc (dlerror): Only report load errors once per error. | |
191 | ||
b0a82a85 CF |
192 | 2003-01-31 Christopher Faylor <cgf@redhat.com> |
193 | ||
194 | * fhandler_serial.cc (fhandler_serial::open): Avoid extraneous setting | |
195 | of res. | |
196 | ||
197 | * termios.cc (tcsetattr): Correctly record errno after tcsetattr call. | |
198 | ||
199 | 2003-01-31 Troy Curtiss <troyc@usa.net> | |
200 | ||
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. | |
208 | ||
949c3da1 CF |
209 | 2003-01-31 Christopher Faylor <cgf@redhat.com> |
210 | ||
211 | * passwd.cc (pwdgrp::read_passwd): linebuf *must* be static (from | |
212 | Pierre Humblet). | |
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. | |
215 | ||
485d85bf CF |
216 | 2003-01-31 Jason Tishler <jason@tishler.net> |
217 | ||
218 | * shared.cc (shared_info::heap_chunk_size): Use correct variable when | |
219 | reading HKLM. | |
220 | ||
704ce461 CF |
221 | 2003-01-30 Christopher Faylor <cgf@redhat.com> |
222 | ||
223 | * fhandler_registry.cc (fhandler_registry::exists): Fix off-by-one | |
224 | error when inspecting path. | |
225 | ||
ba6e1083 CF |
226 | 2003-01-29 Christopher Faylor <cgf@redhat.com> |
227 | ||
228 | * lib/getopt.c: Allow environment variable control of POSIXLY_INCORRECT | |
229 | behavior. | |
230 | ||
231 | 2003-01-28 Corinna Vinschen <corinna@vinschen.de> | |
01e3c897 CV |
232 | |
233 | * fhandler_socket.cc (fhandler_socket::accept): On successful execution | |
234 | set connection state of returned socket to CONNECTED. | |
235 | ||
dfb366da CF |
236 | 2003-01-27 Christopher Faylor <cgf@redhat.com> |
237 | ||
238 | * passwd.cc (pwdgrp::parse_passwd): Be more unforgiving about | |
239 | non-numeric fields. | |
240 | ||
03dba1de CF |
241 | 2003-01-26 Christopher Faylor <cgf@redhat.com> |
242 | ||
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. | |
246 | ||
fea48988 CF |
247 | 2003-01-26 Christopher Faylor <cgf@redhat.com> |
248 | ||
ca6018a0 | 249 | * string.h (strechr): New function. |
fea48988 CF |
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 | |
252 | possible. | |
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 | |
257 | input. | |
258 | * pwdgrp.h (pwdgrp::next_str): Don't use default parameter. | |
259 | ||
9a751621 CF |
260 | 2003-01-26 Christopher Faylor <cgf@redhat.com> |
261 | ||
262 | * uinfo.cc (pwdgrp::load): Regularize strace output. Add warning for | |
263 | CreateFile failure. | |
264 | ||
c9133395 CF |
265 | 2003-01-26 Christopher Faylor <cgf@redhat.com> |
266 | ||
bdbd7fb6 CF |
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. | |
270 | ||
271 | 2003-01-26 Christopher Faylor <cgf@redhat.com> | |
272 | ||
273 | * grp.cc (pwdgrp::parse_group): Fix off-by-one problem in allocating | |
c9133395 | 274 | gr_mem. |
65037056 CF |
275 | |
276 | 2003-01-26 Christopher Faylor <cgf@redhat.com> | |
277 | ||
278 | * include/sys/strace.h (paranoid_printf): Define as not being part of | |
279 | "all" output. | |
280 | ||
281 | 2003-01-25 Christopher Faylor <cgf@redhat.com> | |
282 | ||
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 | |
300 | it here. | |
301 | ||
a53ddfe6 CF |
302 | 2003-01-25 Christopher Faylor <cgf@redhat.com> |
303 | ||
304 | * pwdgrp.cc (pwdgrp::reparse): Declare. | |
305 | * uinfo.cc (pwdgrp::reparse): Define. | |
c9b99d0d | 306 | * grp.cc (pwdgrp::parse_group): Use reparse. |
a53ddfe6 | 307 | |
4f7e12dd CV |
308 | 2003-01-25 Pierre Humblet <pierre.humblet@ieee.org> |
309 | ||
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. | |
ba6e1083 | 313 | (setgid32): Add a debug_printf. On Win95, always set the egid. |
4f7e12dd CV |
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. | |
320 | ||
45dbfc26 CF |
321 | 2003-01-24 Christopher Faylor <cgf@redhat.com> |
322 | ||
323 | * fhandler_console.cc (fhandler_console::send_winch_maybe): Reset | |
324 | scroll region if size changes. | |
325 | ||
7d33eefa CV |
326 | 2003-01-24 Pierre Humblet <pierre.humblet@ieee.org> |
327 | Jason Tishler <jason@tishler.net> | |
328 | ||
329 | * cygwin.din: Export setreuid32, setreuid, setregid32, setregid. | |
330 | * syscalls.cc (setreuid32): New function. | |
331 | (setreuid): Ditto. | |
332 | (setregid32): Ditto. | |
333 | (setregid): Ditto. | |
334 | * include/cygwin/version.h: Bump API minor number. | |
335 | ||
ac413374 | 336 | 2003-01-23 Christopher Faylor <cgf@redhat.com> |
69fae986 | 337 | |
ac413374 | 338 | * pwdrp.h (pwdgrp::refresh): Lock entire test prior to reading. |
2037688a | 339 | |
ac413374 | 340 | 2003-01-23 Christopher Faylor <cgf@redhat.com> |
09a88426 CF |
341 | |
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. | |
346 | (grab_int): Ditto. | |
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. | |
358 | ||
ac413374 CF |
359 | 2003-01-22 Thomas Pfaff <tpfaff@gmx.net> |
360 | ||
361 | * include/pthread.h (PTHREAD_MUTEX_RECURSIVE): Revert changes from | |
362 | 2003-01-09 mutex patch. | |
363 | (PTHREAD_MUTEX_ERRORCHECK): Ditto. | |
364 | ||
365 | 2003-01-22 Corinna Vinschen <corinna@vinschen.de> | |
366 | ||
367 | * cygrun.c: Move from here to ../testsuite. | |
368 | * Makefile.in: Remove cygrun.exe dependencies. | |
369 | ||
370 | 2003-01-21 Jason Tishler <jason@tishler.net> | |
371 | ||
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. | |
377 | ||
57394495 CF |
378 | 2003-01-21 Christopher Faylor <cgf@redhat.com> |
379 | ||
380 | * grp.cc: Call gr.refresh() rather than doing isunitialized tests | |
381 | throughout. | |
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 | |
387 | throughout. | |
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 | |
402 | to loaded. | |
403 | ||
984864e9 CF |
404 | 2003-01-21 Christopher Faylor <cgf@redhat.com> |
405 | ||
89f7e8d1 | 406 | * include/cygwin/version.h: Bump DLL minor number. |
984864e9 | 407 | |
d8cde3a3 CF |
408 | 2003-01-21 Pierre Humblet <pierre.humblet@ieee.org> |
409 | ||
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 | |
09a88426 CF |
416 | test_file_changed. When the handle is invalid, return true. Detect |
417 | filename change in /etc. | |
d8cde3a3 | 418 | (etc::file_changed): Remove unneeded check for !fn[n]. |
33de631b | 419 | * uinfo.cc (pwdgrp::load): Eliminate spurious setting of fh to NULL. |
b99b804b | 420 | * pwdgrp.h (pwdgrp::operator =): Eliminate. |
d8cde3a3 | 421 | |
7905c4f1 CF |
422 | 2003-01-19 Christopher Faylor <cgf@redhat.com> |
423 | ||
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 | |
435 | throughout. | |
436 | (curr_lines): Eliminate. | |
437 | (max_lines): Ditto. | |
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 | |
444 | throughout. | |
445 | (curr_lines): Eliminate. | |
446 | (max_lines): Ditto. | |
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 | |
453 | zero. | |
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 | |
463 | updated. | |
464 | * path.h (etc): Move class here from pwdgrp.h. | |
7905c4f1 CF |
465 | * uinfo.cc: Move etc:: functions to path.cc. Move pwdgrp functions |
466 | here. | |
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 | |
470 | parser. | |
471 | ||
4c6a3e50 CF |
472 | 2003-01-17 Christopher Faylor <cgf@redhat.com> |
473 | ||
474 | * cygheap.cc: Change most 'int's to 'unsigned's. | |
475 | (_cmalloc): Only check for size of malloced region when calculating | |
97d2bc79 | 476 | bucket. Add overhead when performing the sbrk. Previous change broke |
4c6a3e50 CF |
477 | _crealloc. |
478 | ||
e9152439 CF |
479 | 2003-01-17 Christopher Faylor <cgf@redhat.com> |
480 | ||
481 | * dcrt0.cc (initialize_env): Use colon for CYGWIN_DEBUG separator. | |
482 | * grp.cc: Change most statics to NO_COPY throughout. | |
483 | * passwd.cc: Ditto. | |
484 | ||
485 | 2003-01-17 Christopher Faylor <cgf@redhat.com> | |
486 | ||
487 | * pwdgrp.h: Change some BOOLs to bools. | |
488 | (pwdgrp::pwdgrp): Remove unneeded constructor. | |
489 | * passwd.cc: Change BOOL to bool throughout. | |
490 | ||
afa378e7 CV |
491 | 2003-01-17 Corinna Vinschen <corinna@vinschen.de> |
492 | ||
493 | * cygwin.din: Add strerror_r. | |
494 | * include/cygwin/version.h: Bump API minor number. | |
495 | ||
1de6f431 CF |
496 | 2003-01-17 Christopher Faylor <cgf@redhat.com> |
497 | ||
498 | * uinfo.cc (etc::dir_changed): Don't print a warning if can't open | |
499 | /etc, unless debugging. | |
500 | ||
d8cde3a3 | 501 | 2003-01-17 Pierre Humblet <pierre.humblet@ieee.org> |
14ea5029 CF |
502 | |
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 | |
507 | not NULL. | |
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 | |
510 | initialize HOME. | |
511 | ||
14ea5029 CF |
512 | 2003-01-16 Christopher Faylor <cgf@redhat.com> |
513 | ||
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 | |
525 | file. | |
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 | |
531 | etc::file_changed. | |
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 | |
5304bcdf | 536 | beginning of buffer. |
14ea5029 CF |
537 | (pwdgrp::close): Remove. |
538 | * uinfo.cc (etc::dir_changed): New function. | |
539 | (etc::init): Ditto. | |
540 | (etc::file_changed): Ditto. | |
541 | (etc::set_last_modified): Ditto. | |
542 | ||
41429bc9 CV |
543 | 2003-01-16 Jason Tishler <jason@tishler.net> |
544 | ||
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. | |
548 | ||
18813254 CF |
549 | 2003-01-15 Christopher Faylor <cgf@redhat.com> |
550 | ||
551 | * path.cc (normalize_posix_path): Convert win32 path separators to | |
552 | slashes when full path is specified. | |
553 | ||
77cb0c56 CF |
554 | 2003-01-15 Pierre Humblet <pierre.humblet@ieee.org> |
555 | ||
556 | * cmalloc.cc (_cmalloc): Fix memory leak. | |
557 | ||
ce542f78 CV |
558 | 2003-01-15 Corinna Vinschen <corinna@vinschen.de> |
559 | ||
560 | * autoload.cc: Fix copyright date. | |
561 | * fhandler_dsp.cc: Ditto. | |
562 | * mmap.cc: Ditto. | |
563 | * net.cc: Ditto. | |
564 | * ntdll.h: Ditto. | |
565 | * signal.cc: Ditto. | |
566 | * syscalls.cc: Ditto. | |
567 | * uname.cc: Ditto. | |
568 | * wait.cc: Ditto. | |
569 | ||
15996b6f CV |
570 | 2003-01-14 Corinna Vinschen <corinna@vinschen.de> |
571 | ||
572 | * mmap.cc (fixup_mmaps_after_fork): Copy protection to child process. | |
573 | Change ambiguous debug output. | |
574 | ||
857b65dd CV |
575 | 2003-01-14 Corinna Vinschen <corinna@vinschen.de> |
576 | ||
577 | * mmap.cc (mmap_record::access): Change argument type to caddr_t | |
578 | for strictness. | |
579 | (mprotect): Protect against calling VirtualProtect() for shared | |
580 | pages on 9x/Me. | |
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. | |
584 | ||
e14328f4 TP |
585 | 2003-01-14 Thomas Pfaff <tpfaff@gmx.net> |
586 | ||
587 | * syscalls.cc (system): Add pthread_testcancel call. | |
588 | * thread.cc: Update list of cancellation points. | |
589 | ||
4a3584c8 TP |
590 | 2003-01-14 Thomas Pfaff <tpfaff@gmx.net> |
591 | ||
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. | |
596 | ||
7ec66a2c TP |
597 | 2003-01-14 Thomas Pfaff <tpfaff@gmx.net> |
598 | ||
599 | * signal.cc (sleep): Add pthread_testcancel call. | |
600 | Wait for signal and cancellation event. | |
601 | (usleep): Ditto. | |
602 | ||
603 | 2003-01-14 Thomas Pfaff <tpfaff@gmx.net> | |
3457ce4d TP |
604 | |
605 | * exceptions.cc (handle_sigsuspend): Add pthread_testcancel call. | |
606 | Wait for signal and cancellation event. | |
607 | * thread.cc: Update list of cancellation points. | |
608 | ||
2673d5f2 CF |
609 | 2003-01-14 David Huang <davehzhr@hotmail.com> |
610 | ||
611 | * fhandler_dsp.cc (fhandler_dsp::ioctl): Add limited support for | |
612 | SNDCTL_DSP_GETFMTS. | |
613 | ||
9f0d3f37 CF |
614 | 2003-01-12 Christopher Faylor <cgf@redhat.com> |
615 | ||
616 | * ntdll.h: Fix typo. | |
617 | ||
7f129d87 CV |
618 | 2003-01-12 Corinna Vinschen <corinna@vinschen.de> |
619 | ||
620 | * uname.cc (uname): Use cygwin_gethostname() to retrieve hostname. | |
621 | ||
ab2dbccc CV |
622 | 2003-01-12 Pierre Humblet <pierre.humblet@ieee.org> |
623 | ||
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 | |
638 | the variable psd. | |
639 | ||
68115c74 CF |
640 | 2003-01-10 Christopher Faylor <cgf@redhat.com> |
641 | ||
642 | * net.cc: Use gethostname define from winsock2.h. | |
643 | ||
e3abf986 CF |
644 | 2003-01-10 Christopher Faylor <cgf@redhat.com> |
645 | ||
646 | * path.cc: Unrevert below reversion except for | |
647 | mount_info::conv_to_posix_path part. | |
648 | ||
df2caa88 CV |
649 | 2003-01-10 Corinna Vinschen <corinna@vinschen.de> |
650 | ||
651 | * path.cc: Revert patch from 2003-01-09 to normalize a windows path | |
652 | rather than converting to posix. | |
653 | ||
dc8d11f5 CV |
654 | 2003-01-10 Corinna Vinschen <corinna@vinschen.de> |
655 | ||
656 | * autoload.cc (gethostname): Make call optional, return 1 if function | |
657 | can't get loaded. | |
658 | * net.cc (cygwin_gethostname): Call GetComputerName if return value | |
659 | of gethostname is non-zero. | |
660 | ||
70d61f30 CV |
661 | 2003-01-10 Charles Wilson <cwilson@ece.gatech.edu> |
662 | ||
8735f49f | 663 | * cygwin.din: Add asprintf and vasprintf, as well as the reentrant |
70d61f30 | 664 | versions and underscore variants. |
8735f49f | 665 | * include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR. |
70d61f30 | 666 | |
a7711767 CV |
667 | 2003-01-10 Corinna Vinschen <corinna@vinschen.de> |
668 | ||
669 | * net.cc (cygwin_gethostname): Fix call to wsock function gethostname. | |
670 | ||
d5223b2b CF |
671 | 2003-01-09 Christopher Faylor <cgf@redhat.com> |
672 | ||
673 | * cygthread.cc (cygthread::cygthread): Be more noisy about odd | |
674 | condition. | |
675 | * miscfuncs.cc (low_priority_sleep): Sleep in regular priority if | |
676 | that's what we're currently running at. | |
677 | ||
65f207e8 TP |
678 | 2003-01-09 Thomas Pfaff <tpfaff@gmx.net> |
679 | ||
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. | |
685 | ||
09cbb9d6 TP |
686 | 2003-01-09 Thomas Pfaff <tpfaff@gmx.net> |
687 | ||
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. | |
695 | ||
5d68d1de TP |
696 | 2003-01-09 Thomas Pfaff <tpfaff@gmx.net> |
697 | ||
698 | * include/pthread.h: Add define for errorchecking mutexes. | |
699 | Change default mutex type. | |
700 | * thread.cc (pthread_cond::TimedWait): Update mutex unlock | |
701 | calls. | |
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 | |
711 | fork. | |
712 | (__pthread_mutex_lock): Return pthread_mutex::Lock errorcode. | |
713 | (__pthread_mutex_trylock): Return pthread_mutex::TryLock | |
714 | errorcode. | |
715 | (__pthread_mutex_unlock): Return pthread_mutex::UnLock | |
716 | errorcode. | |
717 | (__pthread_mutex_destroy): Call pthread_mutex::Destroy to | |
3457ce4d | 718 | destroy mutex. |
5d68d1de TP |
719 | (__pthread_mutexattr_settype): Allow errorchecking and recursive |
720 | types. | |
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. | |
730 | ||
ed9fe455 TP |
731 | 2003-01-09 Thomas Pfaff <tpfaff@gmx.net> |
732 | ||
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. | |
747 | ||
93353aee CV |
748 | 2003-01-09 Corinna Vinschen <corinna@vinschen.de> |
749 | ||
750 | * fhandler_disk_file.cc (num_entries): Return 2 as link count if | |
751 | directory unreadable. | |
752 | ||
3eb27a4e CV |
753 | 2003-01-09 Corinna Vinschen <corinna@vinschen.de> |
754 | ||
755 | * security.cc (get_nt_attribute): Always return -1 when read_sd() | |
756 | fails. | |
757 | (get_file_attribute): Set permissions to 0 and owner/group to -1 | |
758 | if security descriptor is unreadable. | |
759 | ||
85ba109d CF |
760 | 2003-01-09 Christopher Faylor <cgf@redhat.com> |
761 | ||
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. | |
766 | ||
767 | 2003-01-06 Troy Curtiss <troyc@usa.net> | |
768 | ||
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 | |
773 | 230.4Kbps. | |
774 | ||
cbdbe9d7 CF |
775 | 2003-01-05 Christopher Faylor <cgf@redhat.com> |
776 | ||
777 | * pinfo.cc (_pinfo::commune_send): Use myself->lock rather than just | |
778 | lock when leaving. | |
779 | ||
f3afe99b CF |
780 | 2003-01-03 Christopher Faylor <cgf@redhat.com> |
781 | ||
782 | * dtable.h (dtable::in_vfork_cleanup): New function. True if vfork | |
783 | cleanup needed. | |
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. | |
787 | ||
2665fb15 CF |
788 | 2003-01-01 Christopher Faylor <cgf@redhat.com> |
789 | ||
790 | * passwd.cc (getpwuid_r32): Revert previous change. | |
791 | ||
8619b42b CF |
792 | 2003-01-01 Christopher Faylor <cgf@redhat.com> |
793 | ||
794 | * sysconf.cc (sysconf): Return arbitrary values for | |
795 | _SC_GETGR_R_SIZE_MAX, _SC_LOGIN_NAME_MAX, _SC_GETPW_R_SIZE_MAX. | |
796 | ||
797 | * passwd.cc (getpwuid_r32): Add uid/gid fields to size check | |
798 | calculation. | |
799 |