From: bubulle Date: Sun, 28 Jul 2013 12:16:09 +0000 (+0200) Subject: if using the static char* for pw_dir, strdup it so pw_free() can be used. (Closes... X-Git-Tag: 4.2.1~92 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=945eb8f50b1b6609c4478b13c759703c4fbfa861;p=shadow if using the static char* for pw_dir, strdup it so pw_free() can be used. (Closes: Debian#691459) --- diff --git a/ChangeLog b/ChangeLog index 94efb8fb..2ad5dffc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,8 @@ 2012-05-20 Christian Perrier * configure.in: Prepare for next point release 4.2. + * if using the static char* for pw_dir, strdup it so + pw_free() can be used. (Closes: Debian#691459) 2012-05-25 Nicolas François diff --git a/libmisc/setupenv.c b/libmisc/setupenv.c index 74170e81..992d3b81 100644 --- a/libmisc/setupenv.c +++ b/libmisc/setupenv.c @@ -228,7 +228,7 @@ void setup_env (struct passwd *info) exit (EXIT_FAILURE); } (void) puts (_("No directory, logging in with HOME=/")); - info->pw_dir = temp_pw_dir; + info->pw_dir = strdup(temp_pw_dir); } /*