Since glibc 2.8, _GNU_SOURCE must be defined in order to get

the definition of the ucred structure from <sys/socket.h>.
This commit is contained in:
Michael Kerrisk 2008-09-01 14:57:49 +00:00
parent 86bd1991a5
commit b1587ca86e
1 changed files with 9 additions and 1 deletions

View File

@ -12,7 +12,7 @@
.\" address that can appear in the sockaddr_un structure: pathname,
.\" unnamed, and abstract.
.\"
.TH UNIX 7 2008-08-08 "Linux" "Linux Programmer's Manual"
.TH UNIX 7 2008-09-01 "Linux" "Linux Programmer's Manual"
.SH NAME
unix, AF_UNIX, AF_LOCAL \- Sockets for local
interprocess communication
@ -211,6 +211,9 @@ This can be used for authentication.
The credentials are passed as a
.I struct ucred
ancillary message.
Thus structure is defined in
.I <sys/socket.h>
as follows:
.in +4n
.nf
@ -222,6 +225,11 @@ struct ucred {
.fi
.in
Since glibc 2.8, the
.B __GNU_SOURCE
feature test macro must be defined in order to obtain the definition
of this structure.
The credentials which the sender specifies are checked by the kernel.
A process with effective user ID 0 is allowed to specify values that do
not match its own.