version 1.33, 2000/08/20 18:42:41 |
version 1.34, 2000/09/15 07:13:50 |
|
|
errx(1, "calloc"); |
errx(1, "calloc"); |
if (setusercontext(lc, pwd, pwd->pw_uid, LOGIN_SETPATH)) |
if (setusercontext(lc, pwd, pwd->pw_uid, LOGIN_SETPATH)) |
err(1, "unable to set user context"); |
err(1, "unable to set user context"); |
if (p) |
if (p) { |
(void)setenv("TERM", p, 1); |
if (setenv("TERM", p, 1) == -1) |
|
err(1, "unable to set environment"); |
|
} |
|
|
seteuid(pwd->pw_uid); |
seteuid(pwd->pw_uid); |
setegid(pwd->pw_gid); |
setegid(pwd->pw_gid); |
|
|
err(1, "unable to set user context"); |
err(1, "unable to set user context"); |
} |
} |
if (asthem || pwd->pw_uid) { |
if (asthem || pwd->pw_uid) { |
(void)setenv("LOGNAME", pwd->pw_name, 1); |
if (setenv("LOGNAME", pwd->pw_name, 1) == -1 || |
(void)setenv("USER", pwd->pw_name, 1); |
setenv("USER", pwd->pw_name, 1) == -1) |
|
err(1, "unable to set environment"); |
} |
} |
(void)setenv("HOME", pwd->pw_dir, 1); |
if (setenv("HOME", pwd->pw_dir, 1) == -1 || |
(void)setenv("SHELL", shell, 1); |
setenv("SHELL", shell, 1) == -1) |
|
err(1, "unable to set environment"); |
} |
} |
|
|
#ifdef KERBEROS |
#ifdef KERBEROS |
if (*krbtkfile) |
if (*krbtkfile) { |
(void)setenv("KRBTKFILE", krbtkfile, 1); |
if (setenv("KRBTKFILE", krbtkfile, 1) == -1) |
|
err(1, "unable to set environment"); |
|
} |
#endif |
#endif |
|
|
if (iscsh == YES) { |
if (iscsh == YES) { |