>>>>> "Peter" == Peter Rundle <[EMAIL PROTECTED]> writes:

Peter> Peter Chubb wrote:
>> So do a setuid(geteuid()) in there...

Peter> Que? I don't follow, do you mean the "C" should look like;

Peter>   setuid(geteuid()); execlp(argv[1],argv[2]);

Yes, that's right.


Peter> I tried the above, but no joy, "./suidexec id" still reports

Peter> uid=501(prundle) gid=501(prundle) euid=502(matlab)

Ah.  Posix semantics.

Instead, do
         setreuid(geteuid(), -1);
that should fix it.


-- 
Dr Peter Chubb  http://www.gelato.unsw.edu.au  peterc AT gelato.unsw.edu.au
http://www.ertos.nicta.com.au           ERTOS within National ICT Australia
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to