diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-10-08 18:36:57 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-10-08 18:36:57 +0000 |
commit | 918a079dcbd7c72522df052a1a08f6ecd75d9a24 (patch) | |
tree | 06d1a1c0ef22824b3c5f9043fdf4445116fa46a5 /usr.bin | |
parent | a6ddf763044ea546817a218979561f97c719d5e4 (diff) |
export $TERM only if passed in; joerg@freebsd.org
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/su/su.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/su/su.c b/usr.bin/su/su.c index 59321be1cce..6c23ab545f6 100644 --- a/usr.bin/su/su.c +++ b/usr.bin/su/su.c @@ -1,4 +1,4 @@ -/* $OpenBSD: su.c,v 1.5 1996/07/22 01:58:55 deraadt Exp $ */ +/* $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,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.5 1996/07/22 01:58:55 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: su.c,v 1.6 1996/10/08 18:36:56 deraadt Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -241,7 +241,8 @@ badlogin: cleanenv[0] = NULL; environ = cleanenv; (void)setenv("PATH", _PATH_DEFPATH, 1); - (void)setenv("TERM", p, 1); + if (p) + (void)setenv("TERM", p, 1); seteuid(pwd->pw_uid); setegid(pwd->pw_gid); |