home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 3 / 3242 < prev    next >
Encoding:
Internet Message Format  |  1991-04-27  |  1.0 KB

  1. From: prl@iis.ethz.ch (Peter Lamb)
  2. Newsgroups: alt.sources
  3. Subject: Re: sux, an enhancer for su
  4. Message-ID: <prl.672649640@iis>
  5. Date: 26 Apr 91 07:07:20 GMT
  6.  
  7. peltz@cerl.uiuc.edu (Steve Peltz) writes:
  8. >WILL work, wouldn't the following one-line shell script do just as well?
  9.  
  10.   N O O O O O O O O !!!!!!
  11.  
  12. >Maybe there's a reason; maybe the "groups" command is Sun specific or
  13. >something...
  14.  
  15.   No.    
  16.  
  17. >Don't forget to change it to be owned by root and setuid and executable...
  18.  
  19. If I can execute a setuid root script I can become root (independent of
  20. its contents). So can a very large range of other people. Some of them
  21. not friendly enough to warn you about it.
  22.  
  23. >Sorry - not in shar format; why put in an extra 20 lines to wrap 2?
  24.  
  25. >#!/bin/sh
  26. >groups | grep -s wheel && su $* || echo Sorry
  27.  
  28. Don't do it !
  29.  
  30. Don't install this script. Don't make it set{uid,gid}.
  31.  
  32. Setuid shell scripts are security holes!
  33.  
  34.  
  35. --
  36. Peter Lamb
  37. uucp:  uunet!mcsun!ethz!prl    eunet: prl@iis.ethz.ch    Tel:   +411 256 5241
  38. Integrated Systems Laboratory
  39. ETH-Zentrum, 8092 Zurich
  40.