Commit 704a31f1 authored by Raphaël Hertzog's avatar Raphaël Hertzog

Add a policykit file granting "allow_gui" annotation for X11 applications

The list in x11-apps need to be completed.
parent 17c9a183
SIZES = 16 22 24 32 48 256
NAMES = $(patsubst menu-icons/scalable/%.svg,%,$(wildcard menu-icons/scalable/*/*.svg))
all:
all: polkit-1/actions/org.kali.pkexec.policy
@$(MAKE) $(TARGETS)
polkit-1/actions/org.kali.pkexec.policy: x11-apps bin/generate-polkit
./bin/generate-polkit >polkit-1/actions/org.kali.pkexec.policy
install:
clean:
......
#!/bin/sh
cat <<-END
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
<policyconfig>
<vendor>Kali Linux</vendor>
<vendor_url>https://kali.org</vendor_url>
<icon_name>kali-menu</icon_name>
END
(while read key path; do
cat <<END
<action id="org.kali.pkexec.$key">
<description>Run $key as root</description>
<message>Authentication is required to run $path as root</message>
<defaults>
<allow_any>auth_admin</allow_any>
<allow_inactive>auth_admin</allow_inactive>
<allow_active>auth_admin</allow_active>
</defaults>
<annotate key="org.freedesktop.policykit.exec.path">$path</annotate>
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
</action>
END
done) <x11-apps
cat <<END
</policyconfig>
END
......@@ -9,7 +9,7 @@ Vcs-Browser: https://gitlab.com/kalilinux/packages/kali-menu
Package: kali-menu
Architecture: all
Depends: ${misc:Depends}, ${perl:Depends}, libdpkg-perl, libfile-fcntllock-perl, xdg-utils
Depends: ${misc:Depends}, ${perl:Depends}, policykit-1, libdpkg-perl, libfile-fcntllock-perl, xdg-utils
Breaks: dradis (<< 3.1.0~rc2)
Description: Kali Linux custom menu
This package provides a custom menu for Kali Linux.
......
......@@ -6,3 +6,4 @@ update-kali-menu usr/share/kali-menu/
menu-icons/* usr/share/icons/hicolor/
dconf/kali-menu etc/dconf/db/local.d/
exec-in-shell usr/share/kali-menu/
polkit-1/* usr/share/polkit-1/
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
<policyconfig>
<vendor>Kali Linux</vendor>
<vendor_url>https://kali.org</vendor_url>
<icon_name>kali-menu</icon_name>
<action id="org.kali.pkexec.wireshark">
<description>Run wireshark as root</description>
<message>Authentication is required to run /usr/bin/wireshark as root</message>
<defaults>
<allow_any>auth_admin</allow_any>
<allow_inactive>auth_admin</allow_inactive>
<allow_active>auth_admin</allow_active>
</defaults>
<annotate key="org.freedesktop.policykit.exec.path">/usr/bin/wireshark</annotate>
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
</action>
</policyconfig>
wireshark /usr/bin/wireshark
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment