Bash scripting question

Roger Oberholtzer roger
Mon May 17 11:47:57 PDT 2004


On Wed, 28 May 2003 13:21:38 -0400 (EDT)
<listmail at rotundus.com> wrote:

> > Only that a script is more easily changed than a compiled program.
> > Just an editor will do. Of course, it requires that someone has write
> > permissions on the script. Just be sure to do chmod a-w on the script.
> 
> Wouldn't essentially the same apply to a binary?

Using a HEX editor and changing binary code, yes. But that is not very
likely to happen as it is quite difficult. A script, on the other hand, is
plain text and easy to modify. So I think the reason here is simply that
as scripts are so very easy to modify, at least keep their permissions as
limiting as possible. Don't just leave the key under the mat.

There are those (myself included) that think that SUID anything is bad
design. We no longer use it in our code.

--

Roger Oberholtzer


More information about the Linux-users mailing list