summaryrefslogtreecommitdiffstats
path: root/usr.bin/passwd/local_passwd.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* unveil(2) obvious _PATH_LOGIN_CONF with read permission to use login_get*(3)mestre2018-11-081-1/+3
| | | | | | family commands. Report and fix provided by Mark Patruck <mark ! wrapped ! cx>
* unveil(2) the following files for passwd(1) with their correspondingmestre2018-10-251-1/+10
| | | | | | | | | | | | permissions: _PATH_MASTERPASSWD_LOCK - write/create permissions _PATH_MASTERPASSWD - read permission _PATH_BSHELL - execute permission (required since we might need to spawn an external passwordcheck program if defined in /etc/login.conf) _PATH_PWD_MKDB - execute permission OK millert@ deraadt@
* Use explicit_bzero() to clear the buffer used when the user retypesmillert2016-12-301-2/+5
| | | | the new password. From isk AT ingve DOT org
* _PASSWORD_LEN is length that comes out of crypt(), not a meaningfultedu2016-09-021-4/+4
| | | | | | | length for user entered passwords. And the +1 is just superstitious nonsense inherited from getpass() guts. Switch to a pleasing fixed size of 1024. ok millert
* make sure to explicitly clear memory that is used for password input.gsoares2016-09-021-1/+6
| | | | OK tedu@
* replace obsolete getpass with readpassphrase.tedu2016-08-311-9/+16
| | | | ok gsoares
* nicer format strings and use dprintf instead of writetedu2016-08-311-7/+5
|
* Trust the login_getcaptime() declaration and don't cast the arguments toguenther2016-08-151-3/+2
| | | | their own expected type
* Switch to getpwnam_shadow() now that getpwnam() no longer opens the shadowtim2016-05-081-2/+2
| | | | database; OK deraadt@ sthen@
* Delete YP password related code. As a result, these can also bederaadt2015-11-261-6/+12
| | | | | | pledged. Keep an eye out for regressions, because they could be uncomfortable. ok beck semarie
* No need to declare pwd_gensalt; it's unused and gone.ajacoutot2015-10-251-2/+1
| | | | ok tedu@
* change prototype for crypt_newhash. the login_cap_t is a holdover from itstedu2014-11-211-3/+5
| | | | | | pwd_gensalt origins, but a string argument works equally work and is more friendly to consumers beyond local user accounts. ok deraadt
* switch to using crypt_newhash interface. ok deraadttedu2014-11-201-7/+9
|
* use crypt_checkpass instead of crypt/strcmptedu2014-11-111-2/+2
|
* Use open(O_CLOEXEC) instead of a separate fcntl(FD_CLOEXEC) call.guenther2013-01-181-3/+3
| | | | Nudged by David Hill
* rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andderaadt2009-10-271-6/+1
| | | | | | | unmaintainable). these days, people use source. these id's do not provide any benefit, and do hurt the small install media (the 33,000 line diff is essentially mechanical) ok with the idea millert, ok dms
* -Wall -Wshadow clean, no binary changedjm2008-11-061-2/+3
|
* Correct English.jsing2008-04-271-3/+3
| | | | ok jmc@
* spacingderaadt2005-05-011-4/+4
|
* o some missing free()'s in error pathsmoritz2004-12-201-3/+5
| | | | | | | | | | o use FD_CLOEXEC instead of 1 o fix a crash when the round number of localcipher in the default section in login.conf was ommitted. noted by mpech@ ok mpech@, otto@, millert@, henning@
* ARGSUSED signal handlerderaadt2004-09-181-2/+3
|
* Print a newline before the message in kbintr. Otherwise the messagemillert2004-07-241-2/+3
| | | | ends up on the same line as the prompt.
* passwd.conf has been deprecated since login.conf was imported.millert2004-07-131-8/+8
| | | | Today it finally dies. Based on a diff from Gabriel Kihlman.
* Adapt to new pw_copy() API, closes PR 3698.millert2004-04-201-4/+9
|
* Check getpass() return value for NULL. Closes Pr 3706.millert2004-03-101-7/+8
| | | | With help and OK from otto@.
* a cleaning recommended by lintderaadt2003-06-201-3/+4
|
* Remove the advertising clause in the UCB license which Berkeleymillert2003-06-031-7/+3
| | | | rescinded 22 July 1999. Proofed by myself and Theo.
* stdlib.hderaadt2003-04-281-2/+3
|
* Simpler and consistent error messages when the user enters an emptymillert2003-03-301-27/+21
| | | | password or hits ^C. OK deraadt@ and mpech@
* various cleanups; ok millertderaadt2002-06-281-13/+7
|
* 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-7/+7
|
* Catch SIGINT and SIGQUIT via the kbintr() signal handler in ypgetnewpasswd()millert2001-12-071-7/+8
| | | | | too. Restore old signal handler at the end of ypgetnewpasswd() and getnewpasswd().
* Catch SIGINT and SIGQUIT via the kbintr() signal handler.millert2001-12-071-2/+8
| | | | | Now that getpass() is interuptible we need to catch these so that the "Password unchanged." message is printed.
* kill more registersmpech2001-11-191-3/+3
| | | | millert@ ok
* Instead of prompting the user whether or not they wish to continue tomillert2001-08-271-44/+32
| | | | | | | wait for the lock on password file just tell the user to interrupt with ^C. This simplifies the locking loop a bit. Update man page to this effect.
* Change the second arg to pw_mkdb() from a boolean flag to a set ofmillert2001-08-261-5/+5
| | | | | | | | | | | 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.
* If we modify pw_change we cannot pass pw_mkdb() the secureonly flag.millert2001-08-181-7/+16
| | | | | | We don't need to rebuild the v7 version of the file in this case but we have no way to communicate that to pw_mkdb since we pass in a boolean instead of a set of bit flags.
* extra arg to pw_mkdbmillert2001-08-161-4/+4
|
* At Theo's request only print 'Please wait' if don't get the lockmillert2001-08-161-4/+6
| | | | on the first try.
* quiet some -Wall warnings for login_{l,}chpassmillert2001-07-071-4/+4
|
* Move locking of the passwd file *after* we have gotten a new passwordmillert2001-07-041-15/+64
| | | | | | | from the user. Set real/effective/saved uids to 0 and block all signals so the lock cannot be kept longer than necessary. If we cannot lock, try again every 1/4 second for 2 seconds and then ask the user what they wish to do (keep trying, quit).
* o move passwd.conf variables into login.confmillert2001-06-181-19/+32
| | | | | | o no longer install passwd.conf (but it is used if it exists and the needed info is not in login.conf) o added passwordtime and minpasswordlen login.conf variables
* Minor interface changes to allow code reuse in login_chpass(8) andmillert2000-12-121-18/+20
| | | | login_lchpass(8)
* Update for pw_mkdb(3) interface change. All but vipw and userdel canmillert2000-11-261-3/+3
| | | | specify a username (and thus avoid rebuilding the while database).
* integrate password quality checking, disallow all digit passwords motivatedprovos2000-08-011-14/+12
| | | | | by Solar Designer. External password checking program can be spawned now, number of password trials configurable. work by me and Bob Beck.
* excessive paranoiaderaadt1998-07-131-3/+4
|
* catch special password "s/key" and refuse itderaadt1998-02-241-2/+6
|
* Better error message when lookup of getlogin() != uidmillert1997-04-071-3/+3
|
* Slight cleanup, more neededweingart1997-03-271-7/+8
|
* cleaned up, moved pw_getconf to libutil, removed _'s in option namesprovos1997-02-161-18/+7
|