X-Spam-Check-By: sourceware.org Message-ID: <44D2CDF7.1090900@scytek.de> Date: Fri, 04 Aug 2006 00:32:55 -0400 From: Volker Quetschke User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: GnuPG bug: --refresh-keys References: <44D21D4C DOT 7050200 AT ukf DOT net> <44D29487 DOT 6000806 AT ukf DOT net> In-Reply-To: <44D29487.6000806@ukf.net> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig50C8B26F7892D4C871D6B758" X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com --------------enig50C8B26F7892D4C871D6B758 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 e= rror >> 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. >=20 > Replying to my own mail... >=20 > 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. >=20 > 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 --=20 PGP/GPG key (ID: 0x9F8A785D) available from wwwkeys.de.pgp.net key-fingerprint 550D F17E B082 A3E9 F913 9E53 3D35 C9BA 9F8A 785D --------------enig50C8B26F7892D4C871D6B758 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.1 (MinGW) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFE0s4DPTXJup+KeF0RAmoIAKCi6jJfE92Bia4GWGN6rudXroOyIwCgknlw SkBMtEfxzwdU1A43W+gFfTY= =K5H/ -----END PGP SIGNATURE----- --------------enig50C8B26F7892D4C871D6B758--