]> granicus.if.org Git - shadow/commitdiff
if using the static char* for pw_dir, strdup it so pw_free() can be used. (Closes...
authorbubulle <bubulle@debian.org>
Sun, 28 Jul 2013 12:16:09 +0000 (14:16 +0200)
committerbubulle <bubulle@debian.org>
Sun, 28 Jul 2013 12:16:09 +0000 (14:16 +0200)
ChangeLog
libmisc/setupenv.c

index 94efb8fb5978ddf5e93248ff5c86c41ee85f291a..2ad5dffcd23080e3c8822dc6b896bd24feb33b01 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,8 @@
 2012-05-20  Christian Perrier  <christian@perrier.eu.org>
 
        * 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  <nicolas.francois@centraliens.net>
 
index 74170e8195de4254720ae2bb314d536fce80a60c..992d3b817a40c321df49ec2f4cc7f8bf7cd966ac 100644 (file)
@@ -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);
        }
 
        /*