<div dir="ltr">Funky, I tested the correct patch and then submitted this garbage.<div><br></div><div>Thanks for spotting this, new patch in the mail.</div><div><br></div><div>Alex</div></div><div class="gmail_extra"><br><br>
<div class="gmail_quote">On Wed, Sep 25, 2013 at 2:36 PM, Emilio Pozuelo Monfort <span dir="ltr"><<a href="mailto:pochu27@gmail.com" target="_blank">pochu27@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<div class="im"><br>
On 25/09/13 14:48, Alex DAMIAN wrote:<br>
> From: Alexandru DAMIAN <<a href="mailto:alexandru.damian@intel.com">alexandru.damian@intel.com</a>><br>
><br>
> Checking the return value from seteuid in<br>
> order to not launch clients with the wrong effective uid.<br>
><br>
> Signed-off-by: Alexandru DAMIAN <<a href="mailto:alexandru.damian@intel.com">alexandru.damian@intel.com</a>><br>
> ---<br>
> src/compositor.c | 7 +++++--<br>
> 1 file changed, 5 insertions(+), 2 deletions(-)<br>
><br>
> diff --git a/src/compositor.c b/src/compositor.c<br>
> index bc4837f..2a16f52 100644<br>
> --- a/src/compositor.c<br>
> +++ b/src/compositor.c<br>
> @@ -247,8 +247,11 @@ child_client_exec(int sockfd, const char *path)<br>
> sigfillset(&allsigs);<br>
> sigprocmask(SIG_UNBLOCK, &allsigs, NULL);<br>
><br>
> - /* Launch clients as the user. */<br>
> - seteuid(getuid());<br>
> + /* Launch clients as the user. Do not lauch clients with wrong euid.*/<br>
> + if (seteuid(getuid()) -1) {<br>
<br>
</div>Missing == operator; this code won't build as is.<br>
<span class="HOEnZb"><font color="#888888"><br>
Emilio<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
> + weston_log("compositor: failed seteuid\n");<br>
> + return;<br>
> + }<br>
><br>
> /* SOCK_CLOEXEC closes both ends, so we dup the fd to get a<br>
> * non-CLOEXEC fd to pass through exec. */<br>
><br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Alex Damian<div>Yocto Project<br></div><div>SSG / OTC </div></div>
</div>