summaryrefslogtreecommitdiffstats
path: root/libexec/login_passwd
AgeCommit message (Collapse)AuthorFilesLines
2021-01-02Check auth_mkvalue(3) return value for NULL (malloc failure).millert1-3/+2
For constant strings we don't actually need to use auth_mkvalue(3). Problem reported by Ross L Richardson.
2020-05-15Fix handling of passwd entries with an empty password.millert1-4/+5
Initialize "pass" to the empty string instead of NULL, otherwise crypt_checkpass() will dereference NULL. From Yuichiro Naito via yasuoka@. OK deraadt@
2019-12-24Merge two missed fixes from login.c to login_passwd.c.millert1-4/+5
- use the correct length when checking for "-v lastchance=yes" - don't try to zero pass if it is NULL From miod@
2019-12-21Replace modular version with origin BSDi version with our updates.millert4-252/+133
In 2001 login_passwd was made modular so we could use the same source for passwd and kerberos auth. Now that we no longer have kerberos integrated we can simplify login_passwd. OK deraadt@
2019-12-14Return BI_SILENT not BI_AUTH if the challenge service is requested.millert1-2/+2
This bug was introduced in the login_passwd rewrite back in 2001. From Tom Longshine.
2019-01-25I am retiring my old email address; replace it with my OpenBSD one.millert1-3/+3
2018-09-30Remove the hopefully last remnants of kerberos in there: arg_login,ajacoutot1-12/+1
arg_notickets and invokinguser. ok kn@ millert@
2018-06-13Call pledge(2) earlier before opening the auth channel and readpassphrase()reyk3-8/+15
Before this change, only the password validation was pledged, now it also includes some more code including the "Password:" prompt. To pledge the code earlier, the getpwnam_shadow() had to be moved up - it works under "getpw" but it does not return the actual password hash under pledge. This also works with yp(ldap). OK deraadt@ tb@ brynet@
2018-06-13Remove #ifdef PASSWD, it was always enabled and is a leftover from krb5 days.reyk3-11/+5
No other uses of -DPASSWD were found in the tree. OK deraadt@ tb@ brynet@
2016-09-03set password to return of readpassphrase(), not always the buffer.tedu1-3/+2
2016-09-03convert to use readpassphrase() instead of DEPRECATED/getpass()gsoares2-4/+6
OK millert@
2016-09-02krb5 bits should rest in peacegsoares2-9/+2
OK deraadt
2016-08-16remove unneeded caststedu1-2/+2
2015-11-19Call syslog() if login_* pledge fails; OK deraadt@millert1-3/+5
2015-11-18use _shadow getpw functions. these utilities obviously deal with hashes.tedu1-2/+2
2015-10-24Don't compile pwd_gensalt, it's not needed since we use crypt_checkpass.ajacoutot2-5/+3
ok tedu@
2015-10-14pledge "stdio rpath" is good enough for these mainline BSD auth loginderaadt1-1/+5
programs. (I am very surprised pledge ended up working for programs like this) ok semarie millert
2015-10-05Use explicit_bzero() instead of memset() for zeroing out secrets.millert2-4/+4
OK deraadt@
2015-09-11add some missing .Cm macros and drop some redundant .Bk while hereschwarze1-8/+8
2015-01-16Replace <sys/param.h> with <limits.h> and other less dirty headers wherederaadt2-4/+4
possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)
2014-09-16use crypt_checkpass function to make things simpletedu1-22/+7
2012-06-01add a krb5-noverify option for login.conf that disables verificationdlg2-4/+4
of the server against a local host keytab file when you're authing users with login_krb5. useful for when you need to auth users but dealing with the domain admins is painful... ok sthen@ jj@ millert@
2012-02-01improve synopsis markup of login_* utilities; use a more standardsobrado1-4/+4
phrasing when listing flags; add missing arguments to flags in the DESCRIPTION section of the manual page. use of .Li (literal text) macros and standard wording suggested by jmc@ ok jmc@
2007-05-31convert to new .Dd format;jmc1-2/+2
2006-04-02a FALLTHROUGH and one size_t castderaadt1-2/+3
2006-03-09Foil potential timing attacks by using the correct password hashmillert3-8/+17
instead of "xx". In practice this means bcrypt() will be used for non-existent users instead of DES crypt(). Adapted from a patch by Peter Philipp. OK deraadt@
2005-04-14drop some krb4 stuffbiorn2-8/+2
ok beck@
2004-05-12login_passwd needs to be setuid root after all for "secure" YP maps.millert1-3/+3
2004-03-10More checking for a NULL return value from getpass(). otto@ OKmillert2-3/+6
2003-07-29spacesderaadt1-2/+2
2003-06-17Sync with share/misc/license.template and add missing DARPA creditmillert1-8/+8
where applicable.
2003-06-03Use an ISC-tyle license for all my code; it is simpler and more permissive.millert1-22/+11
2003-03-28login_passwd is now setgid _shadow instead of setuid root.millert1-3/+3
2003-03-17incorrect string length matching; ianm@cit.uws.edu.auderaadt1-7/+7
2002-09-06ansi; ok millert pvalchevderaadt1-2/+1
2002-08-28o) start new sentence on a new line;mpech1-2/+2
o) don't use .Nm w/o argument in .SYNOPSIS; I waste time, when fixing already cleaned pages. :( one man ok@
2002-06-02minor KNFderaadt1-4/+4
2002-03-19Only accept the empty string for users with no password.millert1-10/+13
Previously, any password was accepted (that's how crypt() behaves).
2001-12-06Do not set handler for SIGINT and SIGQUIT to SIG_IGN since it preventsmillert1-3/+1
getpass()/readpassphrase() from being able to restore the tty mode on keyboard interrupt. Along with the recent readpassphrase.c commit this means that if you ^C things that use login scripts (like su(1)) with a non-CBREAK shell your tty mode will be restored nicely. TODO: The various login scripts need to install handlers to avoid leaving turd files or otherwise ending in a bad state. It would also be nice to send BI_REJECT to the back channel.
2001-11-13o) fix bogus .Xr usage;mpech1-2/+3
o) start new sentence on a new line; o) don't use .Xr instead of .Pa tag; o) minimal -mdoc design fixes; millert@ ok;
2001-08-12some KNFmillert1-6/+6
2001-08-09o wheel and lastchance are -v args (variable), not -s (service)millert1-22/+25
o an unknown service is a fatal error o some KNF
2001-07-08Remove extraneous .Pp after .Shmillert1-2/+1
2001-06-29uglyderaadt1-10/+9
2001-06-26Cleanup and unify login_passwd, login_krb4, login_krb4-or-pwd, login_krb5 andhin4-141/+266
login_krb5-or-pwd.
2001-06-25Remove instance stuff now that su uses an explicit option to specifymillert1-14/+2
the invoking user.
2001-06-25Don't do the root instance handling stuff; su no longer does it.hin1-17/+3
2000-12-12passwd login script; authenticates the user via passwd/ypmillert3-0/+323
will be used when BSD authentication is enabled