summaryrefslogtreecommitdiff
path: root/lib/libutil/passwd.c
AgeCommit message (Collapse)Author
2004-11-04Treat EOF at prompt the same as 'n' instead of looping forever.Todd C. Miller
Noticed by mepch@. OK pedro@ and deraadt@
2004-07-13passwd.conf has been deprecated since login.conf was imported.Todd C. Miller
Today it finally dies. Based on a diff from Gabriel Kihlman.
2004-04-20Change pw_copy(3) to take a 3rd arguement, the existing passwd entry.Todd C. Miller
This allows an application to only update a password entry if it is in the state it expects. Additionally, if the old passwd struct is specified the new one may have a different pw_name field since matching is done on the original. Adapted from FreeBSD.
2003-06-26ansi and protosTheo de Raadt
2003-06-02Remove the advertising clause in the UCB license which BerkeleyTodd C. Miller
rescinded 22 July 1999. Proofed by myself and Theo.
2003-04-02knfTheo de Raadt
2003-04-01Throw an error if the username field is empty; noticed by mpech@Todd C. Miller
2003-03-30more asprintf; millert okTheo de Raadt
2003-03-30asprintf; millert okTheo de Raadt
2002-07-31mark pw_error() __dead since it exitsTodd C. Miller
2002-06-27%u for uid/gid; millert okTheo de Raadt
2002-06-09some -Wall and spaces cleanup, scsi.c left.Federico G. Schwindt
some brave soul should look at it.
2002-05-24strlcpy and KNFTheo de Raadt
2002-04-10Clean up after pw_file().Mike Pechkin
millert@ ok deraadt@ ok to commit
2002-02-16Part one of userland __P removal. Done with a simple regexp with some minor ↵Todd C. Miller
hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.
2002-01-16Use the volatile specifier to fix warnings about variables beingTodd C. Miller
clobbered by longjmp / vfork instead of the gcc "(void)&foo;" hack.
2001-11-14save errno in signal handlerTheo de Raadt
2001-08-26Change the second arg to pw_mkdb() from a boolean flag to a set ofTodd C. Miller
bit flags ORed together. Currently the only flags defined are _PASSWORD_SECUREONLY and _PASSWORD_OMITV7 but this is enough to cause pw_mkdb() to run pwd_mkdb with the options we want. With this change we no longer generate the old V7 passwd file when only the extra fields in master.passwd (or the encrypted password) have changed. There are other programs that could probably use the _PASSWORD_OMITV7 flag; they will be converted at a future date.
2001-08-16Add new 'secureonly' arg to pw_mkdb() to correspond to pwd_mkdb's new -sTodd C. Miller
flag and crank the library major due to the interface change.
2001-07-11Plug memory leak in pw_copy(); millert@ okAaron Campbell
2001-07-09correct type on last arg to execl(); nordin@cse.ogi.eduTheo de Raadt
2001-01-02Fix a problem introduced by the printf format sweep. Passing a NULLTodd C. Miller
pw_error() is prefectly legal but now we have to check for it explicity (it was handled implicitly before since warn(name) would become warn(NULL)).
2000-11-26Add a username argument to pw_mkdb to match 'pwd_mkdb -u username'.Todd C. Miller
Crank the shlib major number due to the interface change.
2000-08-01close fd for pw_lck on exec, okay deraadt@Niels Provos
2000-06-30warnx?/errx? paranoia (use "%s" not a bare string unless it is aTodd C. Miller
constant). These are not security holes but it is worth fixing them anyway both for robustness and so folks looking for examples in the tree are not misled into doing something potentially dangerous. Furthermore, it is a bad idea to assume that pathnames will not include '%' in them and that error routines don't return strings with '%' in them (especially in light of the possibility of locales).
1998-11-16preserve errno; christosTheo de Raadt
1998-08-03Use UID_MAX, not UINT_MAX. Rename remove_trailing_space() to ↵Todd C. Miller
trim_whitespace() since it trims from both ends, not just the rear.
1998-06-22add missing endusershell()Todd C. Miller
1998-03-23do not wait if vfork() failsTheo de Raadt
1997-11-18-WallTodd C. Miller
1997-11-17Go back to old file locking method, O_EXLOCK method has too many problemsTodd C. Miller
1997-11-17pw_mkdb() now returns -1 if ptmp is size 0.Todd C. Miller
1997-11-17Work around bug in open(2) wrt O_TRUNC and O_SHLOCK|O_EXLOCK.Todd C. Miller
1997-09-29fix yes/no prompt code for EOF case; wosch@freebsdTheo de Raadt
1997-06-22Use O_EXLOCK option of open(2) to open /etc/ptmp with an exclusiveTodd C. Miller
lock. This fixes a DOS bug where a user could run passwd(1) and send it a SIGKILL, thus leaving /etc/ptmp in place.
1997-06-17Add support to handle password files in directories other than /etcNiklas Hallqvist
1997-04-10give only default values when asked for.Niels Provos
1997-02-16added password configuration access function, used to determineNiels Provos
password cipher type at the moment
1997-02-15when using strsep you should be aware that the delimiter will be replacedNiels Provos
by a nifty '0', so you cant check for a colon instead and dump some I am sorry, Dave. I can't do that.
1997-02-13permit 32-bit uid/gid, help from millertTheo de Raadt
1996-12-06vfork w/ exit botchTheo de Raadt
1996-06-19do not unexpectedly unlink the ptmp file; also support SIG*STOP cleanlyTheo de Raadt
with our changes which permit "EDITOR=emacs -nw" to work.
1996-06-17util.h: new resting placeJason Downs
opendev.h: ok, so I merged it with util.h opendev.h: use util.h everything else: use "util.h"
1996-06-06system() $EDITOR safelyTheo de Raadt
1996-05-22libutilTheo de Raadt