=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/su/su.c,v retrieving revision 1.5 retrieving revision 1.6 diff -c -r1.5 -r1.6 *** src/usr.bin/su/su.c 1996/07/22 01:58:55 1.5 --- src/usr.bin/su/su.c 1996/10/08 18:36:56 1.6 *************** *** 1,4 **** ! /* $OpenBSD: su.c,v 1.5 1996/07/22 01:58:55 deraadt Exp $ */ /* * Copyright (c) 1988 The Regents of the University of California. --- 1,4 ---- ! /* $OpenBSD: su.c,v 1.6 1996/10/08 18:36:56 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.5 1996/07/22 01:58:55 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.6 1996/10/08 18:36:56 deraadt Exp $"; #endif /* not lint */ #include *************** *** 241,247 **** cleanenv[0] = NULL; environ = cleanenv; (void)setenv("PATH", _PATH_DEFPATH, 1); ! (void)setenv("TERM", p, 1); seteuid(pwd->pw_uid); setegid(pwd->pw_gid); --- 241,248 ---- cleanenv[0] = NULL; environ = cleanenv; (void)setenv("PATH", _PATH_DEFPATH, 1); ! if (p) ! (void)setenv("TERM", p, 1); seteuid(pwd->pw_uid); setegid(pwd->pw_gid);