diff options
Diffstat (limited to 'include/net/af_unix.h')
| -rw-r--r-- | include/net/af_unix.h | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/include/net/af_unix.h b/include/net/af_unix.h index 1614d78c60ed..90c9e2872f27 100644 --- a/include/net/af_unix.h +++ b/include/net/af_unix.h | |||
| @@ -23,15 +23,15 @@ struct unix_address { | |||
| 23 | }; | 23 | }; |
| 24 | 24 | ||
| 25 | struct unix_skb_parms { | 25 | struct unix_skb_parms { |
| 26 | struct ucred creds; /* Skb credentials */ | 26 | struct pid *pid; /* Skb credentials */ |
| 27 | const struct cred *cred; | ||
| 27 | struct scm_fp_list *fp; /* Passed files */ | 28 | struct scm_fp_list *fp; /* Passed files */ |
| 28 | #ifdef CONFIG_SECURITY_NETWORK | 29 | #ifdef CONFIG_SECURITY_NETWORK |
| 29 | u32 secid; /* Security ID */ | 30 | u32 secid; /* Security ID */ |
| 30 | #endif | 31 | #endif |
| 31 | }; | 32 | }; |
| 32 | 33 | ||
| 33 | #define UNIXCB(skb) (*(struct unix_skb_parms*)&((skb)->cb)) | 34 | #define UNIXCB(skb) (*(struct unix_skb_parms *)&((skb)->cb)) |
| 34 | #define UNIXCREDS(skb) (&UNIXCB((skb)).creds) | ||
| 35 | #define UNIXSID(skb) (&UNIXCB((skb)).secid) | 35 | #define UNIXSID(skb) (&UNIXCB((skb)).secid) |
| 36 | 36 | ||
| 37 | #define unix_state_lock(s) spin_lock(&unix_sk(s)->lock) | 37 | #define unix_state_lock(s) spin_lock(&unix_sk(s)->lock) |
| @@ -45,21 +45,23 @@ struct unix_skb_parms { | |||
| 45 | struct unix_sock { | 45 | struct unix_sock { |
| 46 | /* WARNING: sk has to be the first member */ | 46 | /* WARNING: sk has to be the first member */ |
| 47 | struct sock sk; | 47 | struct sock sk; |
| 48 | struct unix_address *addr; | 48 | struct unix_address *addr; |
| 49 | struct dentry *dentry; | 49 | struct dentry *dentry; |
| 50 | struct vfsmount *mnt; | 50 | struct vfsmount *mnt; |
| 51 | struct mutex readlock; | 51 | struct mutex readlock; |
| 52 | struct sock *peer; | 52 | struct sock *peer; |
| 53 | struct sock *other; | 53 | struct sock *other; |
| 54 | struct list_head link; | 54 | struct list_head link; |
| 55 | atomic_long_t inflight; | 55 | atomic_long_t inflight; |
| 56 | spinlock_t lock; | 56 | spinlock_t lock; |
| 57 | unsigned int gc_candidate : 1; | 57 | unsigned int gc_candidate : 1; |
| 58 | unsigned int gc_maybe_cycle : 1; | 58 | unsigned int gc_maybe_cycle : 1; |
| 59 | wait_queue_head_t peer_wait; | 59 | struct socket_wq peer_wq; |
| 60 | }; | 60 | }; |
| 61 | #define unix_sk(__sk) ((struct unix_sock *)__sk) | 61 | #define unix_sk(__sk) ((struct unix_sock *)__sk) |
| 62 | 62 | ||
| 63 | #define peer_wait peer_wq.wait | ||
| 64 | |||
| 63 | #ifdef CONFIG_SYSCTL | 65 | #ifdef CONFIG_SYSCTL |
| 64 | extern int unix_sysctl_register(struct net *net); | 66 | extern int unix_sysctl_register(struct net *net); |
| 65 | extern void unix_sysctl_unregister(struct net *net); | 67 | extern void unix_sysctl_unregister(struct net *net); |
