NETLINK_CB(skb).loginuid = audit_get_loginuid(current->audit_context); 
static int netlink_sendmsg(struct kiocb *kiocb, struct socket *sock,			   struct msghdr *msg, size_t len){	struct sock_iocb *siocb = kiocb_to_siocb(kiocb);	struct sock *sk = sock->sk;	struct netlink_sock *nlk = nlk_sk(sk);	struct sockaddr_nl *addr=msg->msg_name;	u32 dst_pid;	u32 dst_groups;	struct sk_buff *skb;	int err;	struct scm_cookie scm;	if (msg->msg_flags&MSG_OOB)		return -EOPNOTSUPP;	if (NULL == siocb->scm)		siocb->scm = &scm;	err = scm_send(sock, msg, siocb->scm);	if (err < 0)		return err;	if (msg->msg_namelen) {		if (addr->nl_family != AF_NETLINK)			return -EINVAL;		dst_pid = addr->nl_pid;		dst_groups = addr->nl_groups;		if (dst_groups && !netlink_capable(sock, NL_NONROOT_SEND))			return -EPERM;	} else {		dst_pid = nlk->dst_pid;		dst_groups = nlk->dst_groups;	}	if (!nlk->pid) {		err = netlink_autobind(sock);		if (err)			goto out;	}	err = -EMSGSIZE;	if (len > sk->sk_sndbuf - 32)		goto out;	err = -ENOBUFS;	skb = alloc_skb(len, GFP_KERNEL);	if (skb==NULL)		goto out;	NETLINK_CB(skb).pid	= nlk->pid;	NETLINK_CB(skb).groups	= nlk->groups;	NETLINK_CB(skb).dst_pid = dst_pid;	NETLINK_CB(skb).dst_groups = dst_groups;	memcpy(NETLINK_CREDS(skb), &siocb->scm->creds, sizeof(struct ucred));	/* What can I do? Netlink is asynchronous, so that	   we will have to save current capabilities to	   check them, when this message will be delivered	   to corresponding kernel module.   --ANK (980802)	 */	err = -EFAULT;	if (memcpy_fromiovec(skb_put(skb,len), msg->msg_iov, len)) {		kfree_skb(skb);		goto out;	}	err = security_netlink_send(sk, skb);	if (err) {		kfree_skb(skb);		goto out;	}	if (dst_groups) {		atomic_inc(&skb->users);		netlink_broadcast(sk, skb, dst_pid, dst_groups, GFP_KERNEL);	}	err = netlink_unicast(sk, skb, dst_pid, msg->msg_flags&MSG_DONTWAIT);out:	return err;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/c94c257c88c517f251da273a15c654224c7b6e21/af_netlink.c/clean/net/netlink/af_netlink.c