]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
hostname: Make sure we pass error to bus_verify_polkit_async()
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 24 Aug 2023 07:00:04 +0000 (09:00 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 24 Aug 2023 09:23:01 +0000 (11:23 +0200)
Fixes #28943

src/hostname/hostnamed.c
src/shared/bus-polkit.c

index 9ef45f8e75a6c3cf1fc884312df421df59a661bb..85904aabe988c5ec1773f91dd8c40d038c4992ec 100644 (file)
@@ -1318,7 +1318,7 @@ static int method_describe(sd_bus_message *m, void *userdata, sd_bus_error *erro
                         false,
                         UID_INVALID,
                         &c->polkit_registry,
-                        NULL);
+                        error);
         if (r == 0)
                 return 1; /* No authorization for now, but the async polkit stuff will call us again when it has it */
 
index 3ff2726d4ab08a0e64b4336661007299f0851d5d..904b897984a52d7aa449bbec3ff7456c96c75d79 100644 (file)
@@ -480,6 +480,7 @@ int bus_verify_polkit_async(
         assert(call);
         assert(action);
         assert(registry);
+        assert(ret_error);
 
         r = check_good_user(call, good_user);
         if (r != 0)