Imported Upstream version 4.2
This commit is contained in:
+5
-3
@@ -36,7 +36,7 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#ident "$Id: setupenv.c 3232 2010-08-22 19:13:53Z nekral-guest $"
|
||||
#ident "$Id$"
|
||||
|
||||
#include <assert.h>
|
||||
#include <sys/types.h>
|
||||
@@ -228,7 +228,8 @@ void setup_env (struct passwd *info)
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
(void) puts (_("No directory, logging in with HOME=/"));
|
||||
info->pw_dir = temp_pw_dir;
|
||||
free (info->pw_dir);
|
||||
info->pw_dir = xstrdup (temp_pw_dir);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -244,7 +245,8 @@ void setup_env (struct passwd *info)
|
||||
if ((NULL == info->pw_shell) || ('\0' == *info->pw_shell)) {
|
||||
static char temp_pw_shell[] = SHELL;
|
||||
|
||||
info->pw_shell = temp_pw_shell;
|
||||
free (info->pw_shell);
|
||||
info->pw_shell = xstrdup (temp_pw_shell);
|
||||
}
|
||||
|
||||
addenv ("SHELL", info->pw_shell);
|
||||
|
||||
Reference in New Issue
Block a user