the way gpg updates the pubring files makes it impossible to symlink it
Closed, WontfixPublic

Description

i would like to share the same pubring in two gpg homes, and i symlink-ed the
files, but gpg renames the symlink as a backup and creates a new file for the
pubring db.

i know that it's not a really good idea due to potential concurrent
modifications, but in my case that's not a problem.

please consider this use-case.

and thanks for gpg!

werner added a subscriber: werner.Jul 19 2012, 1:30 PM

So you suggest to follow the symlink before editing the file?

well, i'm not a posix security expert, so take it with a piece of salt... but if
gpg followed symlinks on the pubring files, then it would be possible to symlink
the same public key db into two gnupg home directories.

werner added a comment.Aug 1 2012, 7:25 AM

So now, what shall we do proper file locking and make sure that the user has
permissions to both files? It will be quite some code to get this all done right.

marcus closed this task as Wontfix.Jul 17 2017, 5:34 PM
marcus claimed this task.