diff options
| author | Takashi Iwai <tiwai@suse.de> | 2009-12-15 04:29:06 -0500 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2009-12-15 04:29:06 -0500 |
| commit | 709334c87dbdb44150ce436b3d13c814db0dcae9 (patch) | |
| tree | 5861a45f70c1f283720337abd864498f5afb3dbe /include/net/scm.h | |
| parent | 0d64b568fcd48b133721c1d322e7c51d85eb12df (diff) | |
| parent | f74890277a196949e4004fe2955e1d4fb3930f98 (diff) | |
Merge branch 'fixes' of git://git.alsa-project.org/alsa-kernel into for-linus
Diffstat (limited to 'include/net/scm.h')
| -rw-r--r-- | include/net/scm.h | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/include/net/scm.h b/include/net/scm.h index cf48c800e926..8360e47aa7e3 100644 --- a/include/net/scm.h +++ b/include/net/scm.h | |||
| @@ -12,15 +12,13 @@ | |||
| 12 | */ | 12 | */ |
| 13 | #define SCM_MAX_FD 255 | 13 | #define SCM_MAX_FD 255 |
| 14 | 14 | ||
| 15 | struct scm_fp_list | 15 | struct scm_fp_list { |
| 16 | { | ||
| 17 | struct list_head list; | 16 | struct list_head list; |
| 18 | int count; | 17 | int count; |
| 19 | struct file *fp[SCM_MAX_FD]; | 18 | struct file *fp[SCM_MAX_FD]; |
| 20 | }; | 19 | }; |
| 21 | 20 | ||
| 22 | struct scm_cookie | 21 | struct scm_cookie { |
| 23 | { | ||
| 24 | struct ucred creds; /* Skb credentials */ | 22 | struct ucred creds; /* Skb credentials */ |
| 25 | struct scm_fp_list *fp; /* Passed files */ | 23 | struct scm_fp_list *fp; /* Passed files */ |
| 26 | #ifdef CONFIG_SECURITY_NETWORK | 24 | #ifdef CONFIG_SECURITY_NETWORK |
| @@ -88,8 +86,7 @@ static inline void scm_passec(struct socket *sock, struct msghdr *msg, struct sc | |||
| 88 | static __inline__ void scm_recv(struct socket *sock, struct msghdr *msg, | 86 | static __inline__ void scm_recv(struct socket *sock, struct msghdr *msg, |
| 89 | struct scm_cookie *scm, int flags) | 87 | struct scm_cookie *scm, int flags) |
| 90 | { | 88 | { |
| 91 | if (!msg->msg_control) | 89 | if (!msg->msg_control) { |
| 92 | { | ||
| 93 | if (test_bit(SOCK_PASSCRED, &sock->flags) || scm->fp) | 90 | if (test_bit(SOCK_PASSCRED, &sock->flags) || scm->fp) |
| 94 | msg->msg_flags |= MSG_CTRUNC; | 91 | msg->msg_flags |= MSG_CTRUNC; |
| 95 | scm_destroy(scm); | 92 | scm_destroy(scm); |
