diff options
author | Robert Ancell <robert.ancell@canonical.com> | 2014-06-05 15:49:01 +1200 |
---|---|---|
committer | Robert Ancell <robert.ancell@canonical.com> | 2014-06-05 15:49:01 +1200 |
commit | 7cd8ee397478c96d850ae957c9841dd6b72d8f78 (patch) | |
tree | d526b7b4928b7ba7400f998d404a7c38c83c48d4 | |
parent | 3353ba6cf0618391dfa875056582b50864858e20 (diff) | |
download | lightdm-7cd8ee397478c96d850ae957c9841dd6b72d8f78.tar.gz |
Check logind session is correct in tests for lock/unlock
30 files changed, 50 insertions, 42 deletions
diff --git a/tests/scripts/lock-seat-resettable.conf b/tests/scripts/lock-seat-resettable.conf index 94bc6729..0bf3e5bc 100644 --- a/tests/scripts/lock-seat-resettable.conf +++ b/tests/scripts/lock-seat-resettable.conf @@ -53,7 +53,7 @@ resettable=true #?SESSION-X-1 LOCK-SEAT # Back to greeter -#?LOGIN1 LOCK-SESSION +#?LOGIN1 LOCK-SESSION SESSION=c1 #?GREETER-X-0 RESET #?GREETER-X-0 LOCK-HINT #?VT ACTIVATE VT=7 diff --git a/tests/scripts/lock-seat-return-session.conf b/tests/scripts/lock-seat-return-session.conf index 3b28e7e7..caa39ea3 100644 --- a/tests/scripts/lock-seat-return-session.conf +++ b/tests/scripts/lock-seat-return-session.conf @@ -36,7 +36,7 @@ user-session=default #?XSERVER-1 ACCEPT-CONNECT # Session is locked -#?LOGIN1 LOCK-SESSION +#?LOGIN1 LOCK-SESSION SESSION=c0 # Greeter starts #?GREETER-X-1 START XDG_SEAT=seat0 XDG_VTNR=8 XDG_SESSION_CLASS=greeter @@ -58,7 +58,7 @@ user-session=default #?*GREETER-X-1 START-SESSION # Old session is unlocked -#?LOGIN1 UNLOCK-SESSION +#?LOGIN1 UNLOCK-SESSION SESSION=c0 # Return to session #?LOGIN1 ACTIVATE-SESSION SESSION=c0 diff --git a/tests/scripts/lock-seat.conf b/tests/scripts/lock-seat.conf index e2d1999c..a1967a51 100644 --- a/tests/scripts/lock-seat.conf +++ b/tests/scripts/lock-seat.conf @@ -36,7 +36,7 @@ user-session=default #?XSERVER-1 ACCEPT-CONNECT # Session is locked -#?LOGIN1 LOCK-SESSION +#?LOGIN1 LOCK-SESSION SESSION=c0 # Greeter starts #?GREETER-X-1 START XDG_SEAT=seat0 XDG_VTNR=8 XDG_SESSION_CLASS=greeter diff --git a/tests/scripts/lock-session-no-password.conf b/tests/scripts/lock-session-no-password.conf index 9bfbd224..726bf785 100644 --- a/tests/scripts/lock-session-no-password.conf +++ b/tests/scripts/lock-session-no-password.conf @@ -36,7 +36,7 @@ user-session=default #?XSERVER-1 ACCEPT-CONNECT # Session is locked -#?LOGIN1 LOCK-SESSION +#?LOGIN1 LOCK-SESSION SESSION=c0 # Greeter starts with session user selected #?GREETER-X-1 START XDG_SEAT=seat0 XDG_VTNR=8 XDG_SESSION_CLASS=greeter diff --git a/tests/scripts/lock-session-resettable.conf b/tests/scripts/lock-session-resettable.conf index 09afb562..21a1bc7f 100644 --- a/tests/scripts/lock-session-resettable.conf +++ b/tests/scripts/lock-session-resettable.conf @@ -53,7 +53,7 @@ resettable=true #?SESSION-X-1 LOCK-SESSION # Back to greeter with session user selected -#?LOGIN1 LOCK-SESSION +#?LOGIN1 LOCK-SESSION SESSION=c1 #?GREETER-X-0 RESET #?GREETER-X-0 SELECT-USER-HINT USERNAME=no-password1 #?GREETER-X-0 LOCK-HINT diff --git a/tests/scripts/lock-session-return-session.conf b/tests/scripts/lock-session-return-session.conf index 7c734a6d..ce8c46fe 100644 --- a/tests/scripts/lock-session-return-session.conf +++ b/tests/scripts/lock-session-return-session.conf @@ -36,7 +36,7 @@ user-session=default #?XSERVER-1 ACCEPT-CONNECT # Session is locked -#?LOGIN1 LOCK-SESSION +#?LOGIN1 LOCK-SESSION SESSION=c0 # Greeter starts with session user selected #?GREETER-X-1 START XDG_SEAT=seat0 XDG_VTNR=8 XDG_SESSION_CLASS=greeter @@ -59,7 +59,7 @@ user-session=default #?*GREETER-X-1 START-SESSION # Existing session is unlocked -#?LOGIN1 UNLOCK-SESSION +#?LOGIN1 UNLOCK-SESSION SESSION=c0 # Return to session #?LOGIN1 ACTIVATE-SESSION SESSION=c0 diff --git a/tests/scripts/lock-session.conf b/tests/scripts/lock-session.conf index b6c1c25b..c274a445 100644 --- a/tests/scripts/lock-session.conf +++ b/tests/scripts/lock-session.conf @@ -36,7 +36,7 @@ user-session=default #?XSERVER-1 ACCEPT-CONNECT # Session is locked -#?LOGIN1 LOCK-SESSION +#?LOGIN1 LOCK-SESSION SESSION=c0 # Greeter starts with session user selected #?GREETER-X-1 START XDG_SEAT=seat0 XDG_VTNR=8 XDG_SESSION_CLASS=greeter diff --git a/tests/scripts/switch-to-greeter-new-session.conf b/tests/scripts/switch-to-greeter-new-session.conf index 9920e4a1..73427a4a 100644 --- a/tests/scripts/switch-to-greeter-new-session.conf +++ b/tests/scripts/switch-to-greeter-new-session.conf @@ -36,7 +36,7 @@ user-session=default #?XSERVER-1 ACCEPT-CONNECT # Session is locked -#?LOGIN1 LOCK-SESSION +#?LOGIN1 LOCK-SESSION SESSION=c0 # Greeter starts #?GREETER-X-1 START XDG_SEAT=seat0 XDG_VTNR=8 XDG_SESSION_CLASS=greeter diff --git a/tests/scripts/switch-to-greeter-resettable.conf b/tests/scripts/switch-to-greeter-resettable.conf index 4bd0756e..7f35f118 100644 --- a/tests/scripts/switch-to-greeter-resettable.conf +++ b/tests/scripts/switch-to-greeter-resettable.conf @@ -56,7 +56,7 @@ resettable=true #?RUNNER SWITCH-TO-GREETER # Session is locked -#?LOGIN1 LOCK-SESSION +#?LOGIN1 LOCK-SESSION SESSION=c1 # Switch to greeter #?LOGIN1 ACTIVATE-SESSION SESSION=c0 diff --git a/tests/scripts/switch-to-greeter-return-session-logout.conf b/tests/scripts/switch-to-greeter-return-session-logout.conf index be9fd58e..4d29c2c5 100644 --- a/tests/scripts/switch-to-greeter-return-session-logout.conf +++ b/tests/scripts/switch-to-greeter-return-session-logout.conf @@ -36,7 +36,7 @@ user-session=default #?XSERVER-1 ACCEPT-CONNECT # Session is locked -#?LOGIN1 LOCK-SESSION +#?LOGIN1 LOCK-SESSION SESSION=c0 # Greeter starts #?GREETER-X-1 START XDG_SEAT=seat0 XDG_VTNR=8 XDG_SESSION_CLASS=greeter @@ -57,7 +57,7 @@ user-session=default #?*GREETER-X-1 START-SESSION # Session is unlocked -#?LOGIN1 UNLOCK-SESSION +#?LOGIN1 UNLOCK-SESSION SESSION=c0 # Switch to session #?LOGIN1 ACTIVATE-SESSION SESSION=c0 diff --git a/tests/scripts/switch-to-greeter-return-session-pam.conf b/tests/scripts/switch-to-greeter-return-session-pam.conf index 9498c571..ea2c2e3d 100644 --- a/tests/scripts/switch-to-greeter-return-session-pam.conf +++ b/tests/scripts/switch-to-greeter-return-session-pam.conf @@ -46,7 +46,7 @@ log-events=true #?XSERVER-1 ACCEPT-CONNECT # Session is locked -#?LOGIN1 LOCK-SESSION +#?LOGIN1 LOCK-SESSION SESSION=c0 # Create PAM session for greeter #?PAM-lightdm START SERVICE=lightdm-greeter USER=lightdm @@ -79,7 +79,7 @@ log-events=true #?PAM-have-password1 END # Session is unlocked -#?LOGIN1 UNLOCK-SESSION +#?LOGIN1 UNLOCK-SESSION SESSION=c0 # Switch to session #?LOGIN1 ACTIVATE-SESSION SESSION=c0 diff --git a/tests/scripts/switch-to-greeter-return-session.conf b/tests/scripts/switch-to-greeter-return-session.conf index e3d9ea0d..292aa77f 100644 --- a/tests/scripts/switch-to-greeter-return-session.conf +++ b/tests/scripts/switch-to-greeter-return-session.conf @@ -36,7 +36,7 @@ user-session=default #?XSERVER-1 ACCEPT-CONNECT # Session is locked -#?LOGIN1 LOCK-SESSION +#?LOGIN1 LOCK-SESSION SESSION=c0 # Greeter starts #?GREETER-X-1 START XDG_SEAT=seat0 XDG_VTNR=8 XDG_SESSION_CLASS=greeter @@ -57,7 +57,7 @@ user-session=default #?*GREETER-X-1 START-SESSION # Session is unlocked -#?LOGIN1 UNLOCK-SESSION +#?LOGIN1 UNLOCK-SESSION SESSION=c0 # Switch to session #?LOGIN1 ACTIVATE-SESSION SESSION=c0 diff --git a/tests/scripts/switch-to-greeter.conf b/tests/scripts/switch-to-greeter.conf index dd52b035..d91bae5a 100644 --- a/tests/scripts/switch-to-greeter.conf +++ b/tests/scripts/switch-to-greeter.conf @@ -36,7 +36,7 @@ user-session=default #?XSERVER-1 ACCEPT-CONNECT # Session is locked -#?LOGIN1 LOCK-SESSION +#?LOGIN1 LOCK-SESSION SESSION=c0 # Greeter starts #?GREETER-X-1 START XDG_SEAT=seat0 XDG_VTNR=8 XDG_SESSION_CLASS=greeter diff --git a/tests/scripts/switch-to-guest-fail-resettable.conf b/tests/scripts/switch-to-guest-fail-resettable.conf index 7242950e..655e4d77 100644 --- a/tests/scripts/switch-to-guest-fail-resettable.conf +++ b/tests/scripts/switch-to-guest-fail-resettable.conf @@ -65,7 +65,7 @@ resettable=true # (guest account attempts to start and fails) # Back to greeter -#?LOGIN1 LOCK-SESSION +#?LOGIN1 LOCK-SESSION SESSION=c1 #?GREETER-X-0 RESET #?GREETER-X-0 SELECT-GUEST-HINT #?VT ACTIVATE VT=7 diff --git a/tests/scripts/switch-to-guest.conf b/tests/scripts/switch-to-guest.conf index 61a25252..b993af77 100644 --- a/tests/scripts/switch-to-guest.conf +++ b/tests/scripts/switch-to-guest.conf @@ -37,7 +37,7 @@ user-session=default #?XSERVER-1 ACCEPT-CONNECT # Session is locked -#?LOGIN1 LOCK-SESSION +#?LOGIN1 LOCK-SESSION SESSION=c0 # Guest account created #?GUEST-ACCOUNT ADD USERNAME=guest-.* diff --git a/tests/scripts/switch-to-user-existing-no-password.conf b/tests/scripts/switch-to-user-existing-no-password.conf index 69d9b7ae..ba80414b 100644 --- a/tests/scripts/switch-to-user-existing-no-password.conf +++ b/tests/scripts/switch-to-user-existing-no-password.conf @@ -37,7 +37,7 @@ user-session=default #?XSERVER-1 ACCEPT-CONNECT # Old session is locked -#?LOGIN1 LOCK-SESSION +#?LOGIN1 LOCK-SESSION SESSION=c0 # New session starts #?SESSION-X-1 START XDG_SEAT=seat0 XDG_VTNR=8 XDG_GREETER_DATA_DIR=.*/no-password2 XDG_SESSION_TYPE=x11 XDG_SESSION_DESKTOP=default USER=no-password2 @@ -53,10 +53,10 @@ user-session=default #?RUNNER SWITCH-TO-USER USERNAME=no-password1 # Old session is unlocked -#?LOGIN1 UNLOCK-SESSION +#?LOGIN1 UNLOCK-SESSION SESSION=c0 # New session is locked -#?LOGIN1 LOCK-SESSION +#?LOGIN1 LOCK-SESSION SESSION=c1 # Switch to first session #?LOGIN1 ACTIVATE-SESSION SESSION=c0 diff --git a/tests/scripts/switch-to-user-existing-resettable.conf b/tests/scripts/switch-to-user-existing-resettable.conf index da9b47e7..cc7bd6d0 100644 --- a/tests/scripts/switch-to-user-existing-resettable.conf +++ b/tests/scripts/switch-to-user-existing-resettable.conf @@ -63,7 +63,7 @@ resettable=true #?XSERVER-2 ACCEPT-CONNECT # Old session is locked -#?LOGIN1 LOCK-SESSION +#?LOGIN1 LOCK-SESSION SESSION=c1 # New session starts #?SESSION-X-2 START XDG_SEAT=seat0 XDG_VTNR=9 XDG_GREETER_DATA_DIR=.*/no-password1 XDG_SESSION_TYPE=x11 XDG_SESSION_DESKTOP=default USER=no-password1 @@ -79,7 +79,7 @@ resettable=true #?RUNNER SWITCH-TO-USER USERNAME=have-password1 # Which switches to greeter -#?LOGIN1 LOCK-SESSION +#?LOGIN1 LOCK-SESSION SESSION=c2 #?GREETER-X-0 RESET #?GREETER-X-0 SELECT-USER-HINT USERNAME=have-password1 #?VT ACTIVATE VT=7 diff --git a/tests/scripts/switch-to-user-existing.conf b/tests/scripts/switch-to-user-existing.conf index 022807de..23f9101f 100644 --- a/tests/scripts/switch-to-user-existing.conf +++ b/tests/scripts/switch-to-user-existing.conf @@ -37,7 +37,7 @@ user-session=default #?XSERVER-1 ACCEPT-CONNECT # Old session is locked -#?LOGIN1 LOCK-SESSION +#?LOGIN1 LOCK-SESSION SESSION=c0 # New session starts #?SESSION-X-1 START XDG_SEAT=seat0 XDG_VTNR=8 XDG_GREETER_DATA_DIR=.*/no-password1 XDG_SESSION_TYPE=x11 XDG_SESSION_DESKTOP=default USER=no-password1 @@ -61,7 +61,7 @@ user-session=default #?XSERVER-2 ACCEPT-CONNECT # New session is locked -#?LOGIN1 LOCK-SESSION +#?LOGIN1 LOCK-SESSION SESSION=c1 # Greeter starts #?GREETER-X-2 START XDG_SEAT=seat0 XDG_VTNR=9 XDG_SESSION_CLASS=greeter @@ -87,7 +87,7 @@ user-session=default #?XSERVER-2 TERMINATE SIGNAL=15 # Old session is unlocked -#?LOGIN1 UNLOCK-SESSION +#?LOGIN1 UNLOCK-SESSION SESSION=c0 # Switch to first session #?LOGIN1 ACTIVATE-SESSION SESSION=c0 diff --git a/tests/scripts/switch-to-user-logout-active-resettable.conf b/tests/scripts/switch-to-user-logout-active-resettable.conf index 42bc7866..68fe22fa 100644 --- a/tests/scripts/switch-to-user-logout-active-resettable.conf +++ b/tests/scripts/switch-to-user-logout-active-resettable.conf @@ -63,7 +63,7 @@ resettable=true #?XSERVER-2 ACCEPT-CONNECT # Session is locked -#?LOGIN1 LOCK-SESSION +#?LOGIN1 LOCK-SESSION SESSION=c1 # Session starts #?SESSION-X-2 START XDG_SEAT=seat0 XDG_VTNR=9 XDG_GREETER_DATA_DIR=.*/no-password2 XDG_SESSION_TYPE=x11 XDG_SESSION_DESKTOP=default USER=no-password2 diff --git a/tests/scripts/switch-to-user-logout-active.conf b/tests/scripts/switch-to-user-logout-active.conf index 4e913e04..784aa0e7 100644 --- a/tests/scripts/switch-to-user-logout-active.conf +++ b/tests/scripts/switch-to-user-logout-active.conf @@ -37,7 +37,7 @@ user-session=default #?XSERVER-1 ACCEPT-CONNECT # Session is locked -#?LOGIN1 LOCK-SESSION +#?LOGIN1 LOCK-SESSION SESSION=c0 # Session starts #?SESSION-X-1 START XDG_SEAT=seat0 XDG_VTNR=8 XDG_GREETER_DATA_DIR=.*/no-password2 XDG_SESSION_TYPE=x11 XDG_SESSION_DESKTOP=default USER=no-password2 diff --git a/tests/scripts/switch-to-user-logout-inactive.conf b/tests/scripts/switch-to-user-logout-inactive.conf index bf4597ef..3e619811 100644 --- a/tests/scripts/switch-to-user-logout-inactive.conf +++ b/tests/scripts/switch-to-user-logout-inactive.conf @@ -37,7 +37,7 @@ user-session=default #?XSERVER-1 ACCEPT-CONNECT # Session is locked -#?LOGIN1 LOCK-SESSION +#?LOGIN1 LOCK-SESSION SESSION=c0 # Session starts #?SESSION-X-1 START XDG_SEAT=seat0 XDG_VTNR=8 XDG_GREETER_DATA_DIR=.*/no-password2 XDG_SESSION_TYPE=x11 XDG_SESSION_DESKTOP=default USER=no-password2 diff --git a/tests/scripts/switch-to-user-no-password.conf b/tests/scripts/switch-to-user-no-password.conf index 67f2ec6c..2067aea9 100644 --- a/tests/scripts/switch-to-user-no-password.conf +++ b/tests/scripts/switch-to-user-no-password.conf @@ -37,7 +37,7 @@ user-session=default #?XSERVER-1 ACCEPT-CONNECT # Session is locked -#?LOGIN1 LOCK-SESSION +#?LOGIN1 LOCK-SESSION SESSION=c0 # New session starts #?SESSION-X-1 START XDG_SEAT=seat0 XDG_VTNR=8 XDG_GREETER_DATA_DIR=.*/no-password1 XDG_SESSION_TYPE=x11 XDG_SESSION_DESKTOP=default USER=no-password1 diff --git a/tests/scripts/switch-to-user-resettable.conf b/tests/scripts/switch-to-user-resettable.conf index ed5e5772..24b5f72f 100644 --- a/tests/scripts/switch-to-user-resettable.conf +++ b/tests/scripts/switch-to-user-resettable.conf @@ -55,7 +55,7 @@ resettable=true #?RUNNER SWITCH-TO-USER USERNAME=have-password2 # Switch to greeter -#?LOGIN1 LOCK-SESSION +#?LOGIN1 LOCK-SESSION SESSION=c1 #?GREETER-X-0 RESET #?VT ACTIVATE VT=7 #?LOGIN1 ACTIVATE-SESSION SESSION=c0 diff --git a/tests/scripts/switch-to-user.conf b/tests/scripts/switch-to-user.conf index 7773c352..c6ea69ac 100644 --- a/tests/scripts/switch-to-user.conf +++ b/tests/scripts/switch-to-user.conf @@ -37,7 +37,7 @@ user-session=default #?XSERVER-1 ACCEPT-CONNECT # Session is locked -#?LOGIN1 LOCK-SESSION +#?LOGIN1 LOCK-SESSION SESSION=c0 # Greeter starts #?GREETER-X-1 START XDG_SEAT=seat0 XDG_VTNR=8 XDG_SESSION_CLASS=greeter diff --git a/tests/scripts/switch-to-users.conf b/tests/scripts/switch-to-users.conf index 2e25724a..ec2c2223 100644 --- a/tests/scripts/switch-to-users.conf +++ b/tests/scripts/switch-to-users.conf @@ -37,7 +37,7 @@ user-session=default #?XSERVER-1 ACCEPT-CONNECT # Session is locked -#?LOGIN1 LOCK-SESSION +#?LOGIN1 LOCK-SESSION SESSION=c0 # New session starts #?SESSION-X-1 START XDG_SEAT=seat0 XDG_VTNR=8 XDG_GREETER_DATA_DIR=.*/no-password1 XDG_SESSION_TYPE=x11 XDG_SESSION_DESKTOP=default USER=no-password1 @@ -61,7 +61,7 @@ user-session=default #?XSERVER-2 ACCEPT-CONNECT # Session is locked -#?LOGIN1 LOCK-SESSION +#?LOGIN1 LOCK-SESSION SESSION=c1 # New session starts #?SESSION-X-2 START XDG_SEAT=seat0 XDG_VTNR=9 XDG_GREETER_DATA_DIR=.*/no-password2 XDG_SESSION_TYPE=x11 XDG_SESSION_DESKTOP=default USER=no-password2 diff --git a/tests/scripts/unity-mir-lock-seat.conf b/tests/scripts/unity-mir-lock-seat.conf index 300e1b12..2b36bf7b 100644 --- a/tests/scripts/unity-mir-lock-seat.conf +++ b/tests/scripts/unity-mir-lock-seat.conf @@ -26,7 +26,7 @@ user-session=mir #?SESSION-MIR-session-0 LOCK-SEAT # Session is locked -#?LOGIN1 LOCK-SESSION +#?LOGIN1 LOCK-SESSION SESSION=c0 # Greeter starts #?GREETER-MIR-greeter-0 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_SESSION_CLASS=greeter diff --git a/tests/scripts/unity-mir-switch-to-user-resettable.conf b/tests/scripts/unity-mir-switch-to-user-resettable.conf index 1fe7038d..e59d70cc 100644 --- a/tests/scripts/unity-mir-switch-to-user-resettable.conf +++ b/tests/scripts/unity-mir-switch-to-user-resettable.conf @@ -40,7 +40,7 @@ resettable=true #?RUNNER SWITCH-TO-USER USERNAME=have-password2 # Switch to greeter -#?LOGIN1 LOCK-SESSION +#?LOGIN1 LOCK-SESSION SESSION=c1 #?GREETER-MIR-greeter-0 RESET #?LOGIN1 ACTIVATE-SESSION SESSION=c0 #?UNITY-SYSTEM-COMPOSITOR SET-ACTIVE-SESSION ID=greeter-0 diff --git a/tests/scripts/unity-switch.conf b/tests/scripts/unity-switch.conf index 6287eae9..c6a3df8a 100644 --- a/tests/scripts/unity-switch.conf +++ b/tests/scripts/unity-switch.conf @@ -44,7 +44,7 @@ user-session=default #?XSERVER-1 ACCEPT-CONNECT # Lock session -#?LOGIN1 LOCK-SESSION +#?LOGIN1 LOCK-SESSION SESSION=c0 # Greeter starts #?GREETER-X-1 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_SESSION_CLASS=greeter diff --git a/tests/scripts/user-logged-in.conf b/tests/scripts/user-logged-in.conf index 6182545c..1a3a12b2 100644 --- a/tests/scripts/user-logged-in.conf +++ b/tests/scripts/user-logged-in.conf @@ -56,7 +56,7 @@ log-user-changes=true #?XSERVER-1 ACCEPT-CONNECT # Session is locked -#?LOGIN1 LOCK-SESSION +#?LOGIN1 LOCK-SESSION SESSION=c1 # Greeter starts #?GREETER-X-1 START XDG_SEAT=seat0 XDG_VTNR=8 XDG_SESSION_CLASS=greeter diff --git a/tests/src/test-runner.c b/tests/src/test-runner.c index f5dfcf0b..dc1a384d 100644 --- a/tests/src/test-runner.c +++ b/tests/src/test-runner.c @@ -1283,14 +1283,22 @@ handle_login1_session_call (GDBusConnection *connection, if (strcmp (method_name, "Lock") == 0) { if (!session->locked) - check_status ("LOGIN1 LOCK-SESSION"); + { + gchar *status = g_strdup_printf ("LOGIN1 LOCK-SESSION SESSION=%s", strrchr (object_path, '/') + 1); + check_status (status); + g_free (status); + } session->locked = TRUE; g_dbus_method_invocation_return_value (invocation, g_variant_new ("()")); } else if (strcmp (method_name, "Unlock") == 0) { if (session->locked) - check_status ("LOGIN1 UNLOCK-SESSION"); + { + gchar *status = g_strdup_printf ("LOGIN1 UNLOCK-SESSION SESSION=%s", strrchr (object_path, '/') + 1); + check_status (status); + g_free (status); + } session->locked = FALSE; g_dbus_method_invocation_return_value (invocation, g_variant_new ("()")); } |