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 ); } ----------------------------------------------------------------- gopher://quux.org/ conversion by John Goerzen of http://communication.ucsd.edu/A-News/ This Usenet Oldnews Archive article may be copied and distributed freely, provided: 1. There is no money collected for the text(s) of the articles. 2. The following notice remains appended to each copy: The Usenet Oldnews Archive: Compilation Copyright (C) 1981, 1996 Bruce Jones, Henry Spencer, David Wiseman.