Re: RedHat Question
From: Jared Still <jkstill_at_gmail.com>
Date: Thu, 8 May 2008 09:59:59 -0700
Message-ID: <bf46380805080959n259fdd45rf6536095eeac4682@mail.gmail.com>
Date: Thu, 8 May 2008 09:59:59 -0700
Message-ID: <bf46380805080959n259fdd45rf6536095eeac4682@mail.gmail.com>
On Thu, May 8, 2008 at 6:18 AM, Roman Podshivalov <
roman.podshivalov_at_gmail.com> wrote:
> Jared,
>
> To run it with root privileges you have to have a SUID bit set and use
> setuid(geteuid) routine in your code. But If memory serves me correctly if
> you set it first before chown your script to root it'll disappear (just to
> prevent such a security hole). And once script belongs to root you cannot
> set SUID bit on it anyway 8-)
>
> --romas
>
>
It's been awhile, but I've done just that on older versions of Unix.
Something like 'create script, chmod u+s script, chown root script'
Which is why it is normally no longer possible.
-- Jared Still Certifiable Oracle DBA and Part Time Perl Evangelist -- http://www.freelists.org/webpage/oracle-lReceived on Thu May 08 2008 - 11:59:59 CDT