Smack: fix netfilter Makefile entry
Subsystems (2)
PATCH 1/1 Smack: fix netfilter Makefile entry
The newly added Smack support for netfilter secmark has its own Kconfig symbol, but the actual implementation is conditionally built on another symbol.
It is possible for CONFIG_NETFILTER and SECURITY_SMACK to both be enabled, but NETWORK_SECMARK to be disabled, in which case we get a build error:
../security/smack/smack_netfilter.c: In function 'smack_ipv6_output':../security/smack/smack_netfilter.c:36:6: error: 'struct sk_buff' has no member named 'secmark'
skb->secmark = skp->smk_secid;
^
../security/smack/smack_netfilter.c: In function 'smack_ipv4_output':
../security/smack/smack_netfilter.c:55:6: error: 'struct sk_buff' has no member named 'secmark'
skb->secmark = skp->smk_secid;
^This changes the Makefile to use the correct Kconfig symbol.
security/smack/Makefile +1 -1
@@ -5,4 +5,4 @@ obj-$(CONFIG_SECURITY_SMACK) := smack.o smack-y := smack_lsm.o smack_access.o smackfs.o -smack-$(CONFIG_NETFILTER) += smack_netfilter.o +smack-$(SECURITY_SMACK_NETFILTER) += smack_netfilter.o
Casey Schaufler
maintainerQuoted 3 lines · Arnd Bergmann
The newly added Smack support for netfilter secmark has its own
Kconfigsymbol, but the actual implementation is conditionally built on another symbol.
A patch for this problem, 82b0b2c2b1e64ad6c5309a9eeba806af9812666b is already available in:
git://git.gitorious.org/smack-next/kernel.git smack-for-3.20-rebased
A pull request has sent to James Morris for inclusion in the security tree.
Quoted 31 lines
It is possible for
CONFIG_NETFILTERandSECURITY_SMACKto both be enabled, butNETWORK_SECMARKto be disabled, in which case we get a build error:
../security/smack/smack_netfilter.c: In function 'smack_ipv6_output':../security/smack/smack_netfilter.c:36:6: error: 'structsk_buff' has no member named 'secmark'skb->secmark = skp->smk_secid; ^ ../security/smack/smack_netfilter.c: In function 'smack_ipv4_output': ../security/smack/smack_netfilter.c:55:6: error: 'struct sk_buff' has no member named 'secmark' skb->secmark = skp->smk_secid; ^This changes the
Makefileto use the correctKconfigsymbol.Signed-off-by Arnd Bergmann <[email protected]>Fixes 69f287ae6fc83 ("Smack: secmark support for netfilter")security/smack/Makefile +1
-1@@ -5,4 +5,4 @@ obj-$(CONFIG_SECURITY_SMACK) := smack.o smack-y := smack_lsm.o smack_access.o smackfs.o -smack-$(CONFIG_NETFILTER) += smack_netfilter.o +smack-$(SECURITY_SMACK_NETFILTER) += smack_netfilter.o
Quoted 11 lines · On Wednesday 28 January 2015 08:27:20 Casey Schaufler wrote:
Quoted 3 lines · Arnd Bergmann
The newly added Smack support for netfilter secmark has its own
Kconfigsymbol, but the actual implementation is conditionally built on another symbol.A patch for this problem,
82b0b2c2b1e64ad6c5309a9eeba806af9812666bis already available in:
git://git.gitorious.org/smack-next/kernel.gitsmack-for-3.20-rebasedA pull request has sent to James Morris for inclusion in the security tree.
Ok, thanks!
Arnd
Hello.
Quoted 27 lines · Arnd Bergmann
The newly added Smack support for netfilter secmark has its own
Kconfigsymbol, but the actual implementation is conditionally built on another symbol.It is possible for
CONFIG_NETFILTERandSECURITY_SMACKto both be enabled, butNETWORK_SECMARKto be disabled, in which case we get a build error:
../security/smack/smack_netfilter.c: In function 'smack_ipv6_output':../security/smack/smack_netfilter.c:36:6: error: 'structsk_buff' has no member named 'secmark'skb->secmark = skp->smk_secid; ^ ../security/smack/smack_netfilter.c: In function 'smack_ipv4_output': ../security/smack/smack_netfilter.c:55:6: error: 'struct sk_buff' has no member named 'secmark' skb->secmark = skp->smk_secid; ^This changes the
Makefileto use the correctKconfigsymbol.Signed-off-by Arnd Bergmann <[email protected]>Fixes 69f287ae6fc83 ("Smack: secmark support for netfilter")security/smack/Makefile +0
-0
security/smack/Makefile line 8
Quoted 5 lines
security/smack/Makefile +1
-1@@ -5,4 +5,4 @@ obj-$(CONFIG_SECURITY_SMACK) := smack.o smack-y := smack_lsm.o smack_access.o smackfs.o -smack-$(CONFIG_NETFILTER) += smack_netfilter.o +smack-$(SECURITY_SMACK_NETFILTER) += smack_netfilter.o
CONFIG_ missing?
WBR, Sergei
Quoted 7 lines · On Wednesday 28 January 2015 21:18:11 Sergei Shtylyov wrote:
Quoted 7 lines
security/smack/Makefile +0
-0@@ -5,4 +5,4 @@ obj-$(CONFIG_SECURITY_SMACK) := smack.o
Quoted 5 lines
security/smack/Makefile line 8
Quoted 3 lines
security/smack/Makefile +1
-1smack-y := smack_lsm.o smack_access.o smackfs.o -smack-$(CONFIG_NETFILTER) += smack_netfilter.o +smack-$(SECURITY_SMACK_NETFILTER) += smack_netfilter.o
CONFIG_missing?
Yes, you are right. Anyway, as another fix is already queued, it doesn't matter any more.
Arnd
Quoted 27 lines · Arnd Bergmann
The newly added Smack support for netfilter secmark has its own
Kconfigsymbol, but the actual implementation is conditionally built on another symbol.It is possible for
CONFIG_NETFILTERandSECURITY_SMACKto both be enabled, butNETWORK_SECMARKto be disabled, in which case we get a build error:
../security/smack/smack_netfilter.c: In function 'smack_ipv6_output':../security/smack/smack_netfilter.c:36:6: error: 'structsk_buff' has no member named 'secmark'skb->secmark = skp->smk_secid; ^ ../security/smack/smack_netfilter.c: In function 'smack_ipv4_output': ../security/smack/smack_netfilter.c:55:6: error: 'struct sk_buff' has no member named 'secmark' skb->secmark = skp->smk_secid; ^This changes the
Makefileto use the correctKconfigsymbol.Signed-off-by Arnd Bergmann <[email protected]>Fixes 69f287ae6fc83 ("Smack: secmark support for netfilter")security/smack/Makefile +0
-0
security/smack/Makefile line 8
Quoted 5 lines
security/smack/Makefile +1
-1@@ -5,4 +5,4 @@ obj-$(CONFIG_SECURITY_SMACK) := smack.o smack-y := smack_lsm.o smack_access.o smackfs.o -smack-$(CONFIG_NETFILTER) += smack_netfilter.o +smack-$(SECURITY_SMACK_NETFILTER) += smack_netfilter.o
You probably wanted to use:
CONFIG_SECURITY_SMACK_NETFILTER
Paul Bolle