GnuPG bug: --refresh-keys

Volker Quetschke quetschke@scytek.de
Fri Aug 4 04:33:00 GMT 2006


Max Bowsher wrote:
> Max Bowsher wrote:
>> When running 'gpg --refresh-keys', the second updated key results in:
>>
>> gpg: renaming `/home/max/.gnupg/pubring.gpg' to
>> `/home/max/.gnupg/pubring.gpg~' failed: Permission denied
>> gpg: error writing keyring `/home/max/.gnupg/pubring.gpg': file rename error
>> gpg: key XXXXXXXX: "...." 28 new signatures
>> gpg: error reading `[stream]': file rename error
>>
>>
>> Given that:
>>  * this happens for the *second* updated key
>>
>>  * having another process running at the same time, rapidly moving away
>> any new pubring.gpg~ files avoids the error
>>
>>  * it is presumably Cygwin-specific
>>
>> it seems extremely likely that gnupg has a file descriptor leak, such
>> that when the second key is processed, gnupg still has an open file
>> descriptor on the file pubring.gpg~ when it attempts to overwrite it by
>> renaming another file onto that name. Windows then objects.
> 
> Replying to my own mail...
> 
> GPG for some reason tries to cache opened fds for re-use. I suggest
> disabling this caching for Cygwin. The appropriate code to tweak is in
> util/iobuf.c:fd_cache_close(). I changed the condition of the first if
> statement there to always be true, and the problem I reported goes away.
> 
> Please integrate this into the Cygwin packages.

Thanks for tracking this down Max. It's also time for a new package
with the newer upstream version.

   Volker

-- 
PGP/GPG key  (ID: 0x9F8A785D)  available  from  wwwkeys.de.pgp.net
key-fingerprint 550D F17E B082 A3E9 F913  9E53 3D35 C9BA 9F8A 785D

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 250 bytes
Desc: OpenPGP digital signature
URL: <http://cygwin.com/pipermail/cygwin/attachments/20060804/15157c13/attachment.sig>


More information about the Cygwin mailing list