From: paul.moore@hp.com
To: netdev@vger.kernel.org, selinux@tycho.nsa.gov
Cc: tgraf@suug.ch, jmorris@redhat.com, sds@epoch.ncsc.mil
Subject: [PATCH v2 3/8] NetLabel: change the SELinux permissions
Date: Mon, 25 Sep 2006 14:04:15 -0400 [thread overview]
Message-ID: <20060925180640.679073000@hp.com> (raw)
In-Reply-To: 20060925180412.715069000@hp.com
[-- Attachment #1: netlabel-selinux_perm --]
[-- Type: text/plain, Size: 1365 bytes --]
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>
---
security/selinux/ss/services.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
Index: net-2.6.19/security/selinux/ss/services.c
===================================================================
--- net-2.6.19.orig/security/selinux/ss/services.c
+++ net-2.6.19/security/selinux/ss/services.c
@@ -2611,7 +2611,7 @@ int selinux_netlbl_sock_rcv_skb(struct s
u32 netlbl_sid;
u32 recv_perm;
- rc = selinux_netlbl_skbuff_getsid(skb, sksec->sid, &netlbl_sid);
+ rc = selinux_netlbl_skbuff_getsid(skb, SECINITSID_NETMSG, &netlbl_sid);
if (rc != 0)
return rc;
@@ -2620,13 +2620,13 @@ int selinux_netlbl_sock_rcv_skb(struct s
switch (sksec->sclass) {
case SECCLASS_UDP_SOCKET:
- recv_perm = UDP_SOCKET__RECV_MSG;
+ recv_perm = UDP_SOCKET__RECVFROM;
break;
case SECCLASS_TCP_SOCKET:
- recv_perm = TCP_SOCKET__RECV_MSG;
+ recv_perm = TCP_SOCKET__RECVFROM;
break;
default:
- recv_perm = RAWIP_SOCKET__RECV_MSG;
+ recv_perm = RAWIP_SOCKET__RECVFROM;
}
rc = avc_has_perm(sksec->sid,
--
paul moore
linux security @ hp
next prev parent reply other threads:[~2006-09-25 18:06 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-25 18:04 [PATCH v2 0/8] Updated patchset with Thomas' comments paul.moore
2006-09-25 18:04 ` [PATCH v2 1/8] NetLabel: correct improper handling of non-NetLabel peer contexts paul.moore
2006-09-25 18:04 ` [PATCH v2 2/8] NetLabel: make the CIPSOv4 cache spinlocks bottom half safe paul.moore
2006-09-25 18:04 ` paul.moore [this message]
2006-09-25 18:04 ` [PATCH v2 4/8] Netlink: add nla_for_each_nested() to the interface list paul.moore
2006-09-25 18:04 ` [PATCH v2 5/8] Netlink: add nla_validate_nested() paul.moore
2006-09-25 18:04 ` [PATCH v2 6/8] NetLabel: rework the Netlink attribute handling (part 1) paul.moore
2006-09-25 18:04 ` [PATCH v2 7/8] NetLabel: rework the Netlink attribute handling (part 2) paul.moore
2006-09-25 18:04 ` [PATCH v2 8/8] NetLabel: update docs with website information paul.moore
2006-09-25 19:18 ` [PATCH v2 0/8] Updated patchset with Thomas' comments James Morris
2006-09-25 21:06 ` Thomas Graf
2006-09-25 22:57 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060925180640.679073000@hp.com \
--to=paul.moore@hp.com \
--cc=jmorris@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=sds@epoch.ncsc.mil \
--cc=selinux@tycho.nsa.gov \
--cc=tgraf@suug.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).