Ayale-com.669 net.unix-wizards utzoo!decvax!yale-com!mp Fri Jan 8 23:00:08 1982 Lauren@UCLA-Security's problem Here is one suggestion: Add a system call which allows a process with effective uid == 0, to change the effective uid of ANOTHER process. (The system call will take as one argument, the process id of the process whose euid is to be changed.) Then for the problem, something like this would do: pid = fork(); if ( pid != 0 ) { signal( SIGINT, reset_uid ); for(;;) pause(); } /* child */ setuid( getuid() ); /* ... do whatever needs to be done ... */ killpg( 0, SIGINT ); /* ... Now you are back to euid == 0. */ /* ... */ reset_uid() { newsetuid( pid, 0 ); exit( 0 ); }