Displaying 1 result from an estimated 1 matches for "have_struct_ucred".
Did you mean:
have_struct_cred
2007 Oct 18
0
[PATCH] Use credentials and permissions on control socket where available
...r, _("Cannot connect to %s: %s\n"), controlsocketname, strerror(errno));
+ fprintf(stderr, _("Cannot connect to %s: %s\n"), addr.sun_path, strerror(errno));
return 1;
}
@@ -525,16 +528,43 @@ int main(int argc, char *argv[], char *envp[]) {
return 1;
}
+#if defined(HAVE_STRUCT_UCRED)
struct ucred cred;
socklen_t credlen = sizeof cred;
if(getsockopt(fd, SOL_SOCKET, SO_PEERCRED, &cred, &credlen) < 0) {
- fprintf(stderr, _("Could not obtain PID: %s\n"), strerror(errno));
+ fprintf(stderr, _("Could not establish peer credentials: %s\n"), st...