Page MenuHome GnuPG

903_0001-gnome3-Fall-back-to-curses-if-screensaver-is-locked.patch
Needs ReviewPublic

Authored by dkg on Nov 6 2016, 8:18 AM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

From b405fa033d4bf5291085f314b74d468efb09b57e Mon Sep 17 00:00:00 2001
From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
Date: Sun, 6 Nov 2016 02:11:33 -0500
Subject: [PINENTRY PATCH] gnome3: Fall back to curses if screensaver is
locked.

  • gnome3/pinentry-gnome3.c (pe_gnome_screen_locked): New Function.

Returns true only if we can talk to a GNOME screensaver over D-Bus and
it assures us that it is locked.
(main): If GNOME screensaver is locked, fall back to curses.

We assume that if pinentry is triggered while the screensaver is
locked, then it is likely being done by some sort of remote connection
(e.g. ssh), and isn't being done directly from the graphical console.
In that case, prompting at the graphical console won't be able to get
the attention of the user, so we should fall back to curses if
possible.

GnuPG-bug-id: 2818

gnome3/pinentry-gnome3.c | 69 ++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 69 insertions(+)

2.10.2

Test Plan

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped