diff options
Diffstat (limited to 'sysdeps/unix/sysv/linux/bits')
-rw-r--r-- | sysdeps/unix/sysv/linux/bits/sched.h | 4 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/bits/socket.h | 26 |
2 files changed, 25 insertions, 5 deletions
diff --git a/sysdeps/unix/sysv/linux/bits/sched.h b/sysdeps/unix/sysv/linux/bits/sched.h index c7f6d8d902..9d5d5e65df 100644 --- a/sysdeps/unix/sysv/linux/bits/sched.h +++ b/sysdeps/unix/sysv/linux/bits/sched.h @@ -57,6 +57,8 @@ extern int clone __P ((int (*__fn) (void *__arg), void *__child_stack, int __flags, void *__arg)); #endif +__END_DECLS + #endif /* need schedparam */ #if !defined __defined_schedparam \ @@ -69,5 +71,3 @@ struct __sched_param }; # undef __need_schedparam #endif - -__END_DECLS diff --git a/sysdeps/unix/sysv/linux/bits/socket.h b/sysdeps/unix/sysv/linux/bits/socket.h index 5517ba8803..c1f752ec29 100644 --- a/sysdeps/unix/sysv/linux/bits/socket.h +++ b/sysdeps/unix/sysv/linux/bits/socket.h @@ -222,12 +222,32 @@ __cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) <linux/socket.h>. */ enum { - SCM_RIGHTS = 0x01, /* Data array contains access rights. */ + SCM_RIGHTS = 0x01, /* Transfer file descriptors. */ #define SCM_RIGHTS SCM_RIGHTS - __SCM_CREDENTIALS = 0x02, /* Data array is `struct ucred'. */ - __SCM_CONNECT = 0x03 /* Data array is `struct scm_connect'. */ +#ifdef __USE_BSD + SCM_CREDS = 0x02, /* BSD-compatible credentials passing. */ +# define SCM_CREDS SCM_CREDS +#endif + __SCM_CONNECT = 0x03, /* Data array is `struct scm_connect'. */ }; +#ifdef __USE_BSD + +/* User visible structure for SCM_CREDS message + (chosen for BSD source compatibility) */ + +# define CMGROUP_MAX 16 /* Linux does not provide this info, so it doesn't + matter... use what bsd does. */ +struct cmsgcred +{ + pid_t cmcred_pid; /* PID of sending process. */ + uid_t cmcred_uid; /* Real UID of sending process. */ + uid_t cmcred_euid; /* Effective UID of sending process. */ + gid_t cmcred_gid; /* Real GID of sending process. */ + short int cmcred_ngroups; /* Number or groups. */ + gid_t cmcred_groups[CMGROUP_MAX]; /* Groups. */ +}; +#endif /* Get socket manipulation related informations from kernel headers. */ #include <asm/socket.h> |