I have the following program in .c set as setuid chmod only read/execute by owner and will set it immutable, as i will the php script it invokes.
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>
int main(int argc, char *argv[] )
{
setuid( 0 );
execv( "/var/tools/control.php", argv );
return 0;
}
is this in itself a security risk ? is it possible to push other commands via argv or some other thing i didnt think of ? Im not asking about the php script just this proxy program.