From: amartell@nyx.cs.du.edu (Alex Martelli) Subject: getpwnami, 4.2 & login, perl ... (was Re: UUCP 103 (taylor)) Date: Sat, 26 Dec 1992 21:02:30 GMT
I'm also having problems with that... I did all that I saw suggested here
(conf.h as posted here, without SIGACTION etc; -fwritabble-strings; got
0.99 PL 1 and libc.so.4.2; ...) and now what happens is that getpwnam()
and getpwuid(), called in sig1.c, both return null pointers, thus all
programs, starting from uucp itself, die with "Can't get login name"...
Both getpw* functions appear to work fine from a small test program, but
not within the uucp suite... so far, I can't figure out why.
In going to libc.so.4.2 (I pointed libc.so.4 to it) I ALMOST ran into a bad
problem - the login program won't run any more... must be patched to use
libc.so.4.1 (I used the already-suggested trick: point a symbolic link
libc.so.O to the 4.1 library, patch the executable inplace). I wanted
to use perl for the patching as I always did on other Unices (with a
-pi switch and a single s/libc.so.4/libc.so.O/; instruction) BUT it
doesn't work here: it truncates the input file to the first binary 0 byte,
so login becomes only 3 bytes long... is it a bug in the fread() from
stdio? Apparently it's the reading that makes perl truncate at the 0 byte
(it works with sysread then syswrite, though it's less convenient).
Any workaround or idea about the getpwnam/getpwuid in uucp? Any other
binaries that must be patched to use 4.1 before I get nasty surprises?
I'll followup if I get any suggestion that works, of course.
Alex