diff options
author | Ted Gould <ted@gould.cx> | 2013-08-02 10:45:39 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2013-08-02 10:45:39 -0500 |
commit | a87d8a81765ec52b2c31a560d4ee903695eaf961 (patch) | |
tree | 3ba776ade9897b46c738ea85f7960685dccb93af /data | |
parent | 1176a3bc80f9c0ae7f2026b913fe8b8df60b8bde (diff) | |
download | ayatana-greeter-session-broadcast-a87d8a81765ec52b2c31a560d4ee903695eaf961.tar.gz ayatana-greeter-session-broadcast-a87d8a81765ec52b2c31a560d4ee903695eaf961.tar.bz2 ayatana-greeter-session-broadcast-a87d8a81765ec52b2c31a560d4ee903695eaf961.zip |
Check the sender by asking who owns the name
Diffstat (limited to 'data')
-rw-r--r-- | data/unity-greeter-session-broadcast-session.conf | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/data/unity-greeter-session-broadcast-session.conf b/data/unity-greeter-session-broadcast-session.conf index 0e92905..fa1c430 100644 --- a/data/unity-greeter-session-broadcast-session.conf +++ b/data/unity-greeter-session-broadcast-session.conf @@ -6,6 +6,20 @@ task emits application-start #TODO: Check GSettings Key -start on dbus-system SIGNAL="StartApplication" INTERFACE="com.canonical.Unity.Greeter.Broadcast" SENDER="com.canonical.Unity.Greeter.Broadcast" PATH="/com/canonical/Unity/Greeter/Broadcast" ARG0=${USER} +start on dbus-system SIGNAL="StartApplication" INTERFACE="com.canonical.Unity.Greeter.Broadcast" PATH="/com/canonical/Unity/Greeter/Broadcast" ARG0=${USER} + +pre-start script + OWNER=`gdbus call --system --dest org.freedesktop.DBus --object-path / --method org.freedesktop.DBus.GetNameOwner com.canonical.Unity.Greeter.Broadcast | cut -d "'" -f 2` + + if [ -z $OWNER ] ; then + stop + exit 1 + fi + if [ $OWNER -ne $SENDER ] ; then + stop + exit 1 + fi +end script + exec initctl emit application-start APP_ID=${ARG1} |