Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libpam/modules/pam_krb5 Check for PAM_PRELIM_CHECK and s...



details:   https://anonhg.NetBSD.org/src/rev/ffe9d19dbe24
branches:  trunk
changeset: 574315:ffe9d19dbe24
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sat Feb 26 18:03:37 2005 +0000

description:
Check for PAM_PRELIM_CHECK and simply do nothing.  (Did this even work
in FreeBSD?)

diffstat:

 lib/libpam/modules/pam_krb5/pam_krb5.c |  15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r af2f1c527366 -r ffe9d19dbe24 lib/libpam/modules/pam_krb5/pam_krb5.c
--- a/lib/libpam/modules/pam_krb5/pam_krb5.c    Sat Feb 26 17:40:49 2005 +0000
+++ b/lib/libpam/modules/pam_krb5/pam_krb5.c    Sat Feb 26 18:03:37 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pam_krb5.c,v 1.3 2005/02/26 15:57:57 thorpej Exp $     */
+/*     $NetBSD: pam_krb5.c,v 1.4 2005/02/26 18:03:37 thorpej Exp $     */
 
 /*-
  * This pam_krb5 module contains code that is:
@@ -53,7 +53,7 @@
 #ifdef __FreeBSD__
 __FBSDID("$FreeBSD: src/lib/libpam/modules/pam_krb5/pam_krb5.c,v 1.22 2005/01/24 16:49:50 rwatson Exp $");
 #else
-__RCSID("$NetBSD: pam_krb5.c,v 1.3 2005/02/26 15:57:57 thorpej Exp $");
+__RCSID("$NetBSD: pam_krb5.c,v 1.4 2005/02/26 18:03:37 thorpej Exp $");
 #endif
 
 #include <sys/types.h>
@@ -668,8 +668,15 @@
        const void *user;
        char *princ_name, *passdup;
 
-       if (!(flags & PAM_UPDATE_AUTHTOK))
-               return (PAM_AUTHTOK_ERR);
+       if (flags & PAM_PRELIM_CHECK) {
+               /* Nothing to do here. */
+               return (PAM_SUCCESS);
+       }
+
+       if (!(flags & PAM_UPDATE_AUTHTOK)) {
+               PAM_LOG("Illegal flags argument");
+               return (PAM_ABORT);
+       }
 
        retval = pam_get_item(pamh, PAM_USER, &user);
        if (retval != PAM_SUCCESS)



Home | Main Index | Thread Index | Old Index