diff options
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/varlink.c | 9 |
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; |