Path: utzoo!news-server.csri.toronto.edu!rutgers!uwm.edu!cs.utexas.edu!asuvax!ncar!gatech!purdue!mentor.cc.purdue.edu!sage.cc.purdue.edu!asg From: asg@sage.cc.purdue.edu (Bruce Varney) Newsgroups: comp.unix.internals Subject: Re: rock-and-roll [Re: Retaining file permissions] [long] Message-ID: <7449@mentor.cc.purdue.edu> Date: 7 Mar 91 15:44:44 GMT References: <1991Mar6.234727.23298@athena.mit.edu> <10710@dog.ee.lbl.gov> <7431@mentor.cc.purdue.edu> <12596:Mar707:44:2791@kramden.acf.nyu.edu> Sender: news@mentor.cc.purdue.edu Reply-To: asg@sage.cc.purdue.edu (Bruce Varney) Distribution: usa Organization: Purdue University Lines: 41 In article <12596:Mar707:44:2791@kramden.acf.nyu.edu> brnstnd@kramden.acf.nyu.edu (Dan Bernstein) writes: }In article <7431@mentor.cc.purdue.edu> asg@sage.cc.purdue.edu (Bruce Varney) writes: }> My contention is that it is no longer necessary to clear the suid }> bit on NON-EXECUTABLE FILES! } }Joe compiles a setuid program and sets it up: } } cc -o foo foo.c } chmod u+s foo } # oops, umask is 002, better keep that file safe from carelessness by group } chmod g-w foo } # and make it available... } chmod g+x foo } }Sally, in the same group and doing work in the same directory, writes }something to foo after the setuid bit has been turned on. Guess what? In }your world, foo is still setuid. Thank you Dan. You have provided me with an explaination I was looking for. My contention all along was that there was some other reason than than put forth by Jon as to why the suid bit was cleared on non-executables. His explaination was incorrect, but yours is correct. My problem was with his contention that there was a way to turn on the execute bit without being able to turn on the suid bit. My contention was that if you can change one you can change them all. But your explaination makes sense and I thank you for a rational explaination to the question at hand. NOTE: my comments here are NOT sarcastic --------- sar.casm \'sa:r-.kaz-*m\ \sa:r-'kas-tik\ \-ti-k(*-)le-\ n [F sarcasme, fr. LL sarcasmos, fr. Gk sarkasmos, fr. sarkazein to tear flesh, bite the lips in rage, sneer, fr. sark-, sarx flesh; akin to Av thwar*s to cut] 1: a cutting, hostile, or contemptuous remark : GIBE 2: the use of caustic or ironic language - sar.cas.tic aj ### ## Courtesy of Bruce Varney ### # aka -> The Grand Master # asg@sage.cc.purdue.edu ### ##### # PUCC ### # ;-) # # ;'> # ##