aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Moore <paul.moore@hp.com>2006-09-25 18:53:13 -0400
committerDavid S. Miller <davem@davemloft.net>2006-09-25 18:53:13 -0400
commitdf2115c3134d0d1a18c1f37f5192394e7f64d1e0 (patch)
tree6a248318fa84838967376269fbd2e999ebeef3f2
parent609c92feea5652809319bb77f19d24a44615687d (diff)
[NetLabel]: change the SELinux permissions
Change NetLabel to use the 'recvfrom' socket permission and the SECINITSID_NETMSG SELinux SID as the NetLabel base SID for incoming packets. This patch effectively makes the old, and currently unused, SELinux NETMSG permissions NetLabel permissions. Signed-of-by: Paul Moore <paul.moore@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--security/selinux/ss/services.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c
index d67f7e658529..22ed17c17718 100644
--- a/security/selinux/ss/services.c
+++ b/security/selinux/ss/services.c
@@ -2611,7 +2611,7 @@ int selinux_netlbl_sock_rcv_skb(struct sk_security_struct *sksec,
2611 u32 netlbl_sid; 2611 u32 netlbl_sid;
2612 u32 recv_perm; 2612 u32 recv_perm;
2613 2613
2614 rc = selinux_netlbl_skbuff_getsid(skb, sksec->sid, &netlbl_sid); 2614 rc = selinux_netlbl_skbuff_getsid(skb, SECINITSID_NETMSG, &netlbl_sid);
2615 if (rc != 0) 2615 if (rc != 0)
2616 return rc; 2616 return rc;
2617 2617
@@ -2620,13 +2620,13 @@ int selinux_netlbl_sock_rcv_skb(struct sk_security_struct *sksec,
2620 2620
2621 switch (sksec->sclass) { 2621 switch (sksec->sclass) {
2622 case SECCLASS_UDP_SOCKET: 2622 case SECCLASS_UDP_SOCKET:
2623 recv_perm = UDP_SOCKET__RECV_MSG; 2623 recv_perm = UDP_SOCKET__RECVFROM;
2624 break; 2624 break;
2625 case SECCLASS_TCP_SOCKET: 2625 case SECCLASS_TCP_SOCKET:
2626 recv_perm = TCP_SOCKET__RECV_MSG; 2626 recv_perm = TCP_SOCKET__RECVFROM;
2627 break; 2627 break;
2628 default: 2628 default:
2629 recv_perm = RAWIP_SOCKET__RECV_MSG; 2629 recv_perm = RAWIP_SOCKET__RECVFROM;
2630 } 2630 }
2631 2631
2632 rc = avc_has_perm(sksec->sid, 2632 rc = avc_has_perm(sksec->sid,