Bug 91942

Summary: simple typo in a different rule causes everything else to fail
Product: PolicyKit Reporter: muesli4
Component: daemonAssignee: David Zeuthen (not reading bugmail) <zeuthen>
Status: RESOLVED MOVED QA Contact: David Zeuthen (not reading bugmail) <zeuthen>
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description muesli4 2015-09-09 17:48:49 UTC
I just created 2 rules for udisks and NetworkManager (with priority 10 and 11), in both I had the same typo with "Action":

    polkit.addRule(function(Action, subject) {
        if (action.id == ...) {
            return polkit.Result.YES;
        }
    });

Result: For some reason I can't shutdown/suspend/hibernate but only logout. I have no other rules but '50-default.rules':
    polkit.addAdminRule(function(action, subject) {
        return ["unix-group:wheel"];
    });

Things I find problematic:
    1. I can't find the error source anywhere. (Are there logs or error messages?)
    2. Why does a single wrong rule affect all others? (did the JavaScript interpreter crash?)
Comment 1 GitLab Migration User 2018-08-20 21:35:21 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/polkit/polkit/issues/22.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.