Page MenuHome GnuPG

file secring.gpg not created automatically; results in --gen-key failure
Closed, ResolvedPublic

Description

Release: gpg (GnuPG) 1.2.1

Environment

Linux. Kernel 2.2.13. Slackware 9.0. Using gpg as it came
with the distro. I think I've seen this bug before.

Description

During --gen-key, the program does not automatically create a file for the secret ring.

Output, etc., in the attachment. Apologies if it was fixed in 1.2.2. I looked in the Changelogs and didn't see an entry for it so figured there's a good chance it wasn't changed.

How To Repeat

Make new "test" user and run

gpg --gen-key

for the first time.

Fix

I work around it by creating an empty file "secring.gpg" and then running --gen-key.

My guess is that there is some simple change in the code to generate the new file. I looked briefly, but you do write programs the same way I do.

Release Note

The fix was due to this change:

2003-01-02 Werner Koch <wk@gnupg.org>

  • keydb.c (keydb_add_resource): Don't assume that try_make_homedir terminates but check again for the existence of the directory and continue then.

Event Timeline

werner added a subscriber: werner.

Fixed in 1.2.2