Hi Brian,
due to lack of response and since we'd want to release lenny with
working pkinit I've prepared an NMU and uploaded to delayed 3-days (so
plenty of time to cancel it). Attached is the NMUdiff.
Hope that's o.k.,
 -- Guido
diff --git a/debian/changelog b/debian/changelog
index 3c59b7f..423c9bd 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+heimdal (1.2.dfsg.1-2.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * fix segfaults when using pkinit with wrong PIN. Closes: #499405
+
+ -- Guido Günther <[EMAIL PROTECTED]>  Sun, 05 Oct 2008 15:12:05 +0200
+
 heimdal (1.2.dfsg.1-2) unstable; urgency=low
 
   * Fix library version symbols. Again. Closes: #492427.
diff --git a/debian/patches/040_pkinit b/debian/patches/040_pkinit
new file mode 100644
index 0000000..f82af2c
--- /dev/null
+++ b/debian/patches/040_pkinit
@@ -0,0 +1,47 @@
+From 483babe37d5f85175260d21d8b603ae439f0fcec Mon Sep 17 00:00:00 2001
+From: =?utf-8?q?Guido=20G=C3=BCnther?= <[EMAIL PROTECTED]>
+Date: Sun, 5 Oct 2008 15:06:00 +0200
+Subject: [PATCH] fix segfaults when using pkinit with wrong PIN
+
+upstream SVN revisions 23858, 23859
+Closes: #499405
+---
+ lib/hx509/ks_p11.c |    8 +++-----
+ 1 files changed, 3 insertions(+), 5 deletions(-)
+
+diff --git a/lib/hx509/ks_p11.c b/lib/hx509/ks_p11.c
+index bf46e66..659432d 100644
+--- a/lib/hx509/ks_p11.c
++++ b/lib/hx509/ks_p11.c
+@@ -419,8 +419,6 @@ p11_get_session(hx509_context context,
+ 	char pin[20];
+ 	char *str;
+ 
+-	slot->flags |= P11_LOGIN_DONE;
+-
+ 	if (slot->pin == NULL) {
+ 
+ 	    memset(&prompt, 0, sizeof(prompt));
+@@ -454,16 +452,16 @@ p11_get_session(hx509_context context,
+ 				       "Failed to login on slot id %d "
+ 				       "with error: 0x%08x",
+ 				       (int)slot->id, ret);
+-	    p11_put_session(p, slot, slot->session);
+ 	    return HX509_PKCS11_LOGIN;
+-	}
++	} else
++	    slot->flags |= P11_LOGIN_DONE;
++
+ 	if (slot->pin == NULL) {
+ 	    slot->pin = strdup(pin);
+ 	    if (slot->pin == NULL) {
+ 		if (context)
+ 		    hx509_set_error_string(context, 0, ENOMEM,
+ 					   "out of memory");
+-		p11_put_session(p, slot, slot->session);
+ 		return ENOMEM;
+ 	    }
+ 	}
+-- 
+1.6.0.1
+
diff --git a/debian/patches/series b/debian/patches/series
index 3f826e3..ee94d0d 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -10,3 +10,4 @@
 026_posix_max
 027_rsh_use_ktelnet
 030_autotools
+040_pkinit

Reply via email to