diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-06-21 12:18:06 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-06-21 12:18:06 +0000 |
commit | b89659ee2c46970b479136c872ee36aacf6a2141 (patch) | |
tree | 98c11b03afbd77d4761ed74d13ed7caef7d0eaad /usr.bin | |
parent | 00446d69cd1e2d53364e1e30a5bf6de082d5db90 (diff) |
push KRBTKFILE only if new ticket; dm@openbsd.org and traister@gate.net
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/su/su.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/su/su.c b/usr.bin/su/su.c index da69d4c04a0..a550aec9e15 100644 --- a/usr.bin/su/su.c +++ b/usr.bin/su/su.c @@ -1,4 +1,4 @@ -/* $OpenBSD: su.c,v 1.24 1997/06/20 22:09:53 deraadt Exp $ */ +/* $OpenBSD: su.c,v 1.25 1997/06/21 12:18:05 deraadt 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.24 1997/06/20 22:09:53 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: su.c,v 1.25 1997/06/21 12:18:05 deraadt Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -71,6 +71,7 @@ static char rcsid[] = "$OpenBSD: su.c,v 1.24 1997/06/20 22:09:53 deraadt Exp $"; #define ARGSTR "-Kflm" int use_kerberos = 1; +int got_ticket; #else #define ARGSTR "-flm" #endif @@ -246,7 +247,7 @@ badlogin: if (p) (void)setenv("TERM", p, 1); #ifdef KERBEROS - if (k) + if (k && got_ticket) (void)setenv("KRBTKFILE", k, 1); #endif @@ -434,6 +435,7 @@ kerberos(username, user, uid) return (1); } } + got_ticket = 1; return (0); } |