chiark / gitweb /
bus: fix deserialization of polkit response
authorLennart Poettering <lennart@poettering.net>
Tue, 5 Nov 2013 16:45:46 +0000 (17:45 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 5 Nov 2013 16:45:46 +0000 (17:45 +0100)
src/libsystemd-bus/bus-util.c

index eec70ed..3bb1fb7 100644 (file)
@@ -178,9 +178,9 @@ int bus_verify_polkit(
                         return r;
                 }
 
-                r = sd_bus_message_read(reply, "(bb)", &authorized, &challenge);
-                if (r < 0)
-                        return r;
+                r = sd_bus_message_enter_container(reply, 'r', "bba{ss}");
+                if (r >= 0)
+                        r = sd_bus_message_read(reply, "bb", &authorized, &challenge);
 
                 if (authorized)
                         return 1;