diff options
Diffstat (limited to 'src/fseccomp/protocol.c')
-rw-r--r-- | src/fseccomp/protocol.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/fseccomp/protocol.c b/src/fseccomp/protocol.c index 57ce2f8e0..4a0fadb3c 100644 --- a/src/fseccomp/protocol.c +++ b/src/fseccomp/protocol.c | |||
@@ -60,6 +60,7 @@ static char *protocol[] = { | |||
60 | NULL | 60 | NULL |
61 | }; | 61 | }; |
62 | 62 | ||
63 | #ifdef SYS_socket | ||
63 | static struct sock_filter protocol_filter_command[] = { | 64 | static struct sock_filter protocol_filter_command[] = { |
64 | WHITELIST(AF_UNIX), | 65 | WHITELIST(AF_UNIX), |
65 | WHITELIST(AF_INET), | 66 | WHITELIST(AF_INET), |
@@ -67,6 +68,7 @@ static struct sock_filter protocol_filter_command[] = { | |||
67 | WHITELIST(AF_NETLINK), | 68 | WHITELIST(AF_NETLINK), |
68 | WHITELIST(AF_PACKET) | 69 | WHITELIST(AF_PACKET) |
69 | }; | 70 | }; |
71 | #endif | ||
70 | // Note: protocol[] and protocol_filter_command are synchronized | 72 | // Note: protocol[] and protocol_filter_command are synchronized |
71 | 73 | ||
72 | // command length | 74 | // command length |
@@ -75,6 +77,7 @@ struct sock_filter whitelist[] = { | |||
75 | }; | 77 | }; |
76 | unsigned whitelist_len = sizeof(whitelist) / sizeof(struct sock_filter); | 78 | unsigned whitelist_len = sizeof(whitelist) / sizeof(struct sock_filter); |
77 | 79 | ||
80 | #ifdef SYS_socket | ||
78 | static struct sock_filter *find_protocol_domain(const char *p) { | 81 | static struct sock_filter *find_protocol_domain(const char *p) { |
79 | int i = 0; | 82 | int i = 0; |
80 | while (protocol[i] != NULL) { | 83 | while (protocol[i] != NULL) { |
@@ -85,7 +88,7 @@ static struct sock_filter *find_protocol_domain(const char *p) { | |||
85 | 88 | ||
86 | return NULL; | 89 | return NULL; |
87 | } | 90 | } |
88 | 91 | #endif | |
89 | 92 | ||
90 | void protocol_print(void) { | 93 | void protocol_print(void) { |
91 | #ifndef SYS_socket | 94 | #ifndef SYS_socket |