[pesign/f18] Fix daemon startup bug from 0.99-2
Peter Jones
pjones at fedoraproject.org
Wed Oct 17 14:37:54 UTC 2012
commit 0d40135ec1ef8d0517b031f9d937bf1c3c385c36
Author: Peter Jones <pjones at redhat.com>
Date: Wed Oct 17 10:37:36 2012 -0400
Fix daemon startup bug from 0.99-2
...eck-for-allocations-on-tokenname-certname.patch | 38 ++++++++++++++++++++
pesign.spec | 6 +++-
2 files changed, 43 insertions(+), 1 deletions(-)
---
diff --git a/0005-Fix-check-for-allocations-on-tokenname-certname.patch b/0005-Fix-check-for-allocations-on-tokenname-certname.patch
new file mode 100644
index 0000000..c762b4a
--- /dev/null
+++ b/0005-Fix-check-for-allocations-on-tokenname-certname.patch
@@ -0,0 +1,38 @@
+From 844138e07535a8aa2be80496378c9929acaa1687 Mon Sep 17 00:00:00 2001
+From: Peter Jones <pjones at redhat.com>
+Date: Wed, 17 Oct 2012 10:35:41 -0400
+Subject: [PATCH 5/5] Fix check for allocations on tokenname,certname.
+
+If we didn't have anything to start with, we won't have anything when
+we're done...
+
+Signed-off-by: Peter Jones <pjones at redhat.com>
+---
+ src/pesign.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/pesign.c b/src/pesign.c
+index 4ddf636..c7b23cf 100644
+--- a/src/pesign.c
++++ b/src/pesign.c
+@@ -553,7 +553,7 @@ main(int argc, char *argv[])
+
+ ctx.cms_ctx->tokenname = tokenname ?
+ PORT_ArenaStrdup(ctx.cms_ctx->arena, tokenname) : NULL;
+- if (!ctx.cms_ctx->tokenname) {
++ if (tokenname && !ctx.cms_ctx->tokenname) {
+ fprintf(stderr, "could not allocate token name: %s\n",
+ PORT_ErrorToString(PORT_GetError()));
+ exit(1);
+@@ -561,7 +561,7 @@ main(int argc, char *argv[])
+
+ ctx.cms_ctx->certname = certname ?
+ PORT_ArenaStrdup(ctx.cms_ctx->arena, certname) : NULL;
+- if (!ctx.cms_ctx->certname) {
++ if (certname && !ctx.cms_ctx->certname) {
+ fprintf(stderr, "could not allocate certificate name: %s\n",
+ PORT_ErrorToString(PORT_GetError()));
+ exit(1);
+--
+1.7.12.1
+
diff --git a/pesign.spec b/pesign.spec
index a4f10f7..629ae07 100644
--- a/pesign.spec
+++ b/pesign.spec
@@ -1,7 +1,7 @@
Summary: Signing utility for UEFI binaries
Name: pesign
Version: 0.99
-Release: 2%{?dist}
+Release: 3%{?dist}
Group: Development/System
License: GPLv2
URL: https://github.com/vathpela/pesign
@@ -21,6 +21,7 @@ Patch0: 0001-Use-PK11_TraverseCertsForNicknameInSlot-after-all.patch
Patch1: 0002-Remove-an-unused-field.patch
Patch2: 0003-Free-the-certificate-list-we-make-once-we-re-done-us.patch
Patch3: 0004-Make-sure-we-actually-look-up-the-certificate-when-n.patch
+Patch4: 0005-Fix-check-for-allocations-on-tokenname-certname.patch
%description
This package contains the pesign utility for signing UEFI binaries as
@@ -84,6 +85,9 @@ exit 0
%ghost %attr(0660, -, -) %{_localstatedir}/run/%{name}/pesign.pid
%changelog
+* Wed Oct 17 2012 Peter Jones <pjones at redhat.com> - 0.99-3
+- Fix daemon startup bug from 0.99-2
+
* Wed Oct 17 2012 Peter Jones <pjones at redhat.com> - 0.99-2
- Fix various bugs from 0.99-1
- Don't make the database unreadable just yet.
More information about the scm-commits
mailing list