Make it possible to disable smack separately from xattr support
Additionally, compile out rule loading if feature is disabled.
This commit is contained in:
committed by
Auke Kok
parent
264ad849a4
commit
2b3e18de74
+2
-2
@@ -788,7 +788,7 @@ static void socket_apply_socket_options(Socket *s, int fd) {
|
||||
if (setsockopt(fd, SOL_TCP, TCP_CONGESTION, s->tcp_congestion, strlen(s->tcp_congestion)+1) < 0)
|
||||
log_warning_unit(UNIT(s)->id, "TCP_CONGESTION failed: %m");
|
||||
|
||||
#ifdef HAVE_XATTR
|
||||
#ifdef HAVE_SMACK
|
||||
if (s->smack_ip_in)
|
||||
if (fsetxattr(fd, "security.SMACK64IPIN", s->smack_ip_in, strlen(s->smack_ip_in), 0) < 0)
|
||||
log_error_unit(UNIT(s)->id,
|
||||
@@ -810,7 +810,7 @@ static void socket_apply_fifo_options(Socket *s, int fd) {
|
||||
log_warning_unit(UNIT(s)->id,
|
||||
"F_SETPIPE_SZ: %m");
|
||||
|
||||
#ifdef HAVE_XATTR
|
||||
#ifdef HAVE_SMACK
|
||||
if (s->smack)
|
||||
if (fsetxattr(fd, "security.SMACK64", s->smack, strlen(s->smack), 0) < 0)
|
||||
log_error_unit(UNIT(s)->id,
|
||||
|
||||
Reference in New Issue
Block a user