af_unix.h (5e66dd6d66ffe758b39b6dcadf2330753ee1159b) | af_unix.h (dc49c1f94e3469d94b952e8f5160dd4ccd791d79) |
---|---|
1#ifndef __LINUX_NET_AFUNIX_H 2#define __LINUX_NET_AFUNIX_H 3 4#include <linux/socket.h> 5#include <linux/un.h> 6#include <linux/mutex.h> 7#include <net/sock.h> 8 --- 40 unchanged lines hidden (view full) --- 49 unsigned hash; 50 struct sockaddr_un name[0]; 51}; 52 53struct unix_skb_parms { 54 struct ucred creds; /* Skb credentials */ 55 struct scm_fp_list *fp; /* Passed files */ 56#ifdef CONFIG_SECURITY_NETWORK | 1#ifndef __LINUX_NET_AFUNIX_H 2#define __LINUX_NET_AFUNIX_H 3 4#include <linux/socket.h> 5#include <linux/un.h> 6#include <linux/mutex.h> 7#include <net/sock.h> 8 --- 40 unchanged lines hidden (view full) --- 49 unsigned hash; 50 struct sockaddr_un name[0]; 51}; 52 53struct unix_skb_parms { 54 struct ucred creds; /* Skb credentials */ 55 struct scm_fp_list *fp; /* Passed files */ 56#ifdef CONFIG_SECURITY_NETWORK |
57 char *secdata; /* Security context */ 58 u32 seclen; /* Security length */ | 57 u32 secid; /* Security ID */ |
59#endif 60}; 61 62#define UNIXCB(skb) (*(struct unix_skb_parms*)&((skb)->cb)) 63#define UNIXCREDS(skb) (&UNIXCB((skb)).creds) | 58#endif 59}; 60 61#define UNIXCB(skb) (*(struct unix_skb_parms*)&((skb)->cb)) 62#define UNIXCREDS(skb) (&UNIXCB((skb)).creds) |
64#define UNIXSECDATA(skb) (&UNIXCB((skb)).secdata) 65#define UNIXSECLEN(skb) (&UNIXCB((skb)).seclen) | 63#define UNIXSID(skb) (&UNIXCB((skb)).secid) |
66 67#define unix_state_rlock(s) spin_lock(&unix_sk(s)->lock) 68#define unix_state_runlock(s) spin_unlock(&unix_sk(s)->lock) 69#define unix_state_wlock(s) spin_lock(&unix_sk(s)->lock) 70#define unix_state_wlock_nested(s) \ 71 spin_lock_nested(&unix_sk(s)->lock, \ 72 SINGLE_DEPTH_NESTING) 73#define unix_state_wunlock(s) spin_unlock(&unix_sk(s)->lock) --- 29 unchanged lines hidden --- | 64 65#define unix_state_rlock(s) spin_lock(&unix_sk(s)->lock) 66#define unix_state_runlock(s) spin_unlock(&unix_sk(s)->lock) 67#define unix_state_wlock(s) spin_lock(&unix_sk(s)->lock) 68#define unix_state_wlock_nested(s) \ 69 spin_lock_nested(&unix_sk(s)->lock, \ 70 SINGLE_DEPTH_NESTING) 71#define unix_state_wunlock(s) spin_unlock(&unix_sk(s)->lock) --- 29 unchanged lines hidden --- |