bu5hm4n pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=4475eb42a6a5ac3cf92166c4283b0b8391ce0581

commit 4475eb42a6a5ac3cf92166c4283b0b8391ce0581
Author: Marcel Hollerbach <mar...@osg.samsung.com>
Date:   Mon May 25 14:39:25 2020 +0200

    e_ckpasswd_main: fix polkit to auth root
    
    there were the wrong pids passed.
    This fixes calls like "systemctl start docker".
---
 src/bin/e_ckpasswd_main.c | 4 ++--
 1 file 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)
    if (!m) BARF("Cannot get method call: AuthenticationAgentResponse2");
    iter = eldbus_message_iter_get(m);
    if (!iter) BARF("Cannot set iter on proxy");
-   if (!eldbus_message_iter_arguments_append(iter, "us", auth_uid, cookie))
+   if (!eldbus_message_iter_arguments_append(iter, "us", uid, cookie))
      BARF("Cannot append 'us' args");
    if (!eldbus_message_iter_arguments_append(iter, "(sa{sv})", &subj))
      BARF("Cannot append '(sa{sv})' args");
@@ -360,7 +360,7 @@ main(int argc, char **argv)
    // ok to fail - auth will just possibly fail then
    e_setuid_setup(&uid, &gid, &user_name, &group_name);
 
-   if (_check_auth(uid, pw) == 0)
+   if (_check_auth(polkit_mode ? polkit_uid : uid, pw) == 0)
      {
         fprintf(stderr, "AUTH: Password OK\n");
         if (polkit_mode == 1)

-- 


Reply via email to