version 1.22, 1997/06/20 02:12:40 |
version 1.23, 1997/06/20 21:59:17 |
|
|
uid_t ruid; |
uid_t ruid; |
int asme, ch, asthem, fastlogin, prio; |
int asme, ch, asthem, fastlogin, prio; |
enum { UNSET, YES, NO } iscsh = UNSET; |
enum { UNSET, YES, NO } iscsh = UNSET; |
char *user, *shell, *avshell, *username, **cleanenv, **np; |
char *user, *shell, *avshell, *username, *k, **np; |
char shellbuf[MAXPATHLEN], avshellbuf[MAXPATHLEN]; |
char shellbuf[MAXPATHLEN], avshellbuf[MAXPATHLEN]; |
|
|
asme = asthem = fastlogin = 0; |
asme = asthem = fastlogin = 0; |
|
|
if (!asme) { |
if (!asme) { |
if (asthem) { |
if (asthem) { |
p = getenv("TERM"); |
p = getenv("TERM"); |
if ((cleanenv = calloc(1, sizeof (char *))) == NULL) |
#ifdef KERBEROS |
|
k = getenv("KRBTKFILE"); |
|
#endif |
|
if ((environ = calloc(1, sizeof (char *))) == NULL) |
errx(1, "calloc"); |
errx(1, "calloc"); |
environ = cleanenv; |
|
(void)setenv("PATH", _PATH_DEFPATH, 1); |
(void)setenv("PATH", _PATH_DEFPATH, 1); |
if (p) |
if (p) |
(void)setenv("TERM", p, 1); |
(void)setenv("TERM", p, 1); |
|
#ifdef KERBEROS |
|
if (k) |
|
(void)setenv("KRBTKFILE", k, 1); |
|
#endif |
|
|
seteuid(pwd->pw_uid); |
seteuid(pwd->pw_uid); |
setegid(pwd->pw_gid); |
setegid(pwd->pw_gid); |