Fix a networking problem nirik observed when reinstalling builders.

This commit is contained in:
Peter Jones 2014-05-29 16:16:37 -04:00
parent e83259c5ef
commit c88197ace8
2 changed files with 49 additions and 2 deletions

View File

@ -0,0 +1,43 @@
From c877f0187d337374960f02046800a313d2326848 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Thu, 29 May 2014 16:10:05 -0400
Subject: [PATCH] Don't set SO_PASSCRED.
It would appear that on recent kernels, setting SO_PASSCRED means you
always get SCM_CREDENTIALS control messages back instead of what
sendmsg() sent you, and SCM_RIGHTS works just fine without it.
Signed-off-by: Peter Jones <pjones@redhat.com>
---
src/daemon.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/src/daemon.c b/src/daemon.c
index 55c08c3..af3a2b6 100644
--- a/src/daemon.c
+++ b/src/daemon.c
@@ -744,20 +744,12 @@ set_up_socket(context *ctx)
exit(1);
}
- int one = 1;
- int rc = setsockopt(sd, SOL_SOCKET, SO_PASSCRED, &one, sizeof(one));
- if (rc < 0) {
- ctx->backup_cms->log(ctx->backup_cms, ctx->priority|LOG_ERR,
- "unable to set socket options: %m");
- exit(1);
- }
-
struct sockaddr_un addr_un = {
.sun_family = AF_UNIX,
.sun_path = SOCKPATH,
};
- rc = bind(sd, &addr_un, sizeof(addr_un));
+ int rc = bind(sd, &addr_un, sizeof(addr_un));
if (rc < 0) {
ctx->backup_cms->log(ctx->backup_cms, ctx->priority|LOG_ERR,
"unable to bind to \"%s\": %m",
--
1.9.0

View File

@ -1,11 +1,11 @@
Summary: Signing utility for UEFI binaries
Name: pesign
Version: 0.108
Release: 1%{?dist}
Release: 2%{?dist}
Group: Development/System
License: GPLv2
URL: https://github.com/vathpela/pesign
BuildRequires: git gnu-efi nspr nss nss-util popt-devel
BuildRequires: git nspr nss nss-util popt-devel
BuildRequires: coolkey opensc nss-tools
BuildRequires: nspr-devel >= 4.9.2-1
BuildRequires: nss-devel >= 3.13.6-1
@ -21,6 +21,7 @@ BuildRequires: rh-signing-tools >= 1.20-2
# git checkout %%{version}
Source0: pesign-%{version}.tar.bz2
Source1: rh-test-certs.tar.bz2
Patch0001: 0001-Don-t-set-SO_PASSCRED.patch
%description
This package contains the pesign utility for signing UEFI binaries as
@ -99,6 +100,9 @@ exit 0
%endif
%changelog
* Thu May 29 2014 Peter Jones <pjones@redhat.com> - 0.108-2
- Fix a networking problem nirik observed when reinstalling builders.
* Sat Aug 10 2013 Peter Jones <pjones@redhat.com> - 0.108-1
- Remove errant result files and raise an error from %%pesign