diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-03-05 11:59:10 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-03-05 11:59:10 +0100 |
commit | 49d2d266adff27793fed247a2e9e672d59b6ddc6 (patch) | |
tree | aa23052f8b6e9f1a96e56873c940eef7110f0013 /security/selinux/netlabel.c | |
parent | 5512b3ece0cbb5024b83099963222700aa45f59e (diff) | |
parent | fec6c6fec3e20637bee5d276fb61dd8b49a3f9cc (diff) | |
download | linux-49d2d266adff27793fed247a2e9e672d59b6ddc6.tar.gz |
Merge commit 'v2.6.29-rc7' into sched/core
Diffstat (limited to 'security/selinux/netlabel.c')
-rw-r--r-- | security/selinux/netlabel.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/security/selinux/netlabel.c b/security/selinux/netlabel.c index 3f4b26647386..350794ab9b42 100644 --- a/security/selinux/netlabel.c +++ b/security/selinux/netlabel.c @@ -386,11 +386,12 @@ int selinux_netlbl_inode_permission(struct inode *inode, int mask) if (!S_ISSOCK(inode->i_mode) || ((mask & (MAY_WRITE | MAY_APPEND)) == 0)) return 0; - sock = SOCKET_I(inode); sk = sock->sk; + if (sk == NULL) + return 0; sksec = sk->sk_security; - if (sksec->nlbl_state != NLBL_REQUIRE) + if (sksec == NULL || sksec->nlbl_state != NLBL_REQUIRE) return 0; local_bh_disable(); |