Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/su if we are using pam and it succeeded, don't re-in...



details:   https://anonhg.NetBSD.org/src/rev/8bebdee5a397
branches:  trunk
changeset: 572580:8bebdee5a397
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Jan 08 18:12:35 2005 +0000

description:
if we are using pam and it succeeded, don't re-initialize kerberos needlessly.

diffstat:

 usr.bin/su/su.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (37 lines):

diff -r a0568e288830 -r 8bebdee5a397 usr.bin/su/su.c
--- a/usr.bin/su/su.c   Sat Jan 08 16:07:20 2005 +0000
+++ b/usr.bin/su/su.c   Sat Jan 08 18:12:35 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: su.c,v 1.60 2005/01/08 08:45:53 christos Exp $ */
+/*     $NetBSD: su.c,v 1.61 2005/01/08 18:12:35 christos Exp $ */
 
 /*
  * Copyright (c) 1988 The Regents of the University of California.
@@ -40,7 +40,7 @@
 #if 0
 static char sccsid[] = "@(#)su.c       8.3 (Berkeley) 4/2/94";*/
 #else
-__RCSID("$NetBSD: su.c,v 1.60 2005/01/08 08:45:53 christos Exp $");
+__RCSID("$NetBSD: su.c,v 1.61 2005/01/08 18:12:35 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -332,15 +332,15 @@
 #endif
 
        if (ruid
+#ifdef USE_PAM 
+           && (pam_err != PAM_SUCCESS)
+#endif
 #ifdef KERBEROS5
            && (!use_kerberos || kerberos5(username, user, pwd->pw_uid))
 #endif
 #ifdef KERBEROS
            && (!use_kerberos || kerberos(username, user, pwd->pw_uid))
 #endif
-#ifdef USE_PAM 
-           && (pam_err != PAM_SUCCESS)
-#endif
            ) {
                char *pass = pwd->pw_passwd;
                int ok = pwd->pw_uid != 0;



Home | Main Index | Thread Index | Old Index