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>