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, .\" address that can appear in the sockaddr_un structure: pathname,
.\" unnamed, and abstract. .\" 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 .SH NAME
unix, AF_UNIX, AF_LOCAL \- Sockets for local unix, AF_UNIX, AF_LOCAL \- Sockets for local
interprocess communication interprocess communication
@ -211,6 +211,9 @@ This can be used for authentication.
The credentials are passed as a The credentials are passed as a
.I struct ucred .I struct ucred
ancillary message. ancillary message.
Thus structure is defined in
.I <sys/socket.h>
as follows:
.in +4n .in +4n
.nf .nf
@ -222,6 +225,11 @@ struct ucred {
.fi .fi
.in .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. 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 A process with effective user ID 0 is allowed to specify values that do
not match its own. not match its own.