diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2017-10-27 01:13:52 +0000 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2017-10-27 01:17:08 +0000 |
commit | 01876018ef6af29a28a82c802fcc5de959e8109b (patch) | |
tree | 5e7d418d40038025b9bb16ef8be3908b811674bb /data | |
parent | bc4bedc29d859040bc6ba052a5212a14a15c3578 (diff) | |
download | ayatana-indicator-sound-01876018ef6af29a28a82c802fcc5de959e8109b.tar.gz ayatana-indicator-sound-01876018ef6af29a28a82c802fcc5de959e8109b.tar.bz2 ayatana-indicator-sound-01876018ef6af29a28a82c802fcc5de959e8109b.zip |
data/org.ayatana.AccountsService.Sound: Use Ayatana namespace.
* Namespace switch from com.ubuntu to org.ayatana.
* Add AccountsServer interface for the greeter.
Obtained from accountsservice-ubuntu-schemas and adapted.
Diffstat (limited to 'data')
-rw-r--r-- | data/50-org.ayatana.AccountsService.Sound.pkla | 13 | ||||
-rw-r--r-- | data/CMakeLists.txt | 28 | ||||
-rw-r--r-- | data/org.ayatana.AccountsService.Sound.policy | 24 | ||||
-rw-r--r-- | data/org.ayatana.AccountsService.Sound.xml | 27 |
4 files changed, 89 insertions, 3 deletions
diff --git a/data/50-org.ayatana.AccountsService.Sound.pkla b/data/50-org.ayatana.AccountsService.Sound.pkla new file mode 100644 index 0000000..ac58f75 --- /dev/null +++ b/data/50-org.ayatana.AccountsService.Sound.pkla @@ -0,0 +1,13 @@ +[Allow greeter to set fields] +Identity=unix-user:lightdm +Action=org.ayatana.AccountsService.GreeterChangeAny +ResultAny=no +ResultInactive=yes +ResultActive=yes + +[Allow greeter to read fields] +Identity=unix-user:lightdm +Action=org.ayatana.AccountsService.GreeterReadAny +ResultAny=yes +ResultInactive=yes +ResultActive=yes diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt index a9ebf55..b99fff4 100644 --- a/data/CMakeLists.txt +++ b/data/CMakeLists.txt @@ -121,9 +121,9 @@ if(NOT EXISTS /usr/share/glib-2.0/schemas/com.ubuntu.sound.gschema.xml) add_schema ("org.ayatana.sound.gschema.xml") endif() -########################### -# Accounts Service -########################### +######################################### +# Accounts Service Iface: Sound Indicator +######################################### set(POLKIT_LIB_DIR "${CMAKE_INSTALL_LOCALSTATEDIR}/lib/polkit-1") @@ -148,3 +148,25 @@ DESTINATION "${POLKIT_DATA_DIR}/actions" install(FILES 50-org.ayatana.indicator.sound.AccountsService.pkla DESTINATION "${POLKIT_LIB_DIR}/localauthority/10-vendor.d" ) + +####################################### +# Accounts Service Iface: Greeter Sound +####################################### + +install(FILES org.ayatana.AccountsService.Sound.xml + DESTINATION "${DBUS_IFACE_DIR}" +) + +# Create accountsservice symlink for above dbus interface +install(CODE " + execute_process(COMMAND mkdir -p \"\$ENV{DESTDIR}${ACCOUNTS_IFACE_DIR}\") + execute_process(COMMAND ln -sf ../../dbus-1/interfaces/org.ayatana.AccountsService.Sound.xml \"\$ENV{DESTDIR}${ACCOUNTS_IFACE_DIR}\") +") + +install(FILES org.ayatana.AccountsService.Sound.policy +DESTINATION "${POLKIT_DATA_DIR}/actions" +) + +install(FILES 50-org.ayatana.AccountsService.Sound.pkla +DESTINATION "${POLKIT_LIB_DIR}/localauthority/10-vendor.d" +) diff --git a/data/org.ayatana.AccountsService.Sound.policy b/data/org.ayatana.AccountsService.Sound.policy new file mode 100644 index 0000000..7140498 --- /dev/null +++ b/data/org.ayatana.AccountsService.Sound.policy @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<policyconfig> + <!-- Same as org.freedesktop.accounts.user-administration, but we override + settings for the lightdm user in a pkla file. --> + <action id="org.ayatana.AccountsService.GreeterChangeAny"> + <defaults> + <allow_any>no</allow_any> + <allow_inactive>no</allow_inactive> + <allow_active>auth_admin_keep</allow_active> + </defaults> + </action> + + <!-- Normally anyone can read these, but for a little bit extra lock down, + disallow all access, but we'll let the lightdm user read them via the + pkla override. --> + <action id="org.ayatana.AccountsService.GreeterReadAny"> + <defaults> + <allow_any>no</allow_any> + <allow_inactive>no</allow_inactive> + <allow_active>no</allow_active> + </defaults> + </action> +</policyconfig> diff --git a/data/org.ayatana.AccountsService.Sound.xml b/data/org.ayatana.AccountsService.Sound.xml new file mode 100644 index 0000000..bfbdd09 --- /dev/null +++ b/data/org.ayatana.AccountsService.Sound.xml @@ -0,0 +1,27 @@ +<node> + <interface name="org.ayatana.AccountsService.Sound"> + + <annotation name="org.freedesktop.Accounts.VendorExtension" value="true"/> + + <annotation name="org.freedesktop.Accounts.Authentication.ChangeAny" + value="org.ayatana.AccountsService.GreeterChangeAny"/> + + <annotation name="org.freedesktop.Accounts.Authentication.ReadAny" + value="org.ayatana.AccountsService.GreeterReadAny"/> + + <property name="Volume" type="d" access="readwrite"> + <annotation name="org.freedesktop.Accounts.DefaultValue" value="-1.0"/> + </property> + + <!-- Muted is all sound, SilentMode is only non-user-initiated sounds --> + <property name="Muted" type="b" access="readwrite"> + <annotation name="org.freedesktop.Accounts.DefaultValue" value="false"/> + </property> + + <property name="LastRunningPlayer" type="s" access="readwrite"> + <annotation name="org.freedesktop.Accounts.DefaultValue.String" + value=""/> + </property> + + </interface> +</node> |