summaryrefslogtreecommitdiff
path: root/usr.bin/su
diff options
context:
space:
mode:
authorJoerg Wunsch <joerg@FreeBSD.org>1996-10-07 10:00:58 +0000
committerJoerg Wunsch <joerg@FreeBSD.org>1996-10-07 10:00:58 +0000
commit40a8a5cf5c65be5888da6c81e4f8bb5b20ceea57 (patch)
tree1829d35fb26df79d7c84f7af9436778fea0d7eb7 /usr.bin/su
parente5ef3eec570d01081d4899f8470f562039178e2b (diff)
Notes
Diffstat (limited to 'usr.bin/su')
-rw-r--r--usr.bin/su/su.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/su/su.c b/usr.bin/su/su.c
index 555f71285959..2eef445d7115 100644
--- a/usr.bin/su/su.c
+++ b/usr.bin/su/su.c
@@ -42,7 +42,7 @@ static const char copyright[] =
static char sccsid[] = "@(#)su.c 8.3 (Berkeley) 4/2/94";
*/
static const char rcsid[] =
- "$Id: su.c,v 1.12 1996/03/09 14:57:43 markm Exp $";
+ "$Id: su.c,v 1.13 1996/03/11 22:14:52 markm Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -293,7 +293,8 @@ main(argc, argv)
cleanenv[0] = NULL;
environ = cleanenv;
(void)setenv("PATH", _PATH_DEFPATH, 1);
- (void)setenv("TERM", p, 1);
+ if (p)
+ (void)setenv("TERM", p, 1);
if (chdir(pwd->pw_dir) < 0)
errx(1, "no directory");
}