summaryrefslogtreecommitdiff
path: root/core/systemd/0001-journal-pass-the-pid-to-sd_pid_get_owner_uid.patch
blob: cd2d707564dde2794f5d49af12e5d35b82c6b615 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
From 83d7d83bcc6c462ecbb4c8003e3a8b41f3b88d46 Mon Sep 17 00:00:00 2001
From: Kay Sievers <kay@vrfy.org>
Date: Sat, 16 Mar 2013 16:10:22 +0100
Subject: [PATCH] journal: pass the *pid* to sd_pid_get_owner_uid()

---
 src/journal/journald-server.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c
index ac565c7..364ab0f 100644
--- a/src/journal/journald-server.c
+++ b/src/journal/journald-server.c
@@ -593,7 +593,7 @@ static void dispatch_message_real(
                                 IOVEC_SET_STRING(iovec[n++], session);
                 }
 
-                if (sd_pid_get_owner_uid(ucred->uid, &owner) >= 0) {
+                if (sd_pid_get_owner_uid(ucred->pid, &owner) >= 0) {
                         owner_valid = true;
                         if (asprintf(&owner_uid, "_SYSTEMD_OWNER_UID=%lu", (unsigned long) owner) >= 0)
                                 IOVEC_SET_STRING(iovec[n++], owner_uid);
-- 
1.8.2