in reply to Future security worries?
and make the executable setuid as appropriate. I would, however, be cautious using the above code lest you should unintentionally allow someone to run any program on the system as root: you would want to be absolutely sure that no-one would be able to replace the code of "foo.pl" with something unintended as the very first thing. You should also ensure that any program thus wrapped has taint mode on with the '-T' on the shebang line.#include <unistd.h> int main( int argc, char **argv) { execv("./foo.pl", argv); }
/J\
|
|---|