mycroft
ffa0d5e7ac
Also set FD_CLOEXEC in the union re-open case.
2005-01-19 00:53:33 +00:00
lukem
58804647b6
Reference RFC1738 instead of RFC1808 for '%xx' encoding.
2005-01-15 21:02:51 +00:00
simonb
f2cd0bb8b0
Remove the old userland version of getcwd(): it's been #ifdef'd out
...
since 1999 when we switched to a (faster) system call based getcwd(),
and as shown recently has had some buffer size problems anyway (although
they have since been fixed).
2005-01-06 23:43:32 +00:00
lukem
b351350a6f
document getgroupmembership(3)
2005-01-06 15:29:35 +00:00
lukem
a3665ef9cf
Implement getgroupmembership(3). This is similar to getgrouplist(3), except
...
that the "int maxgroups" and "int *ngroups" parameters are separated into
two separate parameters which makes it possible to call multiple nsswitch
back-ends and have the results correctly merged.
getgrouplist(3) is now implemented using getgroupmembership(3).
Proposed on tech-userlevel on December 1, 2004.
2005-01-06 15:10:45 +00:00
lukem
337d8d731d
Rename various "internal" variables and functions and make non-static so other
...
internal libc source files can use these (including getgroupmembership(3)).
Be more consistent in the API that the __grscan_<source>() methods use.
In __grscan_compat() support an optional custom 'search' function used when a
"+" lookup is required. Normally this will be getgrent() from group_compat,
but getgroupmembership(3) will use a tailored compat search routine for
efficiency.
2005-01-06 15:00:45 +00:00
christos
59f1050586
Fix handling of memory allocation. From OpenBSD.
2005-01-06 00:07:41 +00:00
wiz
4e8eec4d14
Sort SEE ALSO.
2005-01-02 18:25:09 +00:00
wiz
7d9d90dc9d
Fix date string.
2005-01-02 18:23:25 +00:00
thorpej
c165c2b31d
System calls and support routines for file system extended attributes. Libc
...
version is bumped to 12.125.
From FreeBSD.
2005-01-02 16:43:26 +00:00
thorpej
8fca42fd9c
More ELF_ST_BIND()/ELF_ST_TYPE() cleanup.
2004-12-28 00:08:08 +00:00
thorpej
fe14527c00
Use ELF_ST_BIND() and ELF_ST_TYPE().
2004-12-27 20:07:09 +00:00
christos
12fc8404b0
RTC_OFFSET is writable; sync with sysctl.8
2004-12-27 13:35:47 +00:00
wiz
6362e2f527
Add CAVEATS section similar to is*(3) ones. Bump date.
...
Fix typo in toascii.3 while here.
kleink says "ok".
2004-12-24 02:47:16 +00:00
wiz
c54f10d8b4
Use more markup. Sort sections.
2004-12-16 17:29:55 +00:00
atatat
817b002242
Fix a whitespace nit and make this compile again. So there.
2004-12-16 04:37:25 +00:00
atatat
d91a4a5990
Put caching back on the pts major number. It's worth the code
...
overhead not to go look it up a zillion times when running fstat or ps
on a machine with a billion people logged in. fstat mostly.
2004-12-16 04:33:03 +00:00
atatat
4e04a6f62d
Get rid of the private getptsname() function and use getdevmajor()
...
instead. It's really much better that way, you'll see.
2004-12-16 04:15:19 +00:00
christos
29fb313de0
document properly the return value and the errno settings.
2004-12-16 04:07:22 +00:00
christos
d15ecb98a9
knf fixes.
2004-12-16 04:07:01 +00:00
atatat
2803cf768c
Add a function called getdevmajor().
...
It tells you the major device number for whatever character or block
device you ask it. This is sort of the inverse of devname(3) but not
quite, since it's backed by the kernel (sysctl's kern.drivers
information) and not a database cobbled together from the contents of
the filesystem.
2004-12-16 03:54:56 +00:00
atatat
1cb09b336b
Properly return the constructed name for ptyfs nodes. Otherwise we
...
accidentally return NULL on the first call and find it in the cache on
all subsequent calls.
2004-12-14 03:08:01 +00:00
christos
7462bd3e7c
fix cast-qual issue.
2004-12-11 06:41:40 +00:00
lukem
53d1c6b12e
document which #include file to use
2004-11-23 04:38:19 +00:00
christos
d8edf257eb
Don't create the lastlogx file with 0 mode.
2004-11-11 22:14:20 +00:00
christos
5120bd8da8
More error checking.
2004-11-11 04:03:23 +00:00
christos
a2a8a7d6ce
Recognize ptyfs ptys.
2004-11-11 03:22:30 +00:00
wiz
74e1eaa411
Fix some nits, and bump date for previous.
2004-11-11 00:57:57 +00:00
christos
3c3eb5801d
It is silly to have to enumerate all the ptys in /etc/ttys in order to
...
get a valid ttyslot for them. Instead if and entry is not found and we
are a pty, allocate the n + 1 + minor(pty) slot.
2004-11-11 00:01:38 +00:00
christos
a8f3eacf76
Use ioctl to find the pty name directly instead of looking it up in
...
the database; it is much faster, and the common case these days.
2004-11-11 00:00:15 +00:00
christos
ba98473568
PR/28183: Brian Marcotte: Getty eats the last character of the last field.
...
As Brian reports the bug is in skip(). The logic on end of line is broken.
- fix the bug which can cause buf[-1] to be written.
- don't leave the line buffer allocated on end of file.
- KNF
- use __func__ instead of hard-coding the function name.
- don't use needlessly global variables
2004-11-10 23:59:06 +00:00
lukem
c873ad0d2e
Use the common __nsdefaultFOO rather than private defaultFOO duplicates.
2004-11-10 12:57:32 +00:00
lukem
2ffe6b72ba
Use _GETGR_R_SIZE_MAX from <limits.h> rather than defining a private version.
2004-11-10 06:10:03 +00:00
lukem
cdfecd6b76
whitespace cleanup
2004-11-10 04:57:17 +00:00
lukem
9c82800a69
Add: getgrgid_r(3) getgrnam_r(3) getpwnam_r(3) getpwuid_r(3)
2004-11-10 04:52:30 +00:00
lukem
364ede827b
need <limits.h> for _SC_GET{GR,PW}_SIZE_MAX
2004-11-10 04:46:01 +00:00
lukem
97dddd4f3a
Document _SC_GETGR_R_SIZE_MAX and _SC_GETPW_R_SIZE_MAX
2004-11-10 04:21:25 +00:00
lukem
663b3e58e0
Use _GETPW_R_SIZE_MAX from <limits.h> rather than defining a private version.
2004-11-10 04:11:34 +00:00
lukem
246f6fd919
Implement sysconf(3) _SC_GETGR_R_SIZE_MAX and _SC_GETPW_R_SIZE_MAX for
...
the 1003.1-2001 Thread Safe Functions (TSF) getgrnam_r(3) and getpwnam_r(3).
These are not implemented in sysctl(3) "user.*", since that adds a lot
of complexity in the implementation for no real benefit.
2004-11-10 04:02:52 +00:00
lukem
103626c6a0
default to "compat" not "files"
2004-11-01 08:21:34 +00:00
lukem
c49e808721
#include "reentrant.h" instead of <threadlib.h>
2004-10-29 06:32:08 +00:00
dsl
1793b7dd69
Use (unsigned char) cast to sanitise arguments to ctype functions.
2004-10-28 21:14:52 +00:00
dsl
d349cd6749
Fix a load of international alphabet problems with isxxx() and toupper()
...
Change isspace(*char_ptr) to isspace(*char_ptr & 0xff) so that the correct
piece of memory is looked at for the bit mask.
gcc optimises out the '& 0xff' (on i386 at least).
Fixes problems found by gcc when the splurious (int) cast is removed
from the #defines in ctype.h
2004-10-27 19:59:24 +00:00
lukem
feb92219d9
Protect access to all public functions via a mutex as some of the backends are
...
not reentrant (such as compat getgr*_r, because it uses the non reentrant
_{dns,nis}_getgrent() backends to implement `+group').
2004-10-24 14:52:46 +00:00
lukem
a48f586379
Protect access to all public functions via a mutex as some of the backends are
...
not reentrant (such as compat, because it uses the non reentrant getnetgrent(3)
to implement `+@netgrp' & `-@netgrp').
2004-10-24 14:46:23 +00:00
lukem
893983131b
minor KNF, making it easier to find where fork() is implemented
2004-10-21 06:46:36 +00:00
enami
461001f32f
Fix some typos.
2004-10-15 15:19:02 +00:00
enami
b07577d748
Don't break line at the space since it is not a word separator but
...
an example of space character.
2004-10-15 15:07:54 +00:00
daniel
84a34aedec
Add vm.bufcache, vm.bufmem, vm.bufmem_lowater, m.bufmem_hiwater (PR misc/27247, misc/27233).
2004-10-15 08:47:16 +00:00
lukem
b7fcf76aa6
Fix MKYP=no MKHESIOD=no build.
...
Rename an internal function to a more appropriate name.
2004-10-11 09:42:06 +00:00