diff options
author | Ulrich Müller <ulm@gentoo.org> | 2013-08-26 12:17:00 +0200 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2013-08-26 12:17:00 +0200 |
commit | 32be7fcd5b3c5f784c4152c9651a4353ffa6e114 (patch) | |
tree | 6d9a4f331353e079d24cd497fbf8b4df27e9712f | |
parent | Initial patchset for motif-2.3.4. (diff) | |
download | ulm-32be7fcd5b3c5f784c4152c9651a4353ffa6e114.tar.gz ulm-32be7fcd5b3c5f784c4152c9651a4353ffa6e114.tar.bz2 ulm-32be7fcd5b3c5f784c4152c9651a4353ffa6e114.zip |
Improve handling of skey_haskey return status.pam_skey-1.1.5-patches-5
-rw-r--r-- | patchsets/pam_skey/1.1.5/04_all_haskey_error.patch | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/patchsets/pam_skey/1.1.5/04_all_haskey_error.patch b/patchsets/pam_skey/1.1.5/04_all_haskey_error.patch new file mode 100644 index 0000000..365b5c7 --- /dev/null +++ b/patchsets/pam_skey/1.1.5/04_all_haskey_error.patch @@ -0,0 +1,18 @@ +skey_haskey returns 0 if the user exists, 1 if the user doesn't exist, +and -1 on file error. Distinguish between these conditions. + +--- pam_skey-1.1.5/pam_skey.c ++++ pam_skey/pam_skey.c +@@ -96,7 +96,11 @@ + } + + /* Check whether or not this user has an S/Key */ +- if (skey_haskey(username) != 0) { ++ status = skey_haskey(username); ++ if (status == -1) { ++ syslog(LOG_ERR, "error accessing S/Key database for user [%s]", username); ++ return PAM_AUTHINFO_UNAVAIL; ++ } else if (status != 0) { + LOGDEBUG((LOG_DEBUG, "user [%s] has no S/Key entry", username)); + return PAM_IGNORE; + } |