[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: chown/chgrp without chmod -s? lost postfix mail?



>>>>> "Ethan" == Ethan Benson <erbenson@alaska.net> writes:

    Ethan> your test mail never entered the mail queue, since you
    Ethan> don't have a world writable maildrop (this is not
    Ethan> /var/mail) it was impossible for the message to get
    Ethan> inserted into the postfix mail queue.

Oops, in that case I was obviously confused. I thought maildrop
was the last stage, not the first. Oh, I see:

/usr/sbin/maildrop != /usr/bin/maildrop

when I did "man maildrop" I got the second one. Oh well... I guess it
just proves, that no, my computer cannot read my mind ;-).

    Ethan> no, this is a security feature of the kernel, it is
    Ethan> actually rather common on unix like systems and i think its
    Ethan> defined by either posix or SUS but i could be mistaken.  s

If I had access to chgrp, then I also have access to chmod, so I don't
see any security benifit.

    Ethan> bits are also removed if the file is written to (so a world
    Ethan> writable setuid program can't be turned into a world
    Ethan> writable setuid /bin/sh by simply doing a cat /bin/sh >
    Ethan> /usr/bin/setuid)

false sense of security? Again, if you can write to the file, chances
are you can reset the s bit, too.

    Ethan> in the future if you have to change this quickly do
    Ethan> something like:

    Ethan> chgrp postdrop /usr/bin/postdrop ; chmod g+s
    Ethan> /usr/bin/postdrop

But then you can't do

find / -gid 104 | xargs chgrp 105

so the way I see it, this "security measure" actually is a "security
risk" because you have to replace the simple command line above with
something more complicated that saves/restores the permissions.
-- 
Brian May <bam@debian.org>



Reply to: