3 getnucred \- obtain the credentials that correspond to the given endpoint.
6 #include <sys/socket.h>
12 int getnucred(endpoint_t \fIproc_ep\fP, struct ucred * \fIucred\fP);
16 Given an endpoint \fIproc_ep\fP, this function will fill in \fIucred\fP
17 with the \fIpid\fP, \fIuid\fP, and \fIgid\fP that correspond to that
20 On success, this function returns 0 and \fIucred\fP will be filled in.
21 On error, -1 is returned and \fIerrno\fP is set.
25 The address pointed to by \fIucred\fP is not in a valid part of the
26 process address space.
28 The user calling this function has insufficient privileges. Only a user
29 with an euid of 0 may call this function.
31 The endpoint was not found. This is caused by an invalid endpoint or an
32 endpoint for a process that no longer exists.
41 This function first appeared in Minix 3.1.8.