search for: peer_egid

Displaying 1 result from an estimated 1 matches for "peer_egid".

Did you mean: peer_cid
2007 Oct 18
0
[PATCH] Use credentials and permissions on control socket where available
...PID: %s\n"), strerror(errno)); + fprintf(stderr, _("Could not establish peer credentials: %s\n"), strerror(errno)); return 1; } + if(cred.uid != 0) { + fprintf(stderr, _("Peer is not root")); + return 1; + } +#elif defined(HAVE_GETPEEREID) + uid_t peer_euid; + gid_t peer_egid; + + if(getpeereid(fd, &peer_euid, &peer_egid) != 0) { + fprintf(stderr, _("Could not establish peer credentials: %s\n"), strerror(errno)); + return 1; + } + if(peer_euid != 0) { + fprintf(stderr, _("Peer is not root")); + return 1; + } +#else + fprintf(stderr, _(&qu...