Commit Graph

1440 Commits

Author SHA1 Message Date
yamt
38083a97f4 update tcp.sack. noted by Hubert Feyrer. 2005-03-21 08:51:40 +00:00
kleink
e9705ca517 Rename select argument to selectfn to avoid a shadowing warning. 2005-03-17 10:18:22 +00:00
lukem
a30452355d Overhaul the use of nsdispatch(3) by public APIs so that the back-end
methods use va_list in a manner that is directly related to the public API.

This makes it much easier to write dynamic nsswitch backends for the
getusershell(3) (et al) functions.

Per my proposal on tech-userlevel in September 2004.
2005-02-28 02:56:28 +00:00
lukem
6596888aee Restore getpwent() behaviour prior to rev 1.57; skip dodgy NIS & DNS entries
rather than failing with NS_UNAVAIL when encountering them.
Fixes PR 29272 by Antoine Reilles.
2005-02-28 00:40:05 +00:00
kleink
fd5cb0acea A little libc namespace housekeeping exercise:
* Make vfprintf_unlocked() an internal function, c.f. __svfscanf_unlocked().
* Add internal names for arc4random(), endnetpath(), fhstatvfs(),
  fstatvfs(), mkstemp(), shquote(), statvfs(), taddr2uaddr(), uaddr2taddr(),
  uuid_create_nil(), uuid_is_nil(), and wcwidth().
* Include namespace.h where supposed to.
2005-02-09 21:35:46 +00:00
kleink
23cad56e0c Use strtoimax(), incidentally removing the only libc-internal use of
strtoq().
2005-02-09 19:32:36 +00:00
kleink
4d58969864 Declare rs_initialized static. 2005-02-09 12:09:08 +00:00
christos
691a62246e Avoid passing in the actual pw field in gettime because it might not
be the type that we think it is. Fixes cross builds.
2005-02-01 23:47:38 +00:00
drochner
d6e66e178c fix pasto from sigignore.3 2005-02-01 13:55:19 +00:00
enami
22e3442eb2 - Modify realpath() not to alter process wide state current working
directory.  Strategy from FreeBSD.  Addess PR#28986.
- Make realpath() to return an error when null string is passed or
  the last component is symlink to null string.  The kernel lookup
  routine returns an error if such path are passed.
2005-01-30 22:37:32 +00:00
enami
b2ed183e5b - Remove macros used only by old getcwd() implementation.
- Fix memory leak on error. (I guess the loop isn't necessary but
  it is different matter).
- Remove knowledge about old malloc implementation.
2005-01-23 01:00:51 +00:00
christos
a10b4794fd change long -> unsigned long 2005-01-20 21:53:23 +00:00
christos
8817e95118 remove debugging printf. 2005-01-20 21:11:56 +00:00
kleink
b2f3ea1a33 Add ENOATTR (and a missing comma); noted by Takehiko NOZAKI. 2005-01-20 13:14:09 +00:00
christos
b1c3c94911 Improve error messages. 2005-01-19 22:59:24 +00:00
christos
b51e7f1581 - fix initialization of dowarn [use before set, thanks luke]
- always initialize flags so that we don't have to check for it.
- use the consistent variable names in functions.
2005-01-19 22:40:37 +00:00
christos
a31e08fdfc - test for too long username (from Greg Woods)
- centralize id and time_t parsing, providing better error checking of
  numeric values; previously the code would accept 12foo as an expiration
  or change time.
- fix issue with dereferencing null flags in compat code.
- ansify, KNF
2005-01-19 19:13:38 +00:00
mycroft
e638979d5c Use FD_CLOEXEC. 2005-01-19 00:59:48 +00:00
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