System call confusion
Sep. 16th, 2005 04:19 pmIt turns out that yesterday's hook job badness wasn't down to YT arsing up his code, but instead it was down to an east/west coast split. It turns out that in New Jersey
setuid() lets you temporarily drop your privileges and pick them up again, whereas in Berzerkeley, if you drop your privs, they're gone for good unless you use setreuid(). Trouble is, using POSIX::setuid(), you don't really have a lot of choice about what it calls under the hood, so it's quite possible to run the same script on two different machines and to see two different behaviours.
no subject
Date: 2005-09-16 07:12 pm (UTC)no subject
Date: 2005-09-17 08:15 am (UTC)