<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Hi Javier,<br>
</p>
<p>grep -ril startupitem.executable
/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/
| xargs less<br>
</p>
suggests that sudo -u is the way to do it if a program doesn't know
how to drop privileges. If that doesn't work, I guess several ports
have the same problem that you describe with su. sudo does fork a
process per the man page, so they may do.<br>
<br>
Russell<br>
<br>
(sent to macports-dev)<br>
<br>
<div class="moz-cite-prefix">On 17/09/16 16:12, Javier Alcázar
wrote:<br>
</div>
<blockquote
cite="mid:CAN-mWPeaSCv4EiPwv9AKjkJrpNZ35ibkeN9n-YhGtWYBcBCsKQ@mail.gmail.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<div dir="ltr">
<div>Hi people,<br>
</div>
<div><br>
</div>
<div>I'm creating a new Portfile with <font face="monospace,
monospace">startupitem.executable</font>, and wondering what
is the best way to execute the command with a specific user.</div>
<div><br>
</div>
<div>I tried using "<font face="monospace, monospace">su -c
executable args</font>" but with this approach <font
face="monospace, monospace">launchd</font> ends up
monitoring the "<font face="monospace, monospace">su</font>"
process instead of the "<font face="monospace, monospace">executable</font>"<br>
<br>
What would you recommend to do so launchd looks at the "<font
face="monospace, monospace">executable</font>" process?</div>
<div><br>
<br>
<br>
<br>
</div>
<div><br>
</div>
<div>Cheers</div>
<div><br>
</div>
<div>
<div><br>
</div>
-- <br>
<div>
<div dir="ltr"><span style="font-size:12.8px">Javier</span><br>
</div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
macports-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:macports-users@lists.macosforge.org">macports-users@lists.macosforge.org</a>
<a class="moz-txt-link-freetext" href="https://lists.macosforge.org/mailman/listinfo/macports-users">https://lists.macosforge.org/mailman/listinfo/macports-users</a>
</pre>
</blockquote>
<br>
</body>
</html>