Re: [PATCH] console-kit: Check session-lock just by IdleHint

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Tue, Jan 17, 2017 at 02:45:58PM +0100, Pavel Grunt wrote:
> gnome-shell in RHEL6 does not emit the Unlock signal when session
> is being unlocked making the agent think that the session is locked.

Yes, my bad in the logic here. Thanks!
Now, for systems that don't rely on systemd, locked signals (or
properties) should be used. Could you please file an issue to
ConsoleKit2 [0], asking for parity with logind in this regard? That is,
being idle is not the same as being locked, so consolekit could/should
have something similar to [1]

[0] https://github.com/ConsoleKit2
[1] https://github.com/systemd/systemd/pull/3238

>
> Remove handling of Lock/Unlock signals and keep only IdleHintChanged.
>
> Resolves:
> https://bugzilla.redhat.com/show_bug.cgi?id=1412673
> ---
> signal handling can be removed as well
> ---
>  src/vdagentd/console-kit.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/src/vdagentd/console-kit.c b/src/vdagentd/console-kit.c
> index 024a260..5230508 100644
> --- a/src/vdagentd/console-kit.c
> +++ b/src/vdagentd/console-kit.c
> @@ -493,11 +493,10 @@ gboolean session_info_session_is_locked(struct session_info *info)
>  
>      /* Not every system does emit Lock and Unlock signals (for instance, such
>       * is the case for RHEL6) but most of the systems seems to emit the
> -     * IdleHintChanged. So, we give priority to the Lock signal, if it is Locked
> -     * we return that the session is locked, otherwise we double check with the
> -     * IdleHint value */
> +     * IdleHintChanged. So use the IdleHint value.
> +     * systemd-login uses locked-hint which is not implemented in ConsoleKit. */

If you think it is okay to include the #issue number in the comment,
feel free to do it.

Acked-by: Victor Toso <victortoso@xxxxxxxxxx>


>      si_dbus_read_signals(info);
> -    locked = (info->session_is_locked || info->session_idle_hint);
> +    locked = info->session_idle_hint;
>      if (info->verbose) {
>          syslog(LOG_DEBUG, "(console-kit) session is locked: %s",
>                 locked ? "yes" : "no");
> -- 
> 2.11.0
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/spice-devel

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]