diff options
| author | Andreas Schulz <ats@FreeBSD.org> | 1994-11-17 16:56:58 +0000 |
|---|---|---|
| committer | Andreas Schulz <ats@FreeBSD.org> | 1994-11-17 16:56:58 +0000 |
| commit | 0b293ea528b4c6671e95eb8875a77b9c98dc8911 (patch) | |
| tree | d70a6c0acf74d5a5b47d1cd2e365da4505890a5d | |
| parent | 886f34fde6a02a67900e91666624c0c48cf81ebc (diff) | |
Notes
| -rw-r--r-- | usr.bin/su/su.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/su/su.c b/usr.bin/su/su.c index 244a6954c582..95d54eccdcd2 100644 --- a/usr.bin/su/su.c +++ b/usr.bin/su/su.c @@ -82,7 +82,7 @@ main(argc, argv) { extern char **environ; struct passwd *pwd; - char *p, **g, *user, *shell, *username, *cleanenv[2], *nargv[4], **np; + char *p, **g, *user, *shell, *username, *cleanenv[20], *nargv[4], **np; struct group *gr; uid_t ruid; int asme, ch, asthem, fastlogin, prio; @@ -219,9 +219,9 @@ main(argc, argv) if (!asme) { if (asthem) { p = getenv("TERM"); - cleanenv[0] = _PATH_DEFPATH; - cleanenv[1] = NULL; + cleanenv[0] = NULL; environ = cleanenv; + (void)setenv("PATH", _PATH_DEFPATH, 1); (void)setenv("TERM", p, 1); if (chdir(pwd->pw_dir) < 0) errx(1, "no directory"); |
