]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
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 4700b3bc9950a49c1fee8c19866e3b3fa1ee37c1..6d9c30352964644e85eb5bc0e66c8cb22923ae47 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;