remember to set uid on PolKitSession
authorDavid Zeuthen <davidz@redhat.com>
Tue, 23 Oct 2007 23:38:00 +0000 (19:38 -0400)
committerDavid Zeuthen <davidz@redhat.com>
Tue, 23 Oct 2007 23:38:00 +0000 (19:38 -0400)
polkit-dbus/polkit-dbus.c

index 5ac8457..d7c1f8c 100644 (file)
@@ -220,6 +220,11 @@ polkit_session_new_from_objpath (DBusConnection *con, const char *objpath, uid_t
         if (session == NULL) {
                 goto out;
         }
+        if (!polkit_session_set_uid (session, uid)) {
+                polkit_session_unref (session);
+                session = NULL;
+                goto out;
+        }
         if (!polkit_session_set_ck_objref (session, objpath)) {
                 polkit_session_unref (session);
                 session = NULL;