ryantimwilson / rpms / systemd

Forked from rpms/systemd 2 months ago
Clone
Blob Blame History Raw
From a8ad87112c0992579fcf4fc91234490ec82ce939 Mon Sep 17 00:00:00 2001
From: Davide Bettio <davide.bettio@ispirata.com>
Date: Fri, 15 May 2015 16:36:28 +0200
Subject: [PATCH] core: don't consider umask for SocketMode=

https://bugs.freedesktop.org/show_bug.cgi?id=89248
(cherry picked from commit a2c7f25aec23b6d74ff5cf169e38159754e6dfe8)

Cherry-picked from: a2c7f25
Resolves: #1222517
---
 src/shared/socket-label.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/shared/socket-label.c b/src/shared/socket-label.c
index 6806c51..a6289eb 100644
--- a/src/shared/socket-label.c
+++ b/src/shared/socket-label.c
@@ -117,9 +117,6 @@ int socket_address_listen(
                 /* Enforce the right access mode for the socket */
                 old_mask = umask(~ socket_mode);
 
-                /* Include the original umask in our mask */
-                umask(~socket_mode | old_mask);
-
                 r = mac_selinux_bind(fd, &a->sockaddr.sa, a->size);
 
                 if (r < 0 && errno == EADDRINUSE) {