summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/getpwent.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Preserve errno across calls to open the password database(s), soguenther2011-09-051-2/+5
| | | | | | | that errno isn't changed when a normal user (who can't open spwd.db) does a lookup. Problem pointed out by Tim van der Molen (tbvdm at xs4all.nl)
* remove unused variablechl2009-11-211-2/+1
| | | | ok deraadt@
* simplify the code looking for + in the password database, after analysisderaadt2009-11-121-5/+4
| | | | of a false positive made by parfait; ok millert
* Take advantage of the surprise libc bump to bring inschwarze2009-06-031-59/+2
| | | | | | | | 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-11/+13
| | | | | | | | | | | | | | 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@.
* Avoid an occasional double free in getpwent() which corrupted memory. Itderaadt2008-07-231-6/+2
| | | | | | happened only in the case of a + record indicating to use YP, but with ypbind not actually running. Problem found by pyr; solution found with millert ok millert pyr
* oops, fix getpwent() use of wrong buffersderaadt2008-07-061-3/+4
| | | | found by alexander.schrijver
* Add _PW_BUF_LEN define and use it instead of hard-coding 1024 formillert2008-06-251-6/+6
| | | | the buffer size. OK deraadt@
* implement getpwnam_r() and getpwuid_r() -- very nearly a rewrite of thederaadt2008-06-241-469/+403
| | | | entire file. much help from kurt, and tested by many
* 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-4/+4
|
* ansify function definitions and zap some `register'jfb2004-05-181-22/+15
| | | | 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.
* add missing enumeration case to select to kill gcc warningavsm2003-05-011-1/+4
| | | | millert@ ok
* Add a "shadow" group and make the shadow passwd db readable by thatmillert2002-11-211-6/+4
| | | | | | | | | | | | | | | group. This changes getpw* to always try the shadow db first and then fall back to the db w/o password hashes. In the future, /usr/libexec/auth/login_passwd (and others) will be setgid shadow instead of setuid root. OK deraadt@ If you track -current you should do the following: o add group shadow to /etc/group o chgrp shadow /etc/spwd.db o chmod 640 /etc/spwd.db o rebuild and install src/usr.sbin/pwd_mkdb You do not need to rebuild libc yet, but it would't hurt to do so.
* KNFderaadt2002-07-061-20/+20
|
* cope better if realloc fails; better fix than cloder@acm.orgderaadt2002-07-061-1/+2
|
* try to use strlcpy and snprintf more; ok variousderaadt2002-05-241-2/+2
|
* We live in an ANSI C world. Remove lots of gratuitous #ifdef __STDC__ cruft.millert2002-02-191-6/+1
|
* Part one of userland __P removal. Done with a simple regexp with some minor hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.millert2002-02-161-9/+9
|
* put another YP-only piece inside the ifdefderaadt2001-07-101-1/+3
|
* Avoid theoretical potential buffer overflowpjanzen2001-02-131-2/+2
|
* move utmp to large format, usernames to 32 chars; downsjderaadt2001-01-311-9/+8
|
* well if you cannot do a libc commit properly a week before 2.7 tree lock, surely it can wait till after 2.7deraadt2000-04-251-132/+10
|
* getpw*_r()d2000-04-251-10/+132
|
* redo master.passwd.byname check if either the uid or euid changes, this wasderaadt1999-09-151-4/+18
| | | | a case of bad caching; peter and I
* indentderaadt1999-09-141-114/+114
|
* Use strtol() and strtoul() instead of atoi(). This allows us to catchmillert1999-09-031-6/+21
| | | | errors reasonably and deal correctly with unsigned quantities.
* realloc repairderaadt1998-08-141-3/+10
|
* avoid calling __has_yppw() everytime through getpwent(), by caching the YP status along with the open file statusderaadt1998-07-141-5/+8
|
* handle long usernames more carefullyderaadt1997-12-181-5/+9
|
* tabifykstailey1997-07-231-2/+2
|
* constrain length of db lookups better; reported by adam@math.tau.ac.ilderaadt1997-04-181-3/+3
|
* buf oflow; bitbltderaadt1997-04-131-3/+7
|
* kill __yp_token, other clean ups.downsj1996-10-161-19/+21
|
* * optimal exclusions support -- don't waste memory with DB. assumesdownsj1996-10-151-87/+144
| | | | | | | | exclusions lists are typically small. * move YP_OVERRIDE_PASSWD to a static var. needs some way for the system to set this. * clean up variable names and some code. * invisibly support FreeBSD ypserv running in "secure" mode.
* uid_t is now a u_int32_t, treat it as such.millert1996-09-161-4/+5
|
* Add a couple of syscalls; bring more prototypes into scopetholo1996-09-151-1/+2
|
* Remove dead codetholo1996-09-151-6/+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
* yp_prot.h lies -> use yp.h (from yp.x) instead, change lots of structurederaadt1996-04-241-1/+1
| | | | | | | | | 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.
* initial import of NetBSD treederaadt1995-10-181-0/+942