~ubuntu-branches/debian/jessie/systemd/jessie

« back to all changes in this revision

Viewing changes to src/polkit.c

  • Committer: Package Import Robot
  • Author(s): Tollef Fog Heen, Tollef Fog Heen, Michael Biebl
  • Date: 2012-04-03 19:59:17 UTC
  • mfrom: (1.1.10) (6.1.3 experimental)
  • Revision ID: package-import@ubuntu.com-20120403195917-l532urrbg4pkreas
Tags: 44-1
[ Tollef Fog Heen ]
* New upstream version.
  - Backport 3492207: journal: PAGE_SIZE is not known on ppc and other
    archs
  - Backport 5a2a2a1: journal: react with immediate rotation to a couple
    of more errors
  - Backport 693ce21: util: never follow symlinks in rm_rf_children()
    Fixes CVE-2012-1174, closes: #664364
* Drop output message from init-functions hook, it's pointless.
* Only rmdir /lib/init/rw if it exists.
* Explicitly order debian-fixup before sysinit.target to prevent a
  possible race condition with the creation of sockets.  Thanks to
  Michael Biebl for debugging this.
* Always restart the initctl socket on upgrades, to mask sysvinit
  removing it.

[ Michael Biebl ]
* Remove workaround for non-interactive sessions from pam config again.
* Create compat /dev/initctl symlink in case we are upgrading from a system
  running a newer version of sysvinit (using /run/initctl) and sysvinit is
  replaced with systemd-sysv during the upgrade. Closes: #663219
* Install new man pages.
* Build-Depend on valac (>= 0.12) instead of valac-0.12. Closes: #663323

Show diffs side-by-side

added added

removed removed

Lines of Context:
82
82
                DBusMessage *request,
83
83
                const char *action,
84
84
                bool interactive,
 
85
                bool *_challenge,
85
86
                DBusError *error) {
86
87
 
87
88
        DBusMessage *m = NULL, *reply = NULL;
94
95
        uint64_t starttime_u64;
95
96
        DBusMessageIter iter_msg, iter_struct, iter_array, iter_dict, iter_variant;
96
97
        int r;
97
 
        dbus_bool_t authorized = FALSE;
 
98
        dbus_bool_t authorized = FALSE, challenge = FALSE;
98
99
 
99
100
        assert(c);
100
101
        assert(request);
176
177
 
177
178
        dbus_message_iter_get_basic(&iter_struct, &authorized);
178
179
 
179
 
        r = authorized ? 0 : -EPERM;
 
180
        if (!dbus_message_iter_next(&iter_struct) ||
 
181
            dbus_message_iter_get_arg_type(&iter_struct) != DBUS_TYPE_BOOLEAN) {
 
182
                r = -EIO;
 
183
                goto finish;
 
184
        }
 
185
 
 
186
        dbus_message_iter_get_basic(&iter_struct, &challenge);
 
187
 
 
188
        if (authorized)
 
189
                r = 1;
 
190
        else if (_challenge) {
 
191
                *_challenge = !!challenge;
 
192
                r = 0;
 
193
        } else
 
194
                r = -EPERM;
180
195
 
181
196
finish:
182
197