version 1.8, 1999/09/29 22:08:13 |
version 1.9, 1999/09/30 04:10:29 |
|
|
int deny_severity = LOG_WARNING; |
int deny_severity = LOG_WARNING; |
#endif /* LIBWRAP */ |
#endif /* LIBWRAP */ |
|
|
#ifdef _PATH_BSHELL |
|
#define DEFAULT_SHELL _PATH_BSHELL |
|
#else |
|
#define DEFAULT_SHELL "/bin/sh" |
|
#endif |
|
|
|
#ifndef DEFAULT_PATH |
|
#ifdef _PATH_USERPATH |
|
#define DEFAULT_PATH _PATH_USERPATH |
|
#else |
|
#define DEFAULT_PATH "/bin:/usr/bin:/usr/ucb:/usr/bin/X11:/usr/local/bin" |
|
#endif |
|
#endif /* DEFAULT_PATH */ |
|
|
|
#ifndef O_NOCTTY |
#ifndef O_NOCTTY |
#define O_NOCTTY 0 |
#define O_NOCTTY 0 |
#endif |
#endif |
|
|
if (def != NULL) |
if (def != NULL) |
child_set_env(env, envsize, "PATH", def); |
child_set_env(env, envsize, "PATH", def); |
else |
else |
child_set_env(env, envsize, "PATH", DEFAULT_PATH); |
child_set_env(env, envsize, "PATH", _PATH_STDPATH); |
|
|
/* Set TZ if TIMEZONE is defined and we haven't inherited a value |
/* Set TZ if TIMEZONE is defined and we haven't inherited a value |
for TZ. */ |
for TZ. */ |
|
|
|
|
/* Get the shell from the password data. An empty shell field is legal, |
/* Get the shell from the password data. An empty shell field is legal, |
and means /bin/sh. */ |
and means /bin/sh. */ |
shell = (pw->pw_shell[0] == '\0') ? DEFAULT_SHELL : pw->pw_shell; |
shell = (pw->pw_shell[0] == '\0') ? _PATH_BSHELL : pw->pw_shell; |
|
|
#ifdef AFS |
#ifdef AFS |
/* Try to get AFS tokens for the local cell. */ |
/* Try to get AFS tokens for the local cell. */ |
|
|
child_set_env(&env, &envsize, "USER", pw->pw_name); |
child_set_env(&env, &envsize, "USER", pw->pw_name); |
child_set_env(&env, &envsize, "LOGNAME", pw->pw_name); |
child_set_env(&env, &envsize, "LOGNAME", pw->pw_name); |
child_set_env(&env, &envsize, "HOME", pw->pw_dir); |
child_set_env(&env, &envsize, "HOME", pw->pw_dir); |
child_set_env(&env, &envsize, "PATH", DEFAULT_PATH); |
child_set_env(&env, &envsize, "PATH", _PATH_STDPATH); |
|
|
/* Let it inherit timezone if we have one. */ |
/* Let it inherit timezone if we have one. */ |
if (getenv("TZ")) |
if (getenv("TZ")) |