X-Spam-Check-By: sourceware.org
Message-ID: <44D21D4C.7050200@ukf.net>
Date: Thu, 03 Aug 2006 16:59:08 +0100
From: Max Bowsher <maxb1@ukf.net>
Reply-To: cygwin@cygwin.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050923 Thunderbird/1.0.7
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: GnuPG bug: --refresh-keys
OpenPGP: id=C0F2C580
Content-Type: multipart/signed; micalg=pgp-sha1;  protocol="application/pgp-signature";  boundary="------------enigB821E54FDD029582BB4381F6"
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

--------------enigB821E54FDD029582BB4381F6
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

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.

Max.


--------------enigB821E54FDD029582BB4381F6
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 (Cygwin)

iD8DBQFE0h1SfFNSmcDyxYARAoo6AKCBjBu1JnRndtukOGFZ64TzA7u45QCeMJn8
1sDxe2inDAaLQkEI3Tr41Pg=
=E3RV
-----END PGP SIGNATURE-----

--------------enigB821E54FDD029582BB4381F6--
