summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/getgrouplist.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Fix the handle locking in stdio to use flockfile/funlockfilekurt2009-11-091-2/+2
| | | | | | | | | | | | | 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.
* Back out previous commit, as it caused too much growth for the installguenther2009-10-221-2/+2
| | | | media to fit
* Fix the handle locking in stdio to use flockfile/funlockfileguenther2009-10-211-2/+2
| | | | | | | | | | | | 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@
* getgrouplist(3) used to and ought to return 0 on success;schwarze2009-06-231-5/+13
| | | | | fixing a regression introduced in rev. 1.16 spotted by otto@; ok millert@ otto@
* Take advantage of the surprise libc bump to bring inschwarze2009-06-031-4/+8
| | | | | | | | 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@).
* getgrouplist: If YP is #defined and enabled in /etc/group(5) and /etc/netid(5)schwarze2009-03-271-57/+119
| | | | | | | | | | | | | | contains a matching entry, use that and refrain from accessing YP. getpwnam/getpwuid: If YP is #defined and /etc/master.passwd(5) contains a matching entry before the first YP entry, use that and stay away from YP. Taken together, this allows a solution to the following problem pointed out by deraadt@: When YP was configured but temporarily unavailable, even root login would block, hindering you when trying to do repairs. To avoid this, you can now provide a static entry for root in /etc/netid. Using suggestions from miod@ otto@ blambert@ jmc@. "commit" deraadt@, "cool" ajacoutot@, "looks fine" jmc@.
* add missing header needed by asprintf().chl2008-08-231-1/+2
| | | | ok otto@ deraadt@
* After spotting a + record, continue scanning and pick up later groupsderaadt2008-08-221-4/+10
| | | | | in the file. Problem spotted by drahn. ok millert
* create a private getpwent()-like interface which does not walk the YPderaadt2008-06-241-9/+81
| | | | | | | 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
* zap remaining rcsid.espie2005-08-081-4/+1
| | | | | | Kill old files that are no longer compiled. okay theo
* deregister (and deauto!). ok millert@ marco@otto2005-03-251-3/+3
|
* ansify function definitions and zap some `register'jfb2004-05-181-6/+2
| | | | ok millert@
* protosderaadt2003-06-251-1/+2
|
* Remove the advertising clause in the UCB license which Berkeleymillert2003-06-021-6/+2
| | | | rescinded 22 July 1999. Proofed by myself and Theo.
* repair duplication checkderaadt1997-08-191-4/+5
|
* do not reuse id's. also be more careful with maxgids.deraadt1997-08-191-1/+10
|
* Clean up some -Wall complaints.millert1997-07-091-2/+2
|
* Remove dead codetholo1996-09-151-2/+1
| | | | | | Remove unused variables Silence some warnings lint(1) is your friend
* Fix RCS idstholo1996-08-191-7/+1
| | | | Make sure everything uses {SYS,}LIBC_SCCS properly
* Prototype internal functionstholo1996-03-251-2/+2
| | | | Do the right thing in presense of __STDC__
* initial import of NetBSD treederaadt1995-10-181-0/+94