home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / security / misc / 1684 < prev    next >
Encoding:
Internet Message Format  |  1992-11-08  |  1.7 KB

  1. Path: sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!sun-barr!ames!agate!doc.ic.ac.uk!uknet!pavo.csi.cam.ac.uk!pc123
  2. From: pc123@cus.cam.ac.uk (Pete Chown)
  3. Newsgroups: comp.security.misc
  4. Subject: Re: Setuid file
  5. Message-ID: <1992Nov8.195246.11588@infodev.cam.ac.uk>
  6. Date: 8 Nov 92 19:52:46 GMT
  7. References: <1d9ggiINNsfb@sequoia.ccsd.uts.EDU.AU> <1992Nov5.090120.14723@lut.ac.uk> <1992Nov7.203923.522@news.Hawaii.Edu>
  8. Sender: news@infodev.cam.ac.uk (USENET news)
  9. Organization: U of Cambridge, England
  10. Lines: 22
  11. Nntp-Posting-Host: bootes.cus.cam.ac.uk
  12.  
  13. In article <1992Nov7.203923.522@news.Hawaii.Edu> newsham@wiliki.eng.hawaii.edu (Timothy Newsham) writes:
  14. >
  15. >I just made an empty file with +x perms and typed in its
  16. >name at the shell prompt.  It apparently tried to execute it
  17. >and for some reason sourced my .cshrc.  This is on an older
  18. >HPUX system.  I didnt however set it suid since I am a non-priveledged
  19. >user so I cant tell you if it would work as suid.  (I think i
  20. >remember that hpux wouldnt run shell scripts with out the '#!' in
  21. >them as suid, maybe just a local patch?)
  22.  
  23. Most shells try to run scripts without a #! at the start by passing
  24. the name as an argument to sh or csh.  This is entirely a shell
  25. feature and has nothing to do with the kernel.  Because the shell is
  26. non-privileged, the resulting process that sources your .cshrc will
  27. also be.
  28.  
  29. So this is one case where setuid scripts are harmless (if also
  30. ineffectual since even the legitimate code won't run with privilege).
  31. -- 
  32. ---------------------------------------------+ "A tight hat can be stretched.
  33. Pete Chown, pc123@phx.cam.ac.uk (Internet)   |  First damp the head with steam
  34.             pc123@uk.ac.cam.phx (Janet :-)  -+  from a boiling kettle."
  35.