polkit/50-default.rules
Marcus Meissner 212c482ac5 Accepting request 1112287 from home:lnussel:branches:Base:System
- change /usr/share/polkit-1/rules.d to 555,root:root. /usr content
  isn't secret anyway so this avoids non-root owned files in /usr
  (boo#1215482)
- update 50-default.rules to allow adding more admin rules
  (jsc#PED-260, drop polkit-no-wheel-group.patch)

OBS-URL: https://build.opensuse.org/request/show/1112287
OBS-URL: https://build.opensuse.org/package/show/Base:System/polkit?expand=0&rev=186
2023-09-19 15:44:51 +00:00

15 lines
524 B
Plaintext

/* make sure that users that are in an admin group always authenticate with
* their own password and don't get a choice. Users not in an admin group get
* the full choice and may also authenticate as root */
polkit._suse_admin_groups = [];
polkit.addAdminRule(function(action, subject) {
var rules = ["unix-user:0"];
for (var i in polkit._suse_admin_groups) {
var g = polkit._suse_admin_groups[i];
if (subject.isInGroup(g))
return ["unix-user:"+subject.user];
rules.push("unix-group:"+g);
}
return rules;
});