From 89048d5b9f63b1fbc3d1520221500ed139dbc28b Mon Sep 17 00:00:00 2001 From: kremlin Date: Fri, 15 Aug 2014 17:44:56 -0500 Subject: [PATCH] add polkit XML policies, include them in install target all new .policy files are well formed but i am waiting for freedesktop to fix the doctype DTD file: http://thread.gmane.org/gmane.comp.freedesktop.policykit/374 --- Makefile | 3 + .../org.freedesktop.hostname1.policy | 57 +++++++++++++++++++ .../org.freedesktop.locale1.policy | 27 +++++++++ .../org.freedesktop.login1.policy | 10 ++++ .../org.freedesktop.timedate1.policy | 47 +++++++++++++++ 5 files changed, 144 insertions(+) create mode 100644 conf/polkit-policy/org.freedesktop.hostname1.policy create mode 100644 conf/polkit-policy/org.freedesktop.locale1.policy create mode 100644 conf/polkit-policy/org.freedesktop.login1.policy create mode 100644 conf/polkit-policy/org.freedesktop.timedate1.policy diff --git a/Makefile b/Makefile index 3e47048..48d3b87 100644 --- a/Makefile +++ b/Makefile @@ -45,11 +45,13 @@ CONFDIR= conf POLICYDIR= $(CONFDIR)/sysbus-policy ISPECTDIR= $(CONFDIR)/introspect-xml SERVICEFDIR= $(CONFDIR)/service-files +POLKITDIR= $(CONFDIR)/polkit-policy INTFDIR= $(SRCDIR)/interfaces DBUS_POLICYDIR= $(SYSCONFDIR)/dbus-1/system.d DBUS_CONFIGDIR= $(PREFIX)/share/dbus-1/system-services +POLKIT_POLICYDIR= $(PREFIX)/share/polkit-1/actions INVOKE_GENFILE_SCRIPT= \ ./scripts/gen-gdbus-interfaces.sh @@ -95,6 +97,7 @@ _install_conf: _generate_servicefiles ${INSTALL_DATA} $(POLICYDIR)/*-dbus.conf $(DESTDIR)$(DBUS_POLICYDIR)/ ${INSTALL_DATA} $(SERVICEFDIR)/*.service $(DESTDIR)$(DBUS_CONFIGDIR)/ ${INSTALL_DATA} $(CONFDIR)/systemd_compat.conf $(DESTDIR)$(SYSCONFDIR)/ + ${INSTALL_DATA} $(POLKITDIR)/*.policy $(DESTDIR)$(POLKIT_POLICYDIR)/ _install_interface_binaries: $(LINKHN) ${INSTALL_PROGRAM_DIR} $(DESTDIR)$(BINDIR) diff --git a/conf/polkit-policy/org.freedesktop.hostname1.policy b/conf/polkit-policy/org.freedesktop.hostname1.policy new file mode 100644 index 0000000..c36f736 --- /dev/null +++ b/conf/polkit-policy/org.freedesktop.hostname1.policy @@ -0,0 +1,57 @@ + + + + + OpenBSD + https://uglyman.kremlin.cc/gitweb/gitweb.cgi?p=systemd-utl.git + + + Set dynamic (system) hostname. + Setting the dynamic (system) hostname requires authentication. + + auth_admin_keep + auth_admin_keep + auth_admin_keep + + + + + Set static hostname. + Setting the static hostname requires authentication. + + auth_admin_keep + auth_admin_keep + auth_admin_keep + + + + + Set pretty (UTF-8) hostname. + Setting the pretty (UTF-8) hostname requires authentication. + + auth_admin_keep + auth_admin_keep + auth_admin_keep + + + + + Set system's icon name. + Setting the system's icon name requires authentication. + + auth_admin_keep + auth_admin_keep + auth_admin_keep + + + + + Set system's chassis type. + Setting the system's chassis type requires authentication. + + auth_admin_keep + auth_admin_keep + auth_admin_keep + + + diff --git a/conf/polkit-policy/org.freedesktop.locale1.policy b/conf/polkit-policy/org.freedesktop.locale1.policy new file mode 100644 index 0000000..d605267 --- /dev/null +++ b/conf/polkit-policy/org.freedesktop.locale1.policy @@ -0,0 +1,27 @@ + + + + + OpenBSD + https://uglyman.kremlin.cc/gitweb/gitweb.cgi?p=systemd-utl.git + + + Set system's locale. + Setting the system's locale requires authentication. + + auth_admin_keep + auth_admin_keep + auth_admin_keep + + + + + Set Xorg keymap. + Setting Xorg's keymap requires authentication. + + auth_admin_keep + auth_admin_keep + auth_admin_keep + + + diff --git a/conf/polkit-policy/org.freedesktop.login1.policy b/conf/polkit-policy/org.freedesktop.login1.policy new file mode 100644 index 0000000..e851a84 --- /dev/null +++ b/conf/polkit-policy/org.freedesktop.login1.policy @@ -0,0 +1,10 @@ + + + + + OpenBSD + https://uglyman.kremlin.cc/gitweb/gitweb.cgi?p=systemd-utl.git + + + + diff --git a/conf/polkit-policy/org.freedesktop.timedate1.policy b/conf/polkit-policy/org.freedesktop.timedate1.policy new file mode 100644 index 0000000..3bd95b4 --- /dev/null +++ b/conf/polkit-policy/org.freedesktop.timedate1.policy @@ -0,0 +1,47 @@ + + + + + OpenBSD + https://uglyman.kremlin.cc/gitweb/gitweb.cgi?p=systemd-utl.git + + + Set system time. + Setting the system time requires authentication. + + auth_admin_keep + auth_admin_keep + auth_admin_keep + + + + + Set local timezone. + Setting the timezone requires authentication. + + auth_admin_keep + auth_admin_keep + auth_admin_keep + + + + + Switch RTC between UTC and local time. + Switching to the system's real time clock source requires authentication. + + auth_admin_keep + auth_admin_keep + auth_admin_keep + + + + + Toggle clock synchronization through NTP. + Toggling NTP requires authentication. + + auth_admin_keep + auth_admin_keep + auth_admin_keep + + + -- 2.41.0