summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/jail/command.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/jail/command.c b/usr.sbin/jail/command.c
index cbc7b88..b749576 100644
--- a/usr.sbin/jail/command.c
+++ b/usr.sbin/jail/command.c
@@ -584,7 +584,8 @@ run_command(struct cfjail *j)
term = getenv("TERM");
environ = &cleanenv;
setenv("PATH", "/bin:/usr/bin", 0);
- setenv("TERM", term, 1);
+ if (term != NULL)
+ setenv("TERM", term, 1);
}
if (setusercontext(lcap, pwd, pwd->pw_uid, username
? LOGIN_SETALL & ~LOGIN_SETGROUP & ~LOGIN_SETLOGIN
OpenPOWER on IntegriCloud