diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1997-02-11 18:26:33 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1997-02-11 18:26:33 +0000 |
commit | e7ea9f89e1fa0f5db283f0dcf93d872ab91bb0da (patch) | |
tree | 83467a28368255c0439bd45db840177ebd5d1c25 /usr.bin/su/su.c | |
parent | 6ee26328dee04211634eae96cbf91612df4884ee (diff) |
Fix for non-kerberos.
Diffstat (limited to 'usr.bin/su/su.c')
-rw-r--r-- | usr.bin/su/su.c | 8 |
1 files 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 <sys/param.h> @@ -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)) |