valeriyvdovin / rpms / systemd

Forked from rpms/systemd 4 years ago
Clone

Blame SOURCES/0203-core-don-t-consider-umask-for-SocketMode.patch

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