| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
reentrant getgrent functions (getgrgid_r, getgrnam_r).
seems reasonable to millert@, ok deraadt@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1) Distinguish normal end of data (like eof, YPERR_NOMORE, YPERR_KEY)
from error conditions.
2) Save errno(2) and restore it in case of success, as suggested by deraadt@
and beck@.
While this code is touched,
* move the common code for the yp_first and yp_next calls after the
respective if/else-block; note that free(data) is not needed in case of
failure and that __ypcurrent = NULL does no harm after failing yp_first.
* return 0, not NULL: the return value of grscan is int, not a pointer.
This is the last part of the work done on getgrent.c during c2k9,
heavily relying on the other improvements done at that time.
This has been rotting in my tree far too long.
"get it in" deraadt@; also lightly tested by simon@ some time ago
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
internally when and where required. Macros in <stdio.h> are updated
to automatically call the underlying functions when the process is
threaded to obtain the necessary locking. A private mutex is added
to protect __sglue, the internal list of FILE handles, and another
to protect the one-time initialization. Some routines in libc that
use getc() change to use getc_unlocked() as they're either protected
by their own lock or aren't thread-safe routines anyway.
committing on behalf of and okay guenther@ now that we have install
media space available.
|
|
|
|
| |
media to fit
|
|
|
|
|
|
|
|
|
|
|
|
| |
internally when and where required. Macros in <stdio.h> are updated
to automatically call the underlying functions when the process is
threaded to obtain the necessary locking. A private mutex is added
to protect __sglue, the internal list of FILE handles, and another
to protect the one-time initialization. Some routines in libc that
use getc() change to use getc_unlocked() as they're either protected
by their own lock or aren't thread-safe routines anyway.
ok kurt@, earlier version tested by sthen@ and jj@
|
|
|
|
|
|
|
|
|
|
| |
If code is used from exactly one place, don't jump back dozens of lines to
reach it, only to "goto" back where you came from.
Instead, simply put the code where it belongs.
Also fixes a regression that crept in in rev. 1.30: After clearing the
variable __ypmode, don't try to make decisions based on its former value.
As a bonus, garbage collect the grname variable and the _ypmode enum type.
ok millert@
|
|
|
|
|
|
| |
Thus, garbage collect one variable, one strdup, one free, two ifs,
one else and a couple of assignments. No functional change.
ok millert@
|
|
|
|
|
|
|
|
|
| |
occurred". Based on this, decide to either bail or use the record as is.
Prevents getgrnam(3) and friends from silently skipping YP records
on system errors, for example when out of memory.
Also, calling yp_get_default_domain once is enough.
The first two switch cases are unchanged, just reindented.
ok millert@
|
|
|
|
|
|
|
|
|
| |
check whether YP is active up front, not half-way through the parsing.
This fixes the bug that group names starting with a dash (yuck!)
were skipped when YP was not active, introduced in rev. 1.27.
Besides, the code becomes easier to understand.
The code inside the two switch cases is unchanged, just reindented.
"looks good" millert@
|
|
|
|
|
| |
do not just skip the entry, but report the error condition;
ok millert@
|
|
|
|
|
|
|
|
| |
YP group(5) exclusion, i.e. support -groupname:*:: in /etc/group.
Such groups will be excluded from later +:*::,
in just the same was as it is already done for passwd(5).
I have been running this since the autumn of 2008.
Discussed with several (including deraadt@, millert@, jmc@).
|
| |
|
|
|
|
|
|
|
| |
groups map but instead tells us that it is there. then use this interface
in getgrouplist(), and do a single lookup against netid.byname instead to
get all the groups associated with that user
ok kurt, testing by many others
|
|
|
|
|
|
|
| |
to #ifdefs where they are used. Found by lint by bret dot lambert
at gmail.
OK deraadt@.
|
|
|
|
|
|
| |
Kill old files that are no longer compiled.
okay theo
|
| |
|
|
|
|
|
|
| |
particular implementation of libpthread for libc. libc no longer
needs pthread.h to compile.
OK millert@, brad@, tedu@
|
|
|
|
| |
ok millert@
|
|
|
|
| |
rescinded 22 July 1999. Proofed by myself and Theo.
|
|
|
|
| |
millert@ ok
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
(this caused group name lookups to fail)
|
| |
|
|
|
|
| |
errors reasonably and deal correctly with unsigned quantities.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
All POSIX libc api now there (to P1003.1c/D10)
(more md stuff is needed for other libc/arch/*)
(setlogin is no longer a special syscall)
Add -pthread option to gcc (that makes it use -lc_r and -D_POSIX_THREADS).
Doc some re-entrant routines
Add libc_r to intro(3)
dig() uses some libc srcs and an extra -I was needed there.
Add more md stuff to libc_r.
Update includes for the pthreads api
Update libc_r TODO
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Make sure everything uses {SYS,}LIBC_SCCS properly
|
|
|
|
|
|
|
|
|
| |
accesses to match. change xdr_domainname() and some other functions to
take "char **" instead of "char *", as rpcgen intended -- helps programs
linking against rpcgen output of yp.x. yp_all() should not free it's
return value. split xdryp.c and yplib.c into ~20 files so binaries like
"csh" need not link in functions like yp_maplist(). NIS+'s YP emulation
code lacks YPPROC_ORDER... attempt to deal nicely.
|
|
|
|
| |
Do the right thing in presense of __STDC__
|
|
|