=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/su/su.c,v retrieving revision 1.24 retrieving revision 1.25 diff -c -r1.24 -r1.25 *** src/usr.bin/su/su.c 1997/06/20 22:09:53 1.24 --- src/usr.bin/su/su.c 1997/06/21 12:18:05 1.25 *************** *** 1,4 **** ! /* $OpenBSD: su.c,v 1.24 1997/06/20 22:09:53 deraadt Exp $ */ /* * Copyright (c) 1988 The Regents of the University of California. --- 1,4 ---- ! /* $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,47 **** #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 $"; #endif /* not lint */ #include --- 41,47 ---- #ifndef lint /*static char sccsid[] = "from: @(#)su.c 5.26 (Berkeley) 7/6/91";*/ ! static char rcsid[] = "$OpenBSD: su.c,v 1.25 1997/06/21 12:18:05 deraadt Exp $"; #endif /* not lint */ #include *************** *** 71,76 **** --- 71,77 ---- #define ARGSTR "-Kflm" int use_kerberos = 1; + int got_ticket; #else #define ARGSTR "-flm" #endif *************** *** 246,252 **** if (p) (void)setenv("TERM", p, 1); #ifdef KERBEROS ! if (k) (void)setenv("KRBTKFILE", k, 1); #endif --- 247,253 ---- if (p) (void)setenv("TERM", p, 1); #ifdef KERBEROS ! if (k && got_ticket) (void)setenv("KRBTKFILE", k, 1); #endif *************** *** 434,439 **** --- 435,441 ---- return (1); } } + got_ticket = 1; return (0); }