aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkremlin <ian@kremlin.cc>2014-08-18 14:32:14 +0800
committerkremlin <ian@kremlin.cc>2014-08-18 14:32:14 +0800
commit5fd84921e6fd01982c6af915aa2129711de5e20b (patch)
tree16112a15e353ea2eb27d5452da742ac039033f40
parent6031a90d2184c5a010773fdb49dfca1fbeee14a5 (diff)
downloadsystembsd-5fd84921e6fd01982c6af915aa2129711de5e20b.tar
systembsd-5fd84921e6fd01982c6af915aa2129711de5e20b.tar.gz
systembsd-5fd84921e6fd01982c6af915aa2129711de5e20b.tar.bz2
systembsd-5fd84921e6fd01982c6af915aa2129711de5e20b.tar.lz
systembsd-5fd84921e6fd01982c6af915aa2129711de5e20b.tar.xz
systembsd-5fd84921e6fd01982c6af915aa2129711de5e20b.tar.zst
systembsd-5fd84921e6fd01982c6af915aa2129711de5e20b.zip
change polkit action names to match systemd's exactly
gnome-control-center has polkit rules which refer explicitly to action names we need to match for it to work with our code properly
-rw-r--r--conf/polkit-policy/org.freedesktop.hostname1.policy10
-rw-r--r--conf/polkit-policy/org.freedesktop.locale1.policy4
-rw-r--r--conf/polkit-policy/org.freedesktop.timedate1.policy8
-rw-r--r--src/interfaces/hostnamed/hostnamed.c10
4 files changed, 16 insertions, 16 deletions
diff --git a/conf/polkit-policy/org.freedesktop.hostname1.policy b/conf/polkit-policy/org.freedesktop.hostname1.policy
index c36f736..2ea55b4 100644
--- a/conf/polkit-policy/org.freedesktop.hostname1.policy
+++ b/conf/polkit-policy/org.freedesktop.hostname1.policy
@@ -5,7 +5,7 @@
<vendor>OpenBSD</vendor>
<vendor_url>https://uglyman.kremlin.cc/gitweb/gitweb.cgi?p=systemd-utl.git</vendor_url> <!-- TODO change or redirect this URL when we rebase -->
- <action id="org.freedesktop.hostname1.SetHostname">
+ <action id="org.freedesktop.hostname1.set-hostname">
<description>Set dynamic (system) hostname.</description>
<message>Setting the dynamic (system) hostname requires authentication.</message>
<defaults>
@@ -15,7 +15,7 @@
</defaults>
</action>
- <action id="org.freedesktop.hostname1.SetStaticHostname">
+ <action id="org.freedesktop.hostname1.set-static-hostname">
<description>Set static hostname.</description>
<message>Setting the static hostname requires authentication.</message>
<defaults>
@@ -25,7 +25,7 @@
</defaults>
</action>
- <action id="org.freedesktop.hostname1.SetPrettyHostname">
+ <action id="org.freedesktop.hostname1.set-pretty-hostname">
<description>Set pretty (UTF-8) hostname.</description>
<message>Setting the pretty (UTF-8) hostname requires authentication.</message>
<defaults>
@@ -35,7 +35,7 @@
</defaults>
</action>
- <action id="org.freedesktop.hostname1.SetIconName">
+ <action id="org.freedesktop.hostname1.set-icon-name">
<description>Set system's icon name.</description>
<message>Setting the system's icon name requires authentication.</message>
<defaults>
@@ -45,7 +45,7 @@
</defaults>
</action>
- <action id="org.freedesktop.hostname1.SetChassis">
+ <action id="org.freedesktop.hostname1.set-chassis">
<description>Set system's chassis type.</description>
<message>Setting the system's chassis type requires authentication.</message>
<defaults>
diff --git a/conf/polkit-policy/org.freedesktop.locale1.policy b/conf/polkit-policy/org.freedesktop.locale1.policy
index d605267..4430e9c 100644
--- a/conf/polkit-policy/org.freedesktop.locale1.policy
+++ b/conf/polkit-policy/org.freedesktop.locale1.policy
@@ -5,7 +5,7 @@
<vendor>OpenBSD</vendor>
<vendor_url>https://uglyman.kremlin.cc/gitweb/gitweb.cgi?p=systemd-utl.git</vendor_url> <!-- TODO change or redirect this URL when we rebase -->
- <action id="org.freedesktop.locale1.SetLocale">
+ <action id="org.freedesktop.locale1.set-locale">
<description>Set system's locale.</description>
<message>Setting the system's locale requires authentication.</message>
<defaults>
@@ -15,7 +15,7 @@
</defaults>
</action>
- <action id="org.freedesktop.locale1.SetX11Keyboard">
+ <action id="org.freedesktop.locale1.set-keyboard">
<description>Set Xorg keymap.</description>
<message>Setting Xorg's keymap requires authentication.</message>
<defaults>
diff --git a/conf/polkit-policy/org.freedesktop.timedate1.policy b/conf/polkit-policy/org.freedesktop.timedate1.policy
index 3bd95b4..f15371a 100644
--- a/conf/polkit-policy/org.freedesktop.timedate1.policy
+++ b/conf/polkit-policy/org.freedesktop.timedate1.policy
@@ -5,7 +5,7 @@
<vendor>OpenBSD</vendor>
<vendor_url>https://uglyman.kremlin.cc/gitweb/gitweb.cgi?p=systemd-utl.git</vendor_url> <!-- TODO change or redirect this URL when we rebase -->
- <action id="org.freedesktop.timedate1.SetTime">
+ <action id="org.freedesktop.timedate1.set-time">
<description>Set system time.</description>
<message>Setting the system time requires authentication.</message>
<defaults>
@@ -15,7 +15,7 @@
</defaults>
</action>
- <action id="org.freedesktop.timedate1.SetTimezone">
+ <action id="org.freedesktop.timedate1.set-timezone">
<description>Set local timezone.</description>
<message>Setting the timezone requires authentication.</message>
<defaults>
@@ -25,7 +25,7 @@
</defaults>
</action>
- <action id="org.freedesktop.timedate1.SetLocalRTC">
+ <action id="org.freedesktop.timedate1.set-local-rtc">
<description>Switch RTC between UTC and local time.</description>
<message>Switching to the system's real time clock source requires authentication.</message>
<defaults>
@@ -35,7 +35,7 @@
</defaults>
</action>
- <action id="org.freedesktop.timedate1.SetNTP">
+ <action id="org.freedesktop.timedate1.set-ntp">
<description>Toggle clock synchronization through NTP.</description>
<message>Toggling NTP requires authentication.</message>
<defaults>
diff --git a/src/interfaces/hostnamed/hostnamed.c b/src/interfaces/hostnamed/hostnamed.c
index 3dae12c..3f63e0a 100644
--- a/src/interfaces/hostnamed/hostnamed.c
+++ b/src/interfaces/hostnamed/hostnamed.c
@@ -133,7 +133,7 @@ on_handle_set_hostname(Hostname1 *hn1_passed_interf,
bus_name = g_dbus_method_invocation_get_sender(invoc);
/* verify caller has correct permissions via polkit */
- is_authed = polkit_try_auth(bus_name, "org.freedesktop.hostname1.SetHostname", policykit_auth);
+ is_authed = polkit_try_auth(bus_name, "org.freedesktop.hostname1.set-hostname", policykit_auth);
switch(is_authed) {
@@ -210,7 +210,7 @@ on_handle_set_static_hostname(Hostname1 *hn1_passed_interf,
bus_name = g_dbus_method_invocation_get_sender(invoc);
/* verify caller has correct permissions via polkit */
- is_authed = polkit_try_auth(bus_name, "org.freedesktop.hostname1.SetStaticHostname", policykit_auth);
+ is_authed = polkit_try_auth(bus_name, "org.freedesktop.hostname1.set-static-hostname", policykit_auth);
switch(is_authed) {
@@ -289,7 +289,7 @@ on_handle_set_pretty_hostname(Hostname1 *hn1_passed_interf,
bus_name = g_dbus_method_invocation_get_sender(invoc);
/* verify caller has correct permissions via polkit */
- is_authed = polkit_try_auth(bus_name, "org.freedesktop.hostname1.SetPrettyHostname", policykit_auth);
+ is_authed = polkit_try_auth(bus_name, "org.freedesktop.hostname1.set-pretty-hostname", policykit_auth);
switch(is_authed) {
@@ -389,7 +389,7 @@ on_handle_set_chassis(Hostname1 *hn1_passed_interf,
g_strlcpy(valid_chassis_name_buf, proposed_chassis_name, (gsize)64);
/* verify caller has correct permissions via polkit */
- is_authed = polkit_try_auth(bus_name, "org.freedesktop.hostname1.SetChassis", policykit_auth);
+ is_authed = polkit_try_auth(bus_name, "org.freedesktop.hostname1.set-chassis", policykit_auth);
switch(is_authed) {
@@ -473,7 +473,7 @@ on_handle_set_icon_name(Hostname1 *hn1_passed_interf,
bus_name = g_dbus_method_invocation_get_sender(invoc);
/* verify caller has correct permissions via polkit */
- is_authed = polkit_try_auth(bus_name, "org.freedesktop.hostname1.SetIconName", policykit_auth);
+ is_authed = polkit_try_auth(bus_name, "org.freedesktop.hostname1.set-icon-name", policykit_auth);
switch(is_authed) {