ryantimwilson / rpms / systemd

Forked from rpms/systemd a month ago
Clone
Blob Blame History Raw
From 7ff3bb4e47fe287997ba24a3b3ae719bd9043d74 Mon Sep 17 00:00:00 2001
From: Daniel Mack <daniel@zonque.org>
Date: Thu, 9 Oct 2014 15:40:17 +0200
Subject: [PATCH] bus-proxy: allow getpeersec() to fail

getpeersec() will fail for non-SELinux enabled machines, so don't make that
a hard error.
---
 src/bus-proxyd/bus-proxyd.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/src/bus-proxyd/bus-proxyd.c b/src/bus-proxyd/bus-proxyd.c
index ce571fa753..4f44825679 100644
--- a/src/bus-proxyd/bus-proxyd.c
+++ b/src/bus-proxyd/bus-proxyd.c
@@ -1152,11 +1152,7 @@ int main(int argc, char *argv[]) {
                         goto finish;
                 }
 
-                r = getpeersec(in_fd, &peersec);
-                if (r < 0) {
-                        log_error("Failed to get security creds: %s", strerror(-r));
-                        goto finish;
-                }
+                (void) getpeersec(in_fd, &peersec);
         }
 
         if (arg_drop_privileges) {