rock-and-roll [Re: Retaining file permissions] [long]
Bruce Varney
asg at sage.cc.purdue.edu
Fri Mar 8 01:44:44 AEST 1991
In article <12596:Mar707:44:2791 at kramden.acf.nyu.edu> brnstnd at kramden.acf.nyu.edu (Dan Bernstein) writes:
}In article <7431 at mentor.cc.purdue.edu> asg at 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 at sage.cc.purdue.edu ### ##### #
PUCC ### #
;-) # #
;'> # ##
More information about the Comp.unix.internals
mailing list