Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 322052
b: refs/heads/master
c: e0e3cea
h: refs/heads/master
v: v3
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Aug 21, 2012
1 parent 749e8bf commit ba57c1a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a9915a1b52df52ad87f3b33422da95cf25372f09
refs/heads/master: e0e3cea46d31d23dc40df0a49a7a2c04fe8edfea
4 changes: 3 additions & 1 deletion trunk/include/net/scm.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,11 @@ static __inline__ void scm_destroy(struct scm_cookie *scm)
}

static __inline__ int scm_send(struct socket *sock, struct msghdr *msg,
struct scm_cookie *scm)
struct scm_cookie *scm, bool forcecreds)
{
memset(scm, 0, sizeof(*scm));
if (forcecreds)
scm_set_cred(scm, task_tgid(current), current_cred());
unix_get_peersec_dgram(sock, scm);
if (msg->msg_controllen <= 0)
return 0;
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/netlink/af_netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -1362,7 +1362,7 @@ static int netlink_sendmsg(struct kiocb *kiocb, struct socket *sock,
if (NULL == siocb->scm)
siocb->scm = &scm;

err = scm_send(sock, msg, siocb->scm);
err = scm_send(sock, msg, siocb->scm, true);
if (err < 0)
return err;

Expand Down
4 changes: 2 additions & 2 deletions trunk/net/unix/af_unix.c
Original file line number Diff line number Diff line change
Expand Up @@ -1450,7 +1450,7 @@ static int unix_dgram_sendmsg(struct kiocb *kiocb, struct socket *sock,
if (NULL == siocb->scm)
siocb->scm = &tmp_scm;
wait_for_unix_gc();
err = scm_send(sock, msg, siocb->scm);
err = scm_send(sock, msg, siocb->scm, false);
if (err < 0)
return err;

Expand Down Expand Up @@ -1619,7 +1619,7 @@ static int unix_stream_sendmsg(struct kiocb *kiocb, struct socket *sock,
if (NULL == siocb->scm)
siocb->scm = &tmp_scm;
wait_for_unix_gc();
err = scm_send(sock, msg, siocb->scm);
err = scm_send(sock, msg, siocb->scm, false);
if (err < 0)
return err;

Expand Down

0 comments on commit ba57c1a

Please sign in to comment.