<div dir="ltr">so do setuid/setgid?<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Apr 5, 2013 at 4:47 PM, Geoffrey Myers <span dir="ltr"><<a href="mailto:lists@serioustechnology.com" target="_blank">lists@serioustechnology.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div>Actually, this won't work as it execs a shell. The binary is suid for a particle user and the program being spawned needs to be executed by the same user. <div class="im">
<br><br><div>--</div><div>From my iP<span>hone</span></div><div>Geoffrey Myers</div></div></div><div><br><div class="im">On Apr 5, 2013, at 3:53 PM, David Tomaschik <<a href="mailto:david@systemoverlord.com" target="_blank">david@systemoverlord.com</a>> wrote:<br>
<br></div></div><div><div class="h5"><blockquote type="cite"><div><div dir="ltr">Must it be fork/exec specifically? Seems like popen would be easier... popen("somebinary arg1 arg2", "w"); then write stuff to the returned file ptr?</div>
<div class="gmail_extra"><br><br>
<div class="gmail_quote">On Fri, Apr 5, 2013 at 12:33 PM, Geoffrey Myers <span dir="ltr"><<a href="mailto:lists@serioustechnology.com" target="_blank">lists@serioustechnology.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
So, shaking some cobwebs loose here. How do I replace the following:<br>
<br>
system("echo stuff | somebinary arg1 arg2");<br>
<br>
With a fork/exec ??<br>
<br>
(Digging out my old C books....)<br>
<br>
--<br>