chiark / gitweb /
shared: fix getpeername_pretty() for AF_UNIX sockets
authorLennart Poettering <lennart@poettering.net>
Tue, 24 Dec 2013 20:24:06 +0000 (21:24 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 25 Dec 2013 00:29:55 +0000 (01:29 +0100)
src/shared/socket-util.c

index 4700b3b..6d9c303 100644 (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;