aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/bits/socket.h
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/bits/socket.h')
-rw-r--r--sysdeps/unix/sysv/linux/bits/socket.h23
1 files changed, 7 insertions, 16 deletions
diff --git a/sysdeps/unix/sysv/linux/bits/socket.h b/sysdeps/unix/sysv/linux/bits/socket.h
index c1f752ec29..226e332043 100644
--- a/sysdeps/unix/sysv/linux/bits/socket.h
+++ b/sysdeps/unix/sysv/linux/bits/socket.h
@@ -225,29 +225,20 @@ enum
SCM_RIGHTS = 0x01, /* Transfer file descriptors. */
#define SCM_RIGHTS SCM_RIGHTS
#ifdef __USE_BSD
- SCM_CREDS = 0x02, /* BSD-compatible credentials passing. */
-# define SCM_CREDS SCM_CREDS
+ SCM_CREDENTIALS = 0x02, /* Credentials passing. */
+# define SCM_CREDENTIALS SCM_CREDENTIALS
#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) */
+/* User visible structure for SCM_CREDENTIALS message */
-# define CMGROUP_MAX 16 /* Linux does not provide this info, so it doesn't
- matter... use what bsd does. */
-struct cmsgcred
+struct ucred
{
- 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. */
+ pid_t pid; /* PID of sending process. */
+ uid_t uid; /* UID of sending process. */
+ gid_t gid; /* GID of sending process. */
};
-#endif
/* Get socket manipulation related informations from kernel headers. */
#include <asm/socket.h>