diff options
Diffstat (limited to 'security/selinux')
-rw-r--r-- | security/selinux/netlabel.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/security/selinux/netlabel.c b/security/selinux/netlabel.c index f58701a7b728..3f4b26647386 100644 --- a/security/selinux/netlabel.c +++ b/security/selinux/netlabel.c | |||
@@ -490,8 +490,10 @@ int selinux_netlbl_socket_setsockopt(struct socket *sock, | |||
490 | lock_sock(sk); | 490 | lock_sock(sk); |
491 | rc = netlbl_sock_getattr(sk, &secattr); | 491 | rc = netlbl_sock_getattr(sk, &secattr); |
492 | release_sock(sk); | 492 | release_sock(sk); |
493 | if (rc == 0 && secattr.flags != NETLBL_SECATTR_NONE) | 493 | if (rc == 0) |
494 | rc = -EACCES; | 494 | rc = -EACCES; |
495 | else if (rc == -ENOMSG) | ||
496 | rc = 0; | ||
495 | netlbl_secattr_destroy(&secattr); | 497 | netlbl_secattr_destroy(&secattr); |
496 | } | 498 | } |
497 | 499 | ||