summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarcel Hollerbach <marcel@osg.samsung.com>2020-05-25 14:39:25 +0200
committerMarcel Hollerbach <marcel@osg.samsung.com>2020-05-25 14:39:25 +0200
commit4475eb42a6a5ac3cf92166c4283b0b8391ce0581 (patch)
tree99963d6a657ecc7ea38754593b71cd393d268492 /src
parent6ff48ca647aba586c34649006402368a6d003e5b (diff)
e_ckpasswd_main: fix polkit to auth root
there were the wrong pids passed. This fixes calls like "systemctl start docker".
Diffstat (limited to 'src')
-rw-r--r--src/bin/e_ckpasswd_main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bin/e_ckpasswd_main.c b/src/bin/e_ckpasswd_main.c
index b5e01d4ae..76bbf3543 100644
--- a/src/bin/e_ckpasswd_main.c
+++ b/src/bin/e_ckpasswd_main.c
@@ -213,7 +213,7 @@ polkit_auth(const char *cookie, unsigned int auth_uid)
213 if (!m) BARF("Cannot get method call: AuthenticationAgentResponse2"); 213 if (!m) BARF("Cannot get method call: AuthenticationAgentResponse2");
214 iter = eldbus_message_iter_get(m); 214 iter = eldbus_message_iter_get(m);
215 if (!iter) BARF("Cannot set iter on proxy"); 215 if (!iter) BARF("Cannot set iter on proxy");
216 if (!eldbus_message_iter_arguments_append(iter, "us", auth_uid, cookie)) 216 if (!eldbus_message_iter_arguments_append(iter, "us", uid, cookie))
217 BARF("Cannot append 'us' args"); 217 BARF("Cannot append 'us' args");
218 if (!eldbus_message_iter_arguments_append(iter, "(sa{sv})", &subj)) 218 if (!eldbus_message_iter_arguments_append(iter, "(sa{sv})", &subj))
219 BARF("Cannot append '(sa{sv})' args"); 219 BARF("Cannot append '(sa{sv})' args");
@@ -360,7 +360,7 @@ main(int argc, char **argv)
360 // ok to fail - auth will just possibly fail then 360 // ok to fail - auth will just possibly fail then
361 e_setuid_setup(&uid, &gid, &user_name, &group_name); 361 e_setuid_setup(&uid, &gid, &user_name, &group_name);
362 362
363 if (_check_auth(uid, pw) == 0) 363 if (_check_auth(polkit_mode ? polkit_uid : uid, pw) == 0)
364 { 364 {
365 fprintf(stderr, "AUTH: Password OK\n"); 365 fprintf(stderr, "AUTH: Password OK\n");
366 if (polkit_mode == 1) 366 if (polkit_mode == 1)