apparmor: add #ifdef checks for secmark filtering
The newly added code fails to build when either SECMARK or NETFILTER are disabled: security/apparmor/lsm.c: In function 'apparmor_socket_sock_rcv_skb': security/apparmor/lsm.c:1138:12: error: 'struct sk_buff' has no member named 'secmark'; did you mean 'mark'? security/apparmor/lsm.c:1671:21: error: 'struct nf_hook_state' declared inside parameter list will not be visible outside of this definition or declaration [-Werror] Add a set of #ifdef checks around it to only enable the code that we can compile and that makes sense in that configuration. Fixes: ab9f2115 ("apparmor: Allow filtering based on secmark policy") Signed-off-by: NArnd Bergmann <arnd@arndb.de> Signed-off-by: NJohn Johansen <john.johansen@canonical.com>
Showing
想要评论请 注册 或 登录