Lines Matching defs:sock
43 int __scm_send(struct socket *sock, struct msghdr *msg, struct scm_cookie *scm);
48 static __inline__ void unix_get_peersec_dgram(struct socket *sock, struct scm_cookie *scm)
50 security_socket_getpeersec_dgram(sock, NULL, &scm->secid);
53 static __inline__ void unix_get_peersec_dgram(struct socket *sock, struct scm_cookie *scm)
79 static __inline__ int scm_send(struct socket *sock, struct msghdr *msg,
87 unix_get_peersec_dgram(sock, scm);
90 return __scm_send(sock, msg, scm);
94 static inline void scm_passec(struct socket *sock, struct msghdr *msg, struct scm_cookie *scm)
100 if (test_bit(SOCK_PASSSEC, &sock->flags)) {
110 static inline bool scm_has_secdata(struct socket *sock)
112 return test_bit(SOCK_PASSSEC, &sock->flags);
115 static inline void scm_passec(struct socket *sock, struct msghdr *msg, struct scm_cookie *scm)
118 static inline bool scm_has_secdata(struct socket *sock)
160 static inline bool __scm_recv_common(struct socket *sock, struct msghdr *msg,
164 if (test_bit(SOCK_PASSCRED, &sock->flags) ||
165 test_bit(SOCK_PASSPIDFD, &sock->flags) ||
166 scm->fp || scm_has_secdata(sock))
172 if (test_bit(SOCK_PASSCRED, &sock->flags)) {
182 scm_passec(sock, msg, scm);
190 static inline void scm_recv(struct socket *sock, struct msghdr *msg,
193 if (!__scm_recv_common(sock, msg, scm, flags))
199 static inline void scm_recv_unix(struct socket *sock, struct msghdr *msg,
202 if (!__scm_recv_common(sock, msg, scm, flags))
205 if (test_bit(SOCK_PASSPIDFD, &sock->flags))