[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] C question
On 4/7/2013 16:03, Geoffrey Myers wrote:
> Yeah, I've got the standard parent writes to the child process down. That's not the issue. I've got to write to one process via a pipe. That process is not a process I'm writing, but an existing program. Again, check the example:
>
> system("echo stuff | somebinary arg1 arg2");
>
> The part I'm wrestling with is the:
>
> echo stuff | somebinary
>
Can you use sudo in the system() call to alter your running user (and
set up sudoers to allow password-less execution for that particular
binary from the apache user)?
system("echo stuff | sudo -u userof_somebinary somebinary arg1 arg2")