summaryrefslogtreecommitdiff
path: root/libexec/login_skey/login_skey.c
AgeCommit message (Collapse)Author
2023-03-08Delete obsolete /* ARGSUSED */ lint comments.Philip Guenther
ok miod@ millert@
2021-01-02Check auth_mkvalue(3) return value for NULL (malloc failure).Todd C. Miller
For constant strings we don't actually need to use auth_mkvalue(3). Problem reported by Ross L Richardson.
2019-06-28When system calls indicate an error they return -1, not some arbitraryTheo de Raadt
value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if this strictness helps us in the future.
2019-01-25I am retiring my old email address; replace it with my OpenBSD one.Todd C. Miller
2017-07-20When login_skey was called for a user without skey, it crashed withAlexander Bluhm
NULL pointer dereference. It tried to pass a file descriptor that did not exist. This has to be done conditionally. bug found by Raimund Specht with process accounting; OK millert@
2015-10-16Implement real "flock" request and add it to userland programs thatTodd C. Miller
use pledge and file locking. OK deraadt@
2015-01-16Replace <sys/param.h> with <limits.h> and other less dirty headers whereTheo de Raadt
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)
2009-06-02comment spelling fix: ARSGUSED -> ARGSUSEDjmeltzer
2008-03-24msg_controllen has to be CMSG_SPACE so that the kernel can account forTheo de Raadt
each cmsg_len (ie. msg_controllen = sum of CMSG_ALIGN(cmsg_len). This works now that kernel fd passing has been fixed to accept a bit of sloppiness because of this ABI repair. lots of discussion with kettenis
2008-03-15Repair the simple cases for msg_controllen where it should just beTheo de Raadt
CMSG_SIZE(sizeof(int)), not sizeof(buffer) which may be larger because of alignment; ok kettenis hshoexer
2008-03-13Correct CMSG_SPACE and CMSG_LEN usage everywhere in the tree. Due toTheo de Raadt
an extensive discussion with otto, kettenis, millert, and hshoexer
2007-07-26Remove the space after "Password:" in password prompts where echo isTodd C. Miller
turned off. This is consistent with historic UNIX behavior.
2007-05-25"interupt" -> "interrupt" in various comments. Mostly from Diego Casati.Kenneth R Westerback
2004-09-18ARGSUSED signal handlerTheo de Raadt
2004-08-30Use CMSG_SPACE when allocating space for the control message.Todd C. Miller
Fixes fd passing problems on sparc and sparc64. OK henning@
2004-08-11Rename confusing variable for readability's sake. No actual code changes.Todd C. Miller
2004-08-08spacingTheo de Raadt
2004-08-05Add support for passing an fd to the user's S/Key record back andTodd C. Miller
forth between login_skey and the invoking process. This allows us to keep the record locked between an invocation of login_skey that receives the challenge and another that verifies the response, preventing an interloper from sniffing the challenge and beating the legitimate user to the response.
2004-03-10More checking for a NULL return value from getpass(). otto@ OKTodd C. Miller
2002-09-06ansi; ok millert pvalchevTheo de Raadt
2002-06-28minor indent cleanupTheo de Raadt
2002-06-02minor KNFTheo de Raadt
2002-05-29a few more strlcatTheo de Raadt
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.
2001-12-07Catch SIGINT, SIGQUIT and SIGTSTP but ignore during the databaseTodd C. Miller
update. We have to be careful and drop our lock if we are suspended and then regain the lock on resume. This is necessary because the user must not be allowed to keep a record locked for a long period of time to avoid a DoS. We must be sure to re-lock when we resume because otherwise an attacker could suspend us until a user starts to login and then resume and then race the user for login using the challenge response from the user.
2001-12-06Do not set handler for SIGINT and SIGQUIT to SIG_IGN since it preventsTodd C. Miller
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-10-24getopt(3) returns -1 when out of args, not EOF.Mike Pechkin
millert@ ok
2001-06-25Remove instance stuff now that su uses an explicit option to specifyTodd C. Miller
the invoking user.
2001-06-20Add an alarm to implement as timeout on the locked record.Todd C. Miller
2000-12-12skey login script; authenticates the user via S/KeyTodd C. Miller
will be used when BSD authentication is enabled