home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / infosyst / gopher / 1767 < prev    next >
Encoding:
Text File  |  1993-01-02  |  1.7 KB  |  38 lines

  1. Newsgroups: comp.infosystems.gopher
  2. Path: sparky!uunet!usc!wupost!emory!gatech!destroyer!cs.ubc.ca!uw-beaver!newsfeed.rice.edu!rice!riddle
  3. From: riddle@is.rice.edu (Prentiss Riddle)
  4. Subject: Can't get gopherd 1.03 to run both setuid and chroot
  5. Message-ID: <C08zty.6I3@rice.edu>
  6. Sender: news@rice.edu (News)
  7. Organization: Ministry of Information, William's Marsh
  8. Date: Sat, 2 Jan 1993 22:29:58 GMT
  9. Lines: 27
  10.  
  11. I hate to whine with what sounds like a typical newbie question :-) , but:
  12.  
  13. I can't seem to make the Gopher 1.03 server work with both chroot() and
  14. setuid().  That is, I can run gopherd with both -u and -c or with
  15. neither, but not with -u and without -c.  When I try to do so, the
  16. server gives the client nothing but a "Server error: Data_Dir
  17. dissappeared!" message.  I added some debug output to the code and
  18. determined that the chroot() call fails and errno gets set to 82
  19. (ENOLINK, "the link has been severed" -- no, I'm not using RFS so I
  20. don't know why this triggers an ENOLINK error).
  21.  
  22. Looking at the code, I can't really see how the chroot() call *could*
  23. work, since the setuid() call in main() has already been executed
  24. before we get to the chroot() call in do_command().
  25.  
  26. I am running Gopher 1.03 with SunOS 4.1.2.  The gopherd command which
  27. fails is:
  28.  
  29.      gopherd -s /chico-b/cwis/gopher/etc/test.sec -l /tmp/gopher-1113 \
  30.          -u cwis /chico-b/cwis/gopher/test 1113
  31.  
  32. Anyone know what I'm doing wrong, or is this a bug?
  33.  
  34. -- Prentiss Riddle ("aprendiz de todo, maestro de nada") riddle@rice.edu
  35. -- Unix Systems Programmer, Office of Networking and Computing Systems
  36. -- Rice University, POB 1892, Houston, TX 77251 / Mudd 208 / 713-285-5327
  37. -- Opinions expressed are not necessarily those of my employer.
  38.