Lines Matching refs:scm
23 extern void scm_detach_fds(struct msghdr *msg, struct scm_cookie *scm);
24 extern int __scm_send(struct socket *sock, struct msghdr *msg, struct scm_cookie *scm);
25 extern void __scm_destroy(struct scm_cookie *scm);
28 static __inline__ void scm_destroy(struct scm_cookie *scm) in scm_destroy() argument
30 if (scm && scm->fp) in scm_destroy()
31 __scm_destroy(scm); in scm_destroy()
35 struct scm_cookie *scm) in scm_send() argument
37 memset(scm, 0, sizeof(*scm)); in scm_send()
38 scm->creds.uid = current->uid; in scm_send()
39 scm->creds.gid = current->gid; in scm_send()
40 scm->creds.pid = current->pid; in scm_send()
43 return __scm_send(sock, msg, scm); in scm_send()
47 struct scm_cookie *scm, int flags) in scm_recv() argument
51 if (sock->passcred || scm->fp) in scm_recv()
53 scm_destroy(scm); in scm_recv()
58 put_cmsg(msg, SOL_SOCKET, SCM_CREDENTIALS, sizeof(scm->creds), &scm->creds); in scm_recv()
60 if (!scm->fp) in scm_recv()
63 scm_detach_fds(msg, scm); in scm_recv()