On Tue, Jan 08, 2002 at 12:01:53PM +0900, iEqual wrote:
> thought that I could use "sudo" to use only needed commands can be run
> by a certain user.  However, our programmers are developing our
> solution in C++ and I have no clue how to apply "sudo" to our
> solution.  For example, in the program, it does not use 'system("sudo
> cp /etc/* ./")' instead the program calls for 'cp()' function. Is
> there any other way to use sudo???  

sudo is really intended for system administrators who wish to delegate
tasks to other users on the system, without handing over root.

Programs that require fiddling with user/group permissions really should
be using the POSIX functions getuid, setuid, etc .. to perform these
operations. And yes, the security implications are extreme, so consider
reading, for example, Stephens's Advanced Programming in the Unix
Environment's section on the get/set id functions, before starting work.

Cheers

-- 
"I'm not sure which upsets me more: that people are so unwilling
to accept responsibility for their own actions, or that they are
so eager to regulate everyone else's." -- Kee Hinckley

Attachment: msg00116/pgp00000.pgp
Description: PGP signature

Reply via email to