diff options
| author | Herbert Pƶtzl <herbert@13thfloor.at> | 2005-03-09 04:43:08 -0800 |
|---|---|---|
| committer | David S. Miller <davem@northbeach.davemloft.net.davemloft.net> | 2005-03-09 04:43:08 -0800 |
| commit | 1cc6b1043b153dbff4458f7ec6ef5f712ea353d2 (patch) | |
| tree | d411ed982a0d18e41613f01d11a75baf45743e75 /include/net/scm.h | |
| parent | 6fab4b4501dd8ca0165f6594b0df9ca4618eac10 (diff) | |
[NET]: Passcred cleanup in struct sock
struct socket uses a 'bool' (unsigned char) to
'flag' the pass-credential option for sockets
(which can be easily replaced by a flag)
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/scm.h')
| -rw-r--r-- | include/net/scm.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/net/scm.h b/include/net/scm.h index b7ba74dbc3fd..c3fa3d5ab606 100644 --- a/include/net/scm.h +++ b/include/net/scm.h @@ -51,13 +51,13 @@ static __inline__ void scm_recv(struct socket *sock, struct msghdr *msg, { if (!msg->msg_control) { - if (sock->passcred || scm->fp) + if (test_bit(SOCK_PASSCRED, &sock->flags) || scm->fp) msg->msg_flags |= MSG_CTRUNC; scm_destroy(scm); return; } - if (sock->passcred) + if (test_bit(SOCK_PASSCRED, &sock->flags)) put_cmsg(msg, SOL_SOCKET, SCM_CREDENTIALS, sizeof(scm->creds), &scm->creds); if (!scm->fp) |
