1
0
forked from mir/linux-vm-tools

Merge pull request #40 from Microsoft/cwilhit-patch-1

Correct Polkit Policy
This commit is contained in:
Craig Wilhite 2018-05-22 15:55:36 -07:00 committed by GitHub
commit 8b41356c10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -81,19 +81,13 @@ echo "hv_sock" > /etc/modules-load.d/hv_sock.conf
fi fi
# Configure the policy xrdp session # Configure the policy xrdp session
cat >/etc/polkit-1/localauthority.conf.d/02-allow-colord.conf <<EOF cat >/etc/polkit-1/localauthority/50-local.d/45-allow-colord.pkla <<EOF
polkit.addRule(function(action, subject) { [Allow Colord all Users]
if ((action.id == "org.freedesktop.color-manager.create-device" || Identity=unix-user:*
action.id == "org.freedesktop.color-manager.modify-profile" || Action=org.freedesktop.color-manager.create-device;org.freedesktop.color-manager.create-profile;org.freedesktop.color-manager.delete-device;org.freedesktop.color-manager.delete-profile;org.freedesktop.color-manager.modify-device;org.freedesktop.color-manager.modify-profile
action.id == "org.freedesktop.color-manager.delete-device" || ResultAny=no
action.id == "org.freedesktop.color-manager.create-profile" || ResultInactive=no
action.id == "org.freedesktop.color-manager.modify-profile" || ResultActive=yes
action.id == "org.freedesktop.color-manager.delete-profile") &&
subject.isInGroup("{group}"))
{
return polkit.Result.YES;
}
});
EOF EOF
# reconfigure the service # reconfigure the service