GnuPG race causes misordered uids?
Marcus Brinkmann
Marcus.Brinkmann at ruhr-uni-bochum.de
Mon May 5 19:16:02 CEST 2003
On Mon, May 05, 2003 at 09:50:23AM -0400, David Shaw wrote:
> Just to make sure I understand the problem. Given a key with more
> than one uid, one of which is marked primary, if I do this:
>
> gpg --fixed-list-mode --with-fingerprint --with-colons --list-keys (thekey)
>
> over and over, sometimes the primary key is not first?
I wish I could say that. I did only see it in GPGME, not from the command
line, although GPGME calls something like the above (it has
--with-fingerprint twice, and uses a status fd of course).
> Is the primary uid marked primary (i.e. a primary subpacket is in the
> self-sig), or is the primary just the newest uid ?
I don't know how to find that out.
I have an idea. If it is the newest uid listed first, then can it be that
it compares the time against the current time, and when it crosses a second
then the second comparison is one second less than the first one (and if
both are created at the same time, then the second is now earlier than the
first)? I should look in the code, but that is about the only type of race
I can imagine being in effect here.
I now butchered my test environment. Now it lists the third uid as the
"primary" (newest?) one all the time. This could indicate that it takes the
newest uid, and the third one is the latest created by the script.
Thanks,
Marcus
--
`Rhubarb is no Egyptian god.' GNU http://www.gnu.org marcus at gnu.org
Marcus Brinkmann The Hurd http://www.gnu.org/software/hurd/
Marcus.Brinkmann at ruhr-uni-bochum.de
http://www.marcus-brinkmann.de/
More information about the Gnupg-devel
mailing list