summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/auth_subr.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Remove support for kerb4 '.' instance separator, kerb4 is dead. OK jacekm@millert2009-01-151-5/+5
|
* msg_controllen has to be CMSG_SPACE so that the kernel can account forderaadt2008-03-241-2/+2
| | | | | | | 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
* Repair the simple cases for msg_controllen where it should just bederaadt2008-03-151-2/+2
| | | | | CMSG_SIZE(sizeof(int)), not sizeof(buffer) which may be larger because of alignment; ok kettenis hshoexer
* Correct CMSG_SPACE and CMSG_LEN usage everywhere in the tree. Due toderaadt2008-03-131-4/+7
| | | | an extensive discussion with otto, kettenis, millert, and hshoexer
* Fix waitpid() idiom. Noticed by deraadt@millert2007-11-011-4/+3
|
* Check snprintf(3) return value for error or truncation.moritz2007-09-171-5/+15
| | | | | | Mostly path construction, where truncation could be bad. ok and input from deraadt@ millert@ ray@
* Restart waitpid() if we are interupted by a signal. OK deraadt@millert2004-12-021-2/+5
|
* Use CMSG_SPACE when allocating space for the control message.millert2004-08-301-3/+3
| | | | Fixes fd passing problems on sparc and sparc64. OK henning@
* Add my copyright.millert2004-08-091-1/+16
|
* Add support for passing a file descriptor back and forth betweenmillert2004-08-031-17/+77
| | | | | | | the parent program and the login script. This will be used by login scripts that need to maintain state, for instance keeping a record locked during authentication while using separate challenge and response authentication with S/Key. OK deraadt@ marius@ henning@
* Use closefrom(); ok millert teduderaadt2004-01-231-4/+2
|
* Don't clean options in auth_clean() which was introduced in rev 1.8.millert2004-01-101-9/+1
| | | | | login(1) depends on auth_clean() leaving options alone so this was API breakage. Verified to not make ftpd leak memory by mpech@.
* use va_copy() with gcc 3 and up.brad2004-01-081-2/+8
| | | | ok millert@ espie@
* ansification; checked by pvalderaadt2003-06-111-2/+2
|
* spellingderaadt2003-01-041-2/+2
|
* Initialize status to zero before calling waitpid(). That way, ifmillert2002-11-221-1/+2
| | | | | there is nothing to be waited for (for instance if SIGCHLD is being ignored) we don't check WIFEXITED(garbage off the stack).
* more snprintf; ok millertderaadt2002-11-221-2/+2
|
* Revert this va_copy addition, it cannot work on macppc (which is thedrahn2002-10-301-4/+2
| | | | | | | only arch where va_copy is currently required), current version of va_copy uses alloca, but since the results of the va_copy are not used here, only after return, stack trashing will occur. This will have to be revised again for gcc 3.2 support on powerpc.
* Use va_copy() for varargs assignemnt. va_copy() is standard with C99drahn2002-10-241-2/+4
| | | | and gcc3.2 requires this on powerpc.
* Replace "if (value != NULL && value == as->FOO)" with justmillert2002-10-161-6/+6
| | | | | "if (value == as->FOO)" -- NULL needs no special handling. Pointed out by Paul Borman.
* Fix typo introduce in last commitmillert2002-10-151-2/+2
|
* If auth_setitem() is called with the current value (ie: the pointermillert2002-10-151-9/+11
| | | | | | | | | | | | is the same as the private value) then just return 0 as there is nothing to do. This fixes a potentially nasty problem where the caller could grab the username or style from the auth session via auth_getitem() and then call auth_verify() with those values. auth_setitem() would eventually get called which would make a private copy and free the old values in the auth session. After all this, the stashed username and/or style pointers would point to freed memory.
* Cast NULL sentinel in auth_call() to a pointermillert2002-10-151-2/+2
|
* Move the clearing of as->state in auth_challenge() to after the sanitymillert2002-10-131-7/+6
| | | | | checks. The check for "as != NULL" is useless if you have already dereferenced "as". Also fix some comment typos. From Moritz Jodeit.
* If fork() fails, log/report the error *before* we close our fd's justmillert2002-08-041-3/+3
| | | | in case close(2) were to set errno.
* KNFderaadt2002-06-271-2/+2
|
* try to use strlcpy and snprintf more; ok variousderaadt2002-05-241-2/+2
|
* Convert indentation whitespace -> tabs and kill $@%^#! ^M'smillert2002-03-131-13/+13
|
* o) Fix memory leak in _auth_checklogin(), auth_approval(), auth_close() andmpech2002-02-051-2/+17
| | | | | | | | | auth_clean(). Spotted via ftpd. We could use ftpd as a simple debug tool for bsdauth and login_cap routines. :) millert@ help&OK
* If waitpid() return ECHILD that should not be a fatal error sincemillert2002-01-141-7/+7
| | | | | someone else could have waited for the process or zombies could be disabled via SIG_IGN or SA_NOCLDWAIT.
* Convert warn/warnx -> _warn/_warnxmillert2001-07-021-6/+6
| | | | | Should not really spew to stderr from libc but right now there is no other way to get a sensible error message to the user.
* When splitting instance from username, treat '/' as a separator asmillert2001-06-241-6/+6
| | | | well (for Kerb5).
* zero pw_passwd before freeingmillert2000-11-231-2/+5
|
* Remove needless memset() from last commit.millert2000-11-211-2/+1
|
* Deal with va_list not being a pointer; this should be re-evaluated.millert2000-11-211-13/+16
| | | | Fixes a compile problem on alpha.
* BSD authentication routines from BSDI. Presently this is not used butmillert2000-11-211-0/+986
the login_* helper programs and other support will be committed in the near future.