home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / unix / programm / 3891 < prev    next >
Encoding:
Internet Message Format  |  1992-07-24  |  1.4 KB

  1. Path: sparky!uunet!news.claremont.edu!ucivax!noiro.acs.uci.edu!nntpsrv
  2. From: cedman@714-725-3165.nts.uci.edu (Carl Edman)
  3. Subject: Re: Making ``.plan'' EXECUTE a Program ???
  4. Nntp-Posting-Host: 714-725-3165.nts.uci.edu
  5. Message-ID: <2A7020E3.21935@noiro.acs.uci.edu>
  6. Newsgroups: comp.unix.programmer
  7. Reply-To: cedman@golem.ps.uci.edu (Carl Edman)
  8. Lines: 27
  9. Date: 24 Jul 92 15:25:23 GMT
  10. References: <1992Jul24.131605.8213@news.eng.convex.com>
  11.  
  12. Tom Christiansen <tchrist@convex.COM> writes
  13. > > This is because it was possible to do the following
  14. > > ln -s <any file> ~/.plan
  15. > > finger <my username>
  16. > > and read any file on the system on some versions of unix.
  17. > > The simplist fix is to just have fingerd refuse to read
  18. > > anything not a regular file. 
  19. > Seem to me that doing this in fingerd:
  20. >     if (fork) return;
  21. >     setuid(-2);
  22. >     (do file reading
  23. >     exit(0);
  24. > Would have been better.
  25.  
  26. Why even start up fingerd as root at all ? Most systems which I'm aware have  
  27. 'nobody' as the user for fingerd. BTW, a forked finger (my god, what images  
  28. does that evoke ?) does the file reading for fingerd.
  29.  
  30. This of course wouldn't work for a fingerd/finger hack, I once wrote which  
  31. checks whether the .plan or .project files have their executable bits set and  
  32. if executes them as the finger target user if so. That avoids all that nasty  
  33. pipe business which breaks under NFS and requires a constantly running daemon.
  34.  
  35.     Carl Edman
  36.