title: popen fails when called after seteuid(0)
body: <p>My C code does a </p>
  
  <pre><code> seteuid (euid);
   popen("/root/bin/iptables ....", "r");
  </code></pre>
  
  <p>and it fails even if I call with seteuid(0). (The executables has setuid on).</p>
  
  <p>It seems that seteuid and popen do not work together.</p>
  
  <p>When popen called it prints in stderr the following msg</p>
  
  <pre><code>iptables v1.4.6: can't initialize iptables table : Permission denied (you must be root)
  </code></pre>
  
  <p>In other words popen "succeeds", but because a new shell is created the permissions are not maintained and the use case fails. </p>
  
  <p>How can I solve the problem? </p>