I have prepared and tested a package that fixes this bug.  I intend to
upload it as an NMU, uploading it to the 7-DAY delayed queue.

The package applies Dann's patch and also stores it in the patches-applied
dir.  The patch is pretty harmless and does prevent the program from
segfaulting.  I don't expect any side-effects.

I'm attaching the full interdiff output of the package I have prepared.
Hope you find it good and clear.

-- 
Love,
        Marga.
diff -u pam-0.79/Linux-PAM/modules/pam_unix/pam_unix_passwd.c 
pam-0.79/Linux-PAM/modules/pam_unix/pam_unix_passwd.c
--- pam-0.79/Linux-PAM/modules/pam_unix/pam_unix_passwd.c
+++ pam-0.79/Linux-PAM/modules/pam_unix/pam_unix_passwd.c
@@ -1121,7 +1121,7 @@
                         * password is acceptable.
                         */
 
-                       if (pass_new[0] == '\0') {      /* "\0" password = NULL 
*/
+                       if (pass_new && pass_new[0] == '\0') {  /* "\0" 
password = NULL */
                                pass_new = NULL;
                        }
                        retval = _pam_unix_approve_pass(pamh, ctrl, pass_old, 
pass_new);
diff -u pam-0.79/debian/changelog pam-0.79/debian/changelog
--- pam-0.79/debian/changelog
+++ pam-0.79/debian/changelog
@@ -1,3 +1,11 @@
+pam (0.79-3.2) unstable; urgency=low
+
+  * Non-maintainer upload to fix important bug, that makes passwd segfault
+    when CTRL-D is pressed at the password prompt.  Applied the patch provided
+    by Dann Frazier.  (Closes: #360657)
+
+ -- Margarita Manterola <[EMAIL PROTECTED]>  Sat,  5 Aug 2006 02:11:22 -0300
+
 pam (0.79-3.1) unstable; urgency=low
 
   * Non-maintainer upload.
only in patch2:
unchanged:
--- pam-0.79.orig/debian/patches-applied/060_passwd_segv
+++ pam-0.79/debian/patches-applied/060_passwd_segv
@@ -0,0 +1,11 @@
+--- pam-0.79/Linux-PAM/modules/pam_unix/pam_unix_passwd.c      2006-08-05 
02:08:38.481324822 -0300
++++ pam-0.79/Linux-PAM/modules/pam_unix/pam_unix_passwd.new.c  2006-08-05 
02:07:24.759924439 -0300
+@@ -1121,7 +1121,7 @@
+                        * password is acceptable.
+                        */
+ 
+-                      if (pass_new[0] == '\0') {      /* "\0" password = NULL 
*/
++                      if (pass_new && pass_new[0] == '\0') {  /* "\0" 
password = NULL */
+                               pass_new = NULL;
+                       }
+                       retval = _pam_unix_approve_pass(pamh, ctrl, pass_old, 
pass_new);

Reply via email to