On 11 Sep 2006 06:11:31 -0700,
richardrothwell@gmail.com
<richardrothwell@gmail.com> wrote:
> HI there, I have a small C program which acts as a wrapper to run an
> SUID shell script for running root commands. The current coding for
> this is as follows:
>
> #include <stdio.h>
> #include <stdlib.h>
>
> int main(void)
> {
> system("/path/to/script");
> return(0);
>
> }
>
>
> But although the C prog will run the script, I need to develop this
> further so that i can run like this:
>
> ./wrapper.c date
>
Wouldn't you be reinventing the wheel of sudo? If you really want to do
this, you could study the sudo source code.
--
<Joy> that's a Kludge(TM)
<knghtbrd> It Works(tm)
<Joy> AIX works(TM)
<knghtbrd> no it doesn't