Article View: cu.decstation.managers
Article #1015Ultrix xdm writes junk auth records
From: Norman Wilson
Date: Thu, 07 Dec 1995 00:00
Date: Thu, 07 Dec 1995 00:00
52 lines
3096 bytes
3096 bytes
Recently I enabled magic-cookie authentication on our Ultrix 4.3A systems.
This revealed that the DEC-supplied xdm sometimes writes junk records
into .Xauthority, with patently crazy IP addresses like `34.0.0.0' or
addresses that xauth won't even try to print (it just says `Invalid-
Network-Address'). The trouble is probably associated with the error
message `Trouble getting network interface configuration' (without a
newline) which shows up in xdm's error file whenever a session starts.
Somewhat more recently, I poked around in an old copy of the source to
xdm, and found buggy code that would produce exactly those symptoms.
auth.c/writeLocalAuth contains code that looks like this:
#ifdef TCPCONN
fd = socket (AF_INET, SOCK_STREAM, 0);
DefineSelf (fd, file, auth);
close (fd);
#endif
#ifdef DNETCONN
fd = socket (AF_DECnet, SOCK_STREAM, 0);
DefineSelf (fd, file, auth);
close (fd);
#endif
Presumably the Ultrix-supplied xdm is compiled with both TCPCONN and
DNETCONN defined. The trouble is that if your system doesn't have
DECnet configured (and ours don't), the second socket call fails, and
DefineSelf is called with an invalid file descriptor.
DefineSelf uses the SIOGGIFCONF ioctl to get a list of network interfaces;
the intent is to write an authentication record for each of this host's
network addresses. If the file descriptor is invalid, the ioctl fails;
DefineSelf reports this (that's what the error message means) but
merrily processes the bufferful of interface data the ioctl was supposed
to return. Since the ioctl failed, the buffer was never filled in;
since it is an automatic variable, it is full of random junk. Hence
the random addresses in .Xauthority.
If we had a support contract, I'd call the CSC and file a bug report
about it; since we don't, the only official alternative I know if is
to fill out a paper SPR form, and this bug isn't worth that trouble.
(I could also compile my own copy of xdm; it's not worth that trouble
either.) It is a bug, however. Digital should fix it, if it isn't
already fixed in 4.4. Meanwhile, if you see this particular odd symptom
on your system, you now know what it means.
I would be interested in a report from someone running xdm with magic
cookies enabled on a 4.4 system built without DECnet support.
Norman Wilson
High Performance Research Computing
University of Toronto
norman@hprc.utoronto.ca
Technical Details
Message-ID:
<818370272.1269@news.Colorado.EDU>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1065d6,5e7df937a843f42c,start X-Google-Attributes: gid1065d6,public From: norman@hprc.utoronto.ca (Norman Wilson) Subject: Ultrix xdm writes junk auth records Date: 1995/12/07 Message-ID: <818370272.1269@news.Colorado.EDU> X-Deja-AN: 121598499 distribution: cu sender: daemon@lace.colorado.edu followup-to: poster x-note1: message-id generated by recnews x-note2: mail msgid was <199512072101.QAA08773@oaunx1.ctd.ornl.GOV> organization: University of Colorado at Boulder reply-to: norman@hprc.utoronto.ca (Norman Wilson) newsgroups: cu.decstation.managers