in reply to RE: setuid scripts, how?
in thread setuid scripts, how?

Your C code is the same as this Perl code:

if( 110 == $< ) { $< = $>; $( = $); }

So you could write this wrapper in Perl or, much better, just add this code to your SUID perl script.