Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 02f06918 authored by Paul Moore's avatar Paul Moore
Browse files

iucv: properly clone LSM attributes to newly created child sockets



Much like we had to do for AF_BLUETOOTH and AF_ALG, make sure we
properly clone the parent socket's LSM attributes to newly created
child sockets.

Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
parent 0e0e3677
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@
#include <linux/skbuff.h>
#include <linux/init.h>
#include <linux/poll.h>
#include <linux/security.h>
#include <net/sock.h>
#include <asm/ebcdic.h>
#include <asm/cpcmd.h>
@@ -530,8 +531,10 @@ static void iucv_sock_close(struct sock *sk)

static void iucv_sock_init(struct sock *sk, struct sock *parent)
{
	if (parent)
	if (parent) {
		sk->sk_type = parent->sk_type;
		security_sk_clone(parent, sk);
	}
}

static struct sock *iucv_sock_alloc(struct socket *sock, int proto, gfp_t prio, int kern)