*/
if (chdir (info->pw_dir) == -1) {
- static char temp_pw_dir[] = "/";
-
if (!getdef_bool ("DEFAULT_HOME") || chdir ("/") == -1) {
fprintf (log_get_logfd(), _("Unable to cd to '%s'\n"),
info->pw_dir);
}
(void) puts (_("No directory, logging in with HOME=/"));
free (info->pw_dir);
- info->pw_dir = xstrdup (temp_pw_dir);
+ info->pw_dir = xstrdup ("/");
}
/*
*/
if ((NULL == info->pw_shell) || ('\0' == *info->pw_shell)) {
- static char temp_pw_shell[] = SHELL;
-
free (info->pw_shell);
- info->pw_shell = xstrdup (temp_pw_shell);
+ info->pw_shell = xstrdup (SHELL);
}
addenv ("SHELL", info->pw_shell);
*/
const char *Prog;
-static char name[BUFSIZ];
static char pass[BUFSIZ];
static struct passwd pwent;
}
#endif /* !USE_PAM */
- (void) strcpy (name, "root"); /* KLUDGE!!! */
-
(void) signal (SIGALRM, catch_signals); /* exit if the timer expires */
(void) alarm (ALARM); /* only wait so long ... */
while (true) { /* repeatedly get login/password pairs */
char *cp;
- pw_entry (name, &pwent); /* get entry from password file */
+ pw_entry ("root", &pwent); /* get entry from password file */
if (pwent.pw_name == NULL) {
/*
* Fail secure