home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / os / linux / 21755 < prev    next >
Encoding:
Text File  |  1992-12-26  |  2.0 KB  |  40 lines

  1. Newsgroups: comp.os.linux
  2. Path: sparky!uunet!mnemosyne.cs.du.edu!nyx!amartell
  3. From: amartell@nyx.cs.du.edu (Alex Martelli)
  4. Subject: getpwnami, 4.2 & login, perl ... (was Re: UUCP 103 (taylor))
  5. Message-ID: <1992Dec26.210230.3632@mnemosyne.cs.du.edu>
  6. Sender: usenet@mnemosyne.cs.du.edu (netnews admin account)
  7. Organization: University of Denver, Dept. of Math & Comp. Sci.
  8. References: <724981623snx@weasel.demon.co.uk> <72424@cup.portal.com> <1992Dec26.155518.21255@r-node.gts.org>
  9. Date: Sat, 26 Dec 92 21:02:30 GMT
  10. Lines: 28
  11.  
  12. I'm also having problems with that... I did all that I saw suggested here
  13. (conf.h as posted here, without SIGACTION etc; -fwritabble-strings; got
  14. 0.99 PL 1 and libc.so.4.2; ...) and now what happens is that getpwnam()
  15. and getpwuid(), called in sig1.c, both return null pointers, thus all
  16. programs, starting from uucp itself, die with "Can't get login name"...
  17.  
  18. Both getpw* functions appear to work fine from a small test program, but
  19. not within the uucp suite... so far, I can't figure out why.
  20.  
  21. In going to libc.so.4.2 (I pointed libc.so.4 to it) I ALMOST ran into a bad
  22. problem - the login program won't run any more... must be patched to use
  23. libc.so.4.1 (I used the already-suggested trick: point a symbolic link
  24. libc.so.O to the 4.1 library, patch the executable inplace).  I wanted
  25. to use perl for the patching as I always did on other Unices (with a
  26. -pi switch and a single s/libc.so.4/libc.so.O/; instruction) BUT it
  27. doesn't work here: it truncates the input file to the first binary 0 byte,
  28. so login becomes only 3 bytes long... is it a bug in the fread() from
  29. stdio?  Apparently it's the reading that makes perl truncate at the 0 byte
  30. (it works with sysread then syswrite, though it's less convenient).
  31.  
  32. Any workaround or idea about the getpwnam/getpwuid in uucp?  Any other
  33. binaries that must be patched to use 4.1 before I get nasty surprises?
  34. I'll followup if I get any suggestion that works, of course.
  35.  
  36.  
  37. Alex
  38. --
  39. Alex Martelli - preferred email alex@am.sublink.org
  40.