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