summaryrefslogtreecommitdiffstats
path: root/src/shared
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-09-01 22:19:52 +0200
committerGitHub <noreply@github.com>2020-09-01 22:19:52 +0200
commit47b04ef6327bac408ed724f4e94967ed36b72877 (patch)
tree0f0656c4252d797293b1236c06fb10d2245a81c7 /src/shared
parentMerge pull request #16911 from keszybz/userdb-json-invalid-utf8 (diff)
parentselinux: create /run/systemd/userdb directory and sockets with default SELinu... (diff)
downloadsystemd-47b04ef6327bac408ed724f4e94967ed36b72877.tar.xz
systemd-47b04ef6327bac408ed724f4e94967ed36b72877.zip
Merge pull request #16925 from cgzones/selinux_create_label
selinux/core: create several file objects with default SELinux context
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/varlink.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/shared/varlink.c b/src/shared/varlink.c
index 99ae9265f9..a84c51f2af 100644
--- a/src/shared/varlink.c
+++ b/src/shared/varlink.c
@@ -9,6 +9,7 @@
#include "io-util.h"
#include "list.h"
#include "process-util.h"
+#include "selinux-util.h"
#include "set.h"
#include "socket-util.h"
#include "string-table.h"
@@ -2249,9 +2250,11 @@ int varlink_server_listen_address(VarlinkServer *s, const char *address, mode_t
(void) sockaddr_un_unlink(&sockaddr.un);
- RUN_WITH_UMASK(~m & 0777)
- if (bind(fd, &sockaddr.sa, sockaddr_len) < 0)
- return -errno;
+ RUN_WITH_UMASK(~m & 0777) {
+ r = mac_selinux_bind(fd, &sockaddr.sa, sockaddr_len);
+ if (r < 0)
+ return r;
+ }
if (listen(fd, SOMAXCONN) < 0)
return -errno;