in reply to
$< and setuid: quite different animals?
Try it the other way round (first effective, then real):
$> = $uid;
$< = $uid;
$ sudo strace ./switchback.pl 2>&1 | grep '^setr'
setresuid(-1, 65534, -1) = 0
setreuid(65534, 4294967295) = 0
setresuid(-1, 0, -1) = -1 EPERM (Operation not perm
setreuid(0, 4294967295) = -1 EPERM (Operation not perm
By rote learning.
Via Genetic memory.
It's provided by my firmware.
I just remember them.
Thirty days hath September
My computer gets it right, usually.
I just ask someone else.
Someone punches me on the first of the month.
Results (198 votes),