[Pkg-shadow-devel] Bug#691459: proposed (trivial) patch
Serge Hallyn
serge.hallyn at ubuntu.com
Tue Mar 5 18:17:10 UTC 2013
Hi Philipp,
thanks for the bug report. Your proposal makes sense, here is a debdiff
(against the ubuntu package, but the source file should be identical)
which fixes it for me. Does it work for you?
diff -u shadow-4.1.5.1/debian/changelog shadow-4.1.5.1/debian/changelog
--- shadow-4.1.5.1/debian/changelog
+++ shadow-4.1.5.1/debian/changelog
@@ -1,3 +1,10 @@
+shadow (1:4.1.5.1-1ubuntu4~userns2pwdir1) raring; urgency=low
+
+ * strdup_static_pwdir: if using the static char* for pw_dir, strdup it so
+ pw_free() can be used. (Closes: #691459)
+
+ -- Serge Hallyn <serge.hallyn at ubuntu.com> Tue, 05 Mar 2013 12:04:21 -0600
+
shadow (1:4.1.5.1-1ubuntu4~userns2) raring; urgency=low
* userns/12_userns_selinuxlibs: fix FTBFS (provided debian/rules actually
diff -u shadow-4.1.5.1/debian/patches/series shadow-4.1.5.1/debian/patches/series
--- shadow-4.1.5.1/debian/patches/series
+++ shadow-4.1.5.1/debian/patches/series
@@ -33,0 +34,2 @@
+
+strdup_static_pwdir
only in patch2:
unchanged:
--- shadow-4.1.5.1.orig/debian/patches/strdup_static_pwdir
+++ shadow-4.1.5.1/debian/patches/strdup_static_pwdir
@@ -0,0 +1,17 @@
+Description: strdup the static char* temp_pw_dir
+ That way we can continue to use pw_free() without segving.
+Bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=691459
+
+Index: shadow-4.1.5.1/libmisc/setupenv.c
+===================================================================
+--- shadow-4.1.5.1.orig/libmisc/setupenv.c 2013-03-05 12:01:35.126218100 -0600
++++ shadow-4.1.5.1/libmisc/setupenv.c 2013-03-05 12:02:31.334217148 -0600
+@@ -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);
+ }
+
+ /*
More information about the Pkg-shadow-devel
mailing list