Diffusion GnuPG 24c7aa0d58e3

common: Strip trailing slashes from the homedir.

Authored by werner on Jul 25 2017, 3:22 PM.

Description

common: Strip trailing slashes from the homedir.

* common/homedir.c (default_homedir): Strip trailing slashes.
(gnupg_set_homedir): Ditto.

is_gnupg_default_homedir() does not ignore trailing slashes when
comparing directory names. This can lead to multiple agents started
on the same directory if the homedir was specified with --homedir or
GNUPGHOME without or with a number of slashes.

We now make sure that the home directory name never ends in a
slash (except for the roo of course).

  • GnuPG-bug-id: T3295
  • Signed-off-by: Werner Koch <wk@gnupg.org>

Details

Committed
wernerJul 25 2017, 3:22 PM
Parents
rG0ef50340ef68: w32: Also change the directory on daemon startup.
Branches
Unknown
Tags
Unknown
Tasks
T3295: homedir path needs sanitation