diff options
Diffstat (limited to 'include/net/scm.h')
-rw-r--r-- | include/net/scm.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/net/scm.h b/include/net/scm.h index 079d7887dac1..7dc0854f0b38 100644 --- a/include/net/scm.h +++ b/include/net/scm.h | |||
@@ -70,9 +70,11 @@ static __inline__ void scm_destroy(struct scm_cookie *scm) | |||
70 | } | 70 | } |
71 | 71 | ||
72 | static __inline__ int scm_send(struct socket *sock, struct msghdr *msg, | 72 | static __inline__ int scm_send(struct socket *sock, struct msghdr *msg, |
73 | struct scm_cookie *scm) | 73 | struct scm_cookie *scm, bool forcecreds) |
74 | { | 74 | { |
75 | memset(scm, 0, sizeof(*scm)); | 75 | memset(scm, 0, sizeof(*scm)); |
76 | if (forcecreds) | ||
77 | scm_set_cred(scm, task_tgid(current), current_cred()); | ||
76 | unix_get_peersec_dgram(sock, scm); | 78 | unix_get_peersec_dgram(sock, scm); |
77 | if (msg->msg_controllen <= 0) | 79 | if (msg->msg_controllen <= 0) |
78 | return 0; | 80 | return 0; |