|GETPEEREID(3)||Library Functions Manual||GETPEEREID(3)|
getpeereid — get
effective user and group identification of locally-connected peer
s, uid_t *euid,
One common use is for UNIX-domain servers to determine the credentials of clients that have connected to it.
takes three parameters:
uid_tvariable into which the effective user ID for the connected peer will be stored.
gid_tvariable into which the effective group ID for the connected peer will be stored.
If the call succeeds, a 0 is returned and euid and egid are set to the effective user ID and group ID of the connected peer. Otherwise, errno is set and a value of -1 is returned.
On failure, errno is set to one of the following:
getpeereid() function call appeared in
|June 5, 2013||OpenBSD-6.4|