shared: fix getpeername_pretty() for AF_UNIX sockets

This commit is contained in:
Lennart Poettering 2013-12-24 21:24:06 +01:00
parent 79a98c609d
commit 33649f58af

View file

@ -594,7 +594,7 @@ int getpeername_pretty(int fd, char **ret) {
if (r < 0)
return r;
if (asprintf(ret, "PID %lu/UID %lu", (unsigned long) ucred.pid, (unsigned long) ucred.pid) < 0)
if (asprintf(ret, "PID %lu/UID %lu", (unsigned long) ucred.pid, (unsigned long) ucred.uid) < 0)
return -ENOMEM;
return 0;