summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <marcel@osg.samsung.com>2020-05-25 14:39:25 +0200
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2020-05-25 13:47:58 +0100
commit67bdd4d0716528bba63763098739ce5365e0376d (patch)
tree78fe3deed602863f9e755af2614ae8657e3e591c
parent4fd99de9fafd0823d1d64da913d0b17d4c6ffbfb (diff)
e_ckpasswd_main: fix polkit to auth root
there were the wrong pids passed. This fixes calls like "systemctl start docker".
-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 db71cd116..3d27ac6af 100644
--- a/src/bin/e_ckpasswd_main.c
+++ b/src/bin/e_ckpasswd_main.c
@@ -214,7 +214,7 @@ polkit_auth(const char *cookie, unsigned int auth_uid)
214 if (!m) BARF("Cannot get method call: AuthenticationAgentResponse2"); 214 if (!m) BARF("Cannot get method call: AuthenticationAgentResponse2");
215 iter = eldbus_message_iter_get(m); 215 iter = eldbus_message_iter_get(m);
216 if (!iter) BARF("Cannot set iter on proxy"); 216 if (!iter) BARF("Cannot set iter on proxy");
217 if (!eldbus_message_iter_arguments_append(iter, "us", auth_uid, cookie)) 217 if (!eldbus_message_iter_arguments_append(iter, "us", uid, cookie))
218 BARF("Cannot append 'us' args"); 218 BARF("Cannot append 'us' args");
219 if (!eldbus_message_iter_arguments_append(iter, "(sa{sv})", &subj)) 219 if (!eldbus_message_iter_arguments_append(iter, "(sa{sv})", &subj))
220 BARF("Cannot append '(sa{sv})' args"); 220 BARF("Cannot append '(sa{sv})' args");
@@ -361,7 +361,7 @@ main(int argc, char **argv)
361 // ok to fail - auth will just possibly fail then 361 // ok to fail - auth will just possibly fail then
362 e_setuid_setup(&uid, &gid, &user_name, &group_name); 362 e_setuid_setup(&uid, &gid, &user_name, &group_name);
363 363
364 if (_check_auth(uid, pw) == 0) 364 if (_check_auth(polkit_mode ? polkit_uid : uid, pw) == 0)
365 { 365 {
366 fprintf(stderr, "AUTH: Password OK\n"); 366 fprintf(stderr, "AUTH: Password OK\n");
367 if (polkit_mode == 1) 367 if (polkit_mode == 1)