/* Set the smk_{in,out} state of an existing sock based on the process that is creating the new socket.  */
static void smack_sock_graft(struct sock *sk, struct socket *parent)
/* Set the smk_{in,out} state of an existing sock based on the process that is creating the new socket.  */
static void smack_sock_graft(struct sock *sk, struct socket *parent)
{
	struct socket_smack *ssp;
	if (sk == NULL ||
	    (sk->sk_family != PF_INET && sk->sk_family != PF_INET6))
		return;
	ssp = sk->sk_security;
	ssp->smk_in = ssp->smk_out = current_security();
}