Subject: xscreensaver bombs out trying to retrieve a password
To: NetBSD Packages Discussion <email@example.com>
From: Greywolf <firstname.lastname@example.org>
Date: 05/13/2003 22:50:39
I use xscreensaver, and it does all the nice nifty neat things
it's supposed to do, with the notable exception that it does not
properly lock my screen.
I think it's something to do with the permissions it runs as
while trying to establish a connection to getpwuid() to the master
map, but I'm not entirely sure why it's getting what it does. It gets
an errno=13 when getpwuid(getuid()) is called, which indicates to me
that it's in some state which prohibits it retrieving a valid passwd
pointer (probably trying to establish a valid connection through the
nss to the map master.passwd.byuid).
I do run NIS, and my passwd entry comes across from NIS.
Relevant entries in /etc/nsswitch.conf:
passwd: files nis
The horribly odd thing is that the (struct passwd *) is initially made
valid, while the screensaver is in a position to make the privileged
connection and/or open the privileged db, and it is subsequently
clobbered when the dialog box is popped up because it no longer trusts
the info it had when it was started.
This is very bizarre.
The end result is that the screensaver main driver terminates with
a SIGSEGV because it is unable to (re-) divine the information it
needs via getpw*().
I'm not sure if this is a bitch session or if I'm suggesting a fix;
the obvious fix would be to save the username and password off, and
fall back to the first ones retrieved if the getpwuid() call fails.
NetBSD: Microsoft ask you where you want to go. BSD gets you there.