Add selinux_relabel_packet_permission() check to xt_SECMARK (fwd)
Subsystems (3)
RFC 8/8 Add selinux_relabel_packet_permission() check to xt_SECMARK (fwd)
---------- Forwarded message ----------
Date: Sun, 7 May 2006 11:40:45 -0400 (EDT)
From: James Morris <[email protected]>
To: [email protected]
Cc: [email protected], [email protected],
Stephen Smalley <[email protected]>, Daniel J Walsh <[email protected]>
Subject: [RFC][SECMARK 08/08] Add selinux_relabel_packet_permission() check to
xt_SECMARK
This patch adds the selinux_relabel_packet_permission() check to the SECMARK target, so that SELinux policy is consulted to ensure that the labeling operation is permitted by the current task.
Signed-off-by James Morris <[email protected]>
---
net/netfilter/xt_SECMARK.c | 6 ++++++ 1 file changed, 6 insertions(+)
net/netfilter/xt_SECMARK.c +6 -0
@@ -72,6 +72,12 @@ static int checkentry_selinux(struct xt_return 0 ; } + err =selinux_relabel_packet_permission (sel->selsid); +if (err) { + printk(KERN_INFO PFX "unable to obtain relabeling permission\n"); +return 0 ; + } +return 1 ; }