Home
last modified time | relevance | path

Searched refs:scm (Results 1 – 8 of 8) sorted by relevance

/net/unix/
Dscm.c106 int unix_attach_fds(struct scm_cookie *scm, struct sk_buff *skb) in unix_attach_fds() argument
118 UNIXCB(skb).fp = scm_fp_dup(scm->fp); in unix_attach_fds()
122 for (i = scm->fp->count - 1; i >= 0; i--) in unix_attach_fds()
123 unix_inflight(scm->fp->user, scm->fp->fp[i]); in unix_attach_fds()
128 void unix_detach_fds(struct scm_cookie *scm, struct sk_buff *skb) in unix_detach_fds() argument
132 scm->fp = UNIXCB(skb).fp; in unix_detach_fds()
135 for (i = scm->fp->count-1; i >= 0; i--) in unix_detach_fds()
136 unix_notinflight(scm->fp->user, scm->fp->fp[i]); in unix_detach_fds()
142 struct scm_cookie scm; in unix_destruct_scm() local
144 memset(&scm, 0, sizeof(scm)); in unix_destruct_scm()
[all …]
Daf_unix.c139 static void unix_get_secdata(struct scm_cookie *scm, struct sk_buff *skb) in unix_get_secdata() argument
141 UNIXCB(skb).secid = scm->secid; in unix_get_secdata()
144 static inline void unix_set_secdata(struct scm_cookie *scm, struct sk_buff *skb) in unix_set_secdata() argument
146 scm->secid = UNIXCB(skb).secid; in unix_set_secdata()
149 static inline bool unix_secdata_eq(struct scm_cookie *scm, struct sk_buff *skb) in unix_secdata_eq() argument
151 return (scm->secid == UNIXCB(skb).secid); in unix_secdata_eq()
154 static inline void unix_get_secdata(struct scm_cookie *scm, struct sk_buff *skb) in unix_get_secdata() argument
157 static inline void unix_set_secdata(struct scm_cookie *scm, struct sk_buff *skb) in unix_set_secdata() argument
160 static inline bool unix_secdata_eq(struct scm_cookie *scm, struct sk_buff *skb) in unix_secdata_eq() argument
1544 static void unix_peek_fds(struct scm_cookie *scm, struct sk_buff *skb) in unix_peek_fds() argument
[all …]
Dscm.h7 int unix_attach_fds(struct scm_cookie *scm, struct sk_buff *skb);
8 void unix_detach_fds(struct scm_cookie *scm, struct sk_buff *skb);
DMakefile14 obj-$(CONFIG_UNIX_SCM) += scm.o
/net/core/
Dscm.c122 void __scm_destroy(struct scm_cookie *scm) in __scm_destroy() argument
124 struct scm_fp_list *fpl = scm->fp; in __scm_destroy()
128 scm->fp = NULL; in __scm_destroy()
296 void scm_detach_fds(struct msghdr *msg, struct scm_cookie *scm) in scm_detach_fds() argument
301 int fdmax = min_t(int, scm_max_fds(msg), scm->fp->count); in scm_detach_fds()
310 scm_detach_fds_compat(msg, scm); in scm_detach_fds()
315 err = receive_fd_user(scm->fp->fp[i], cmsg_data + i, o_flags); in scm_detach_fds()
337 if (i < scm->fp->count || (scm->fp->count && fdmax <= 0)) in scm_detach_fds()
344 __scm_destroy(scm); in scm_detach_fds()
DMakefile6 obj-y := sock.o request_sock.o skbuff.o datagram.o stream.o scm.o \
/net/
Dcompat.c291 void scm_detach_fds_compat(struct msghdr *msg, struct scm_cookie *scm) in scm_detach_fds_compat() argument
296 int fdmax = min_t(int, scm_max_fds_compat(msg), scm->fp->count); in scm_detach_fds_compat()
301 err = receive_fd_user(scm->fp->fp[i], cmsg_data + i, o_flags); in scm_detach_fds_compat()
323 if (i < scm->fp->count || (scm->fp->count && fdmax <= 0)) in scm_detach_fds_compat()
330 __scm_destroy(scm); in scm_detach_fds_compat()
/net/netlink/
Daf_netlink.c1843 struct scm_cookie scm; in netlink_sendmsg() local
1854 err = scm_send(sock, msg, &scm, true); in netlink_sendmsg()
1897 NETLINK_CB(skb).creds = scm.creds; in netlink_sendmsg()
1919 scm_destroy(&scm); in netlink_sendmsg()
1926 struct scm_cookie scm; in netlink_recvmsg() local
1989 memset(&scm, 0, sizeof(scm)); in netlink_recvmsg()
1990 scm.creds = *NETLINK_CREDS(skb); in netlink_recvmsg()
2005 scm_recv(sock, msg, &scm, flags); in netlink_recvmsg()