Imported Upstream version 4.2

This commit is contained in:
Christian Perrier
2014-03-01 19:59:36 +01:00
parent db1dc7288b
commit 65b471a2f2
706 changed files with 46966 additions and 139295 deletions
+5 -3
View File
@@ -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);