Re: Install program



Tom Tromey <tromey@cygnus.com> writes:
> >> This won't happen.  At least not in grpm.  It'd need to be suid
> >> root to do that, and there is no way I'm going to do that :-).  If
> >> you want to install as root, you'll need to su and then run grpm.
> >> Or, you can implement any policy you like with sudo.
> 
> Actually, you can do it without making grpm suid.  The way you can do
> this is to ask the user for a password (his own if using sudo, root's
> if using su) and then use `expect' to run the appropriate command
> (e.g., "sudo rpm -i ...").  Your expect script would send the password
> the user typed when (if) prompted.

Right, that would work, except that grpm doesn't call rpm.
It links against librpm and does everything through it.

-Marc



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]