Rich Pinkall Pollei rpollei at
Wed Jan 9 09:52:41 EST 2002

> ... in the program, it does not use 'system("sudo cp /etc/* ./")'
> instead the program calls for 'cp(), utime(), chmod(), and other
> FUNCTIONs. Is there any other way to use sudo???


I'm afraid `sudo' will not help in your particular environment.  You
could use the `seteuid' system call as necessary to turn off root
privileges for portions of the program, but the program will still
need to run with root privileges initially, so this method will not
protect against a trojan program being substituted for yours.

A more complex solution might be to split off the calls that require
root privileges to a separate server process, with an appropriate
interface to the unprivileged portions of your program.

Rich Pinkall Pollei
Security Analyst/Systems Engineer
Support Services
Information Technology Division
Cooperative Resources International
There are two means of refuge from the miseries of life: music and

More information about the sudo-users mailing list