From 0536655c058473514afda75cca1ee47e62c9e3cc Mon Sep 17 00:00:00 2001 From: millert Date: Tue, 11 Feb 1997 18:26:32 +0000 Subject: [PATCH] Fix for non-kerberos. --- usr.bin/su/su.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.bin/su/su.c b/usr.bin/su/su.c index cb44e708848..feb9d373bc0 100644 --- a/usr.bin/su/su.c +++ b/usr.bin/su/su.c @@ -1,4 +1,4 @@ -/* $OpenBSD: su.c,v 1.19 1997/02/11 05:00:55 tholo Exp $ */ +/* $OpenBSD: su.c,v 1.20 1997/02/11 18:26:32 millert Exp $ */ /* * Copyright (c) 1988 The Regents of the University of California. @@ -41,7 +41,7 @@ char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)su.c 5.26 (Berkeley) 7/6/91";*/ -static char rcsid[] = "$OpenBSD: su.c,v 1.19 1997/02/11 05:00:55 tholo Exp $"; +static char rcsid[] = "$OpenBSD: su.c,v 1.20 1997/02/11 18:26:32 millert Exp $"; #endif /* not lint */ #include @@ -189,10 +189,10 @@ main(argc, argv) if (ruid) { #ifdef KERBEROS - if (!use_kerberos || kerberos(username, user, pwd->pw_uid)) + if (use_kerberos == 0 || + (use_kerberos = !kerberos(username, user, pwd->pw_uid)) == 0) #endif { - use_kerberos = 0; /* only allow those in group zero to su to root. */ if (pwd->pw_uid == 0 && (gr = getgrgid((gid_t)0)) && gr->gr_mem && *(gr->gr_mem)) -- 2.20.1