netlabel.c (9938b04472d5c59f8bd8152a548533a8599596a2) netlabel.c (ceba1832b1b2da0149c51de62a847c00bca1677a)
1/*
2 * SELinux NetLabel Support
3 *
4 * This file provides the necessary glue to tie NetLabel into the SELinux
5 * subsystem.
6 *
7 * Author: Paul Moore <paul@paul-moore.com>
8 *

--- 319 unchanged lines hidden (view full) ---

328 *
329 */
330int selinux_netlbl_socket_post_create(struct sock *sk, u16 family)
331{
332 int rc;
333 struct sk_security_struct *sksec = sk->sk_security;
334 struct netlbl_lsm_secattr *secattr;
335
1/*
2 * SELinux NetLabel Support
3 *
4 * This file provides the necessary glue to tie NetLabel into the SELinux
5 * subsystem.
6 *
7 * Author: Paul Moore <paul@paul-moore.com>
8 *

--- 319 unchanged lines hidden (view full) ---

328 *
329 */
330int selinux_netlbl_socket_post_create(struct sock *sk, u16 family)
331{
332 int rc;
333 struct sk_security_struct *sksec = sk->sk_security;
334 struct netlbl_lsm_secattr *secattr;
335
336 if (family != PF_INET)
336 if (family != PF_INET && family != PF_INET6)
337 return 0;
338
339 secattr = selinux_netlbl_sock_genattr(sk);
340 if (secattr == NULL)
341 return -ENOMEM;
342 rc = netlbl_sock_setattr(sk, family, secattr);
343 switch (rc) {
344 case 0:

--- 153 unchanged lines hidden ---
337 return 0;
338
339 secattr = selinux_netlbl_sock_genattr(sk);
340 if (secattr == NULL)
341 return -ENOMEM;
342 rc = netlbl_sock_setattr(sk, family, secattr);
343 switch (rc) {
344 case 0:

--- 153 unchanged lines hidden ---