dryang / rpms / systemd

Forked from rpms/systemd a year ago
Clone
923a60
From a8ad87112c0992579fcf4fc91234490ec82ce939 Mon Sep 17 00:00:00 2001
923a60
From: Davide Bettio <davide.bettio@ispirata.com>
923a60
Date: Fri, 15 May 2015 16:36:28 +0200
923a60
Subject: [PATCH] core: don't consider umask for SocketMode=
923a60
923a60
https://bugs.freedesktop.org/show_bug.cgi?id=89248
923a60
(cherry picked from commit a2c7f25aec23b6d74ff5cf169e38159754e6dfe8)
923a60
923a60
Cherry-picked from: a2c7f25
923a60
Resolves: #1222517
923a60
---
923a60
 src/shared/socket-label.c | 3 ---
923a60
 1 file changed, 3 deletions(-)
923a60
923a60
diff --git a/src/shared/socket-label.c b/src/shared/socket-label.c
923a60
index 6806c51158..a6289eb50f 100644
923a60
--- a/src/shared/socket-label.c
923a60
+++ b/src/shared/socket-label.c
923a60
@@ -117,9 +117,6 @@ int socket_address_listen(
923a60
                 /* Enforce the right access mode for the socket */
923a60
                 old_mask = umask(~ socket_mode);
923a60
 
923a60
-                /* Include the original umask in our mask */
923a60
-                umask(~socket_mode | old_mask);
923a60
-
923a60
                 r = mac_selinux_bind(fd, &a->sockaddr.sa, a->size);
923a60
 
923a60
                 if (r < 0 && errno == EADDRINUSE) {