diff options
author | Andrew G. Morgan <morgan@kernel.org> | 2003-01-14 05:43:07 +0000 |
---|---|---|
committer | Andrew G. Morgan <morgan@kernel.org> | 2003-01-14 05:43:07 +0000 |
commit | 7050b307e9e712471d987e0c5f8dd1cb2260511c (patch) | |
tree | 5bf06d87cc804cb3255e12d0cb1b47064a2d1755 /modules/pam_wheel/pam_wheel.c | |
parent | 2b71955aec63541e4b071c12eae9fba76e7085fa (diff) | |
download | pam-7050b307e9e712471d987e0c5f8dd1cb2260511c.tar.gz pam-7050b307e9e712471d987e0c5f8dd1cb2260511c.tar.bz2 pam-7050b307e9e712471d987e0c5f8dd1cb2260511c.zip |
Relevant BUGIDs: 667584 664290
Purpose of commit: bugfix
Commit summary:
---------------
Two bug fixes in one: don't trust getlogin() and sanely lower the
time the password databases are locked in pam_unix.
Diffstat (limited to 'modules/pam_wheel/pam_wheel.c')
-rw-r--r-- | modules/pam_wheel/pam_wheel.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/pam_wheel/pam_wheel.c b/modules/pam_wheel/pam_wheel.c index d127791b..2ac1eecb 100644 --- a/modules/pam_wheel/pam_wheel.c +++ b/modules/pam_wheel/pam_wheel.c @@ -43,6 +43,7 @@ #define PAM_SM_ACCOUNT #include <security/pam_modules.h> +#include <security/_pam_modutil.h> /* some syslogging */ @@ -110,7 +111,7 @@ static int perform_check(pam_handle_t *pamh, int flags, int ctrl, const char *use_group) { const char *username = NULL; - char *fromsu; + const char *fromsu; struct passwd *pwd, *tpwd; struct group *grp; int retval = PAM_AUTH_ERR; @@ -142,7 +143,7 @@ static int perform_check(pam_handle_t *pamh, int flags, int ctrl, } fromsu = tpwd->pw_name; } else { - fromsu = getlogin(); + fromsu = _pammodutil_getlogin(pamh); if (fromsu) { tpwd = getpwnam(fromsu); } |