core: Only scan for the command line if probably on the same host.
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Sun, 5 Feb 2017 05:20:47 +0000 (00:20 -0500)
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Thu, 12 Oct 2017 21:12:55 +0000 (17:12 -0400)
commit1f5b351531205214e9513a0aed170660dc822ceb
treef80c5cd2267d7341a0bcfbf90444377002a34224
parent242b658289488696d371c639c1da631712bd774c
core: Only scan for the command line if probably on the same host.

* pinentry/pinentry.c (pinentry_get_title): Check the current hostname
and make sure it matches.  If it does not, do not bother looking for
the command line.

--

If we don't do this, and the agent is forwarded from somewhere else,
pinentry will be looking up arbitrary process command lines.

Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
pinentry/pinentry.c