diff options
Diffstat (limited to 'source/l/polkit')
-rw-r--r-- | source/l/polkit/10-org.freedesktop.NetworkManager.rules | 7 | ||||
-rw-r--r-- | source/l/polkit/20-plugdev-group-mount-override.rules | 16 | ||||
-rw-r--r-- | source/l/polkit/doinst.sh | 3 | ||||
-rwxr-xr-x | source/l/polkit/polkit.SlackBuild | 12 |
4 files changed, 9 insertions, 29 deletions
diff --git a/source/l/polkit/10-org.freedesktop.NetworkManager.rules b/source/l/polkit/10-org.freedesktop.NetworkManager.rules deleted file mode 100644 index 9d6557b3b..000000000 --- a/source/l/polkit/10-org.freedesktop.NetworkManager.rules +++ /dev/null @@ -1,7 +0,0 @@ -polkit.addRule(function(action, subject) { - if (action.id.indexOf("org.freedesktop.NetworkManager.") == 0 && - subject.isInGroup("netdev")) { - return polkit.Result.YES; - } -}); - diff --git a/source/l/polkit/20-plugdev-group-mount-override.rules b/source/l/polkit/20-plugdev-group-mount-override.rules deleted file mode 100644 index c47a66cf2..000000000 --- a/source/l/polkit/20-plugdev-group-mount-override.rules +++ /dev/null @@ -1,16 +0,0 @@ -/* http://udisks.freedesktop.org/docs/latest/udisks-polkit-actions.html */ - -polkit.addRule(function(action, subject) { - if (action.id == "org.freedesktop.udisks2.filesystem-mount" && - subject.isInGroup("plugdev")) { - return polkit.Result.YES; - } -}); - -polkit.addRule(function(action, subject) { - if (action.id == "org.freedesktop.udisks2.eject-media" && - subject.isInGroup("plugdev")) { - return polkit.Result.YES; - } -}); - diff --git a/source/l/polkit/doinst.sh b/source/l/polkit/doinst.sh index ebcfef748..3d81307e8 100644 --- a/source/l/polkit/doinst.sh +++ b/source/l/polkit/doinst.sh @@ -9,8 +9,7 @@ config() { fi # Otherwise, we leave the .new copy for the admin to consider... } -config etc/polkit-1/rules.d/20-plugdev-group-mount-override.rules.new -config etc/polkit-1/rules.d/10-org.freedesktop.NetworkManager.rules.new + if [ -r etc/pam.d/polkit-1.new ]; then config etc/pam.d/polkit-1.new fi diff --git a/source/l/polkit/polkit.SlackBuild b/source/l/polkit/polkit.SlackBuild index 0c12c80a6..b292b7987 100755 --- a/source/l/polkit/polkit.SlackBuild +++ b/source/l/polkit/polkit.SlackBuild @@ -26,7 +26,7 @@ cd $(dirname $0) ; CWD=$(pwd) PKGNAM=polkit VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} -BUILD=${BUILD:-2} +BUILD=${BUILD:-3} # Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then @@ -144,9 +144,13 @@ rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la # actually used for anything later. Perms don't matter. mkdir -p $PKG/var/lib/polkit -# Add default policy files for udisks2 and NetworkManager events: -cat $CWD/10-org.freedesktop.NetworkManager.rules > $PKG/etc/polkit-1/rules.d/10-org.freedesktop.NetworkManager.rules.new -cat $CWD/20-plugdev-group-mount-override.rules > $PKG/etc/polkit-1/rules.d/20-plugdev-group-mount-override.rules.new +# Move dbus configs to system location: +mkdir -p $PKG/usr/share/dbus-1/system.d/ +mv $PKG/etc/dbus-1/system.d/* $PKG/usr/share/dbus-1/system.d/ +rmdir --parents $PKG/etc/dbus-1/system.d/ + +# Leave the /etc/polkit-1/rules.d/ dir in place, but move the config(s) +mv $PKG/etc/polkit-1/rules.d/* $PKG/usr/share/polkit-1/rules.d/ if [ ! -z "$PAM_OPTIONS" ]; then # Make the PAM file .new: |