[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#913468: startx: doesn't cope with multiple xauth cookies



Dixi quod…

> However, on my system I somehow get two (the same but,

I think these come from startx itself, plus the system having
had crashed once while X was running.

If I rm ~/.Xauthority then startx, and, under X, run “xauth list”,
I get:

tglase-nb.lan.tarent.de/unix:0  MIT-MAGIC-COOKIE-1  1d91628277c6a2e586377f11ad5e94c4
tglase-nb.lan.tarent.de:0  MIT-MAGIC-COOKIE-1  1d91628277c6a2e586377f11ad5e94c4
tglase-nb.lan.tarent.de:0  MIT-MAGIC-COOKIE-1  1d91628277c6a2e586377f11ad5e94c4

The actual cookie is now different every session, but we see
that the duplicate is there. So chances are this issue will
pop up over the lifetime of a $HOME in all startx users.

startx adds the cookie twoce in line 203 (since the previous
.Xauthority was empty, $authcookie also is, so we hit this
one instead of line 209 from my initial report). I don’t have
an idea why :0 is added as hostname:0 though.

I don’t know how to test this right now, as “xauth add” seems
to misbehave: instead of adding one line it replaces all three
lines:

tglase@tglase-nb:~ $ xauth list                                                                                 
tglase-nb.lan.tarent.de/unix:0  MIT-MAGIC-COOKIE-1  1d91628277c6a2e586377f11ad5e94c4
tglase-nb.lan.tarent.de:0  MIT-MAGIC-COOKIE-1  65cf233332362c15bf009a13d32c115f
tglase-nb.lan.tarent.de:0  MIT-MAGIC-COOKIE-1  65cf233332362c15bf009a13d32c115f
tglase@tglase-nb:~ $ xauth add tglase-nb.lan.tarent.de:0 . $(mcookie)                                           
tglase@tglase-nb:~ $ xauth list                                                                                 
tglase-nb.lan.tarent.de/unix:0  MIT-MAGIC-COOKIE-1  2f2178f0974e8b0e3654eb084e469b39
tglase-nb.lan.tarent.de:0  MIT-MAGIC-COOKIE-1  2f2178f0974e8b0e3654eb084e469b39
tglase-nb.lan.tarent.de:0  MIT-MAGIC-COOKIE-1  2f2178f0974e8b0e3654eb084e469b39

(That’s still running under X.)

So perhaps this is one, or even two, bugs in xauth instead?

(That being said, I’d add a “| uniq”, at the very least, in the
indicated place in startx, if not handling for multiple cookies.)

bye,
//mirabilos
-- 
«MyISAM tables -will- get corrupted eventually. This is a fact of life. »
“mysql is about as much database as ms access” – “MSSQL at least descends
from a database” “it's a rebranded SyBase” “MySQL however was born from a
flatfile and went downhill from there” – “at least jetDB doesn’t claim to
be a database”	(#nosec)    ‣‣‣ Please let MySQL and MariaDB finally die!


Reply to: