summaryrefslogtreecommitdiff
path: root/src/core/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/socket.c')
-rw-r--r--src/core/socket.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/socket.c b/src/core/socket.c
index 6c0ac1a898..345601f0ae 100644
--- a/src/core/socket.c
+++ b/src/core/socket.c
@@ -775,12 +775,12 @@ static void socket_apply_socket_options(Socket *s, int fd) {
}
#ifdef HAVE_SMACK
- if (s->smack_ip_in)
+ if (s->smack_ip_in && use_smack())
if (fsetxattr(fd, "security.SMACK64IPIN", s->smack_ip_in, strlen(s->smack_ip_in), 0) < 0)
log_error_unit(UNIT(s)->id,
"fsetxattr(\"security.SMACK64IPIN\"): %m");
- if (s->smack_ip_out)
+ if (s->smack_ip_out && use_smack())
if (fsetxattr(fd, "security.SMACK64IPOUT", s->smack_ip_out, strlen(s->smack_ip_out), 0) < 0)
log_error_unit(UNIT(s)->id,
"fsetxattr(\"security.SMACK64IPOUT\"): %m");
@@ -797,7 +797,7 @@ static void socket_apply_fifo_options(Socket *s, int fd) {
"F_SETPIPE_SZ: %m");
#ifdef HAVE_SMACK
- if (s->smack)
+ if (s->smack && use_smack())
if (fsetxattr(fd, "security.SMACK64", s->smack, strlen(s->smack), 0) < 0)
log_error_unit(UNIT(s)->id,
"fsetxattr(\"security.SMACK64\"): %m");