Fix daemon startup bug from 0.99-2
This commit is contained in:
parent
70aaeb7aa3
commit
0d40135ec1
38
0005-Fix-check-for-allocations-on-tokenname-certname.patch
Normal file
38
0005-Fix-check-for-allocations-on-tokenname-certname.patch
Normal file
@ -0,0 +1,38 @@
|
||||
From 844138e07535a8aa2be80496378c9929acaa1687 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@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@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
|
||||
|
@ -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@redhat.com> - 0.99-3
|
||||
- Fix daemon startup bug from 0.99-2
|
||||
|
||||
* Wed Oct 17 2012 Peter Jones <pjones@redhat.com> - 0.99-2
|
||||
- Fix various bugs from 0.99-1
|
||||
- Don't make the database unreadable just yet.
|
||||
|
Loading…
Reference in New Issue
Block a user