[PATCH weston] launcher-util: Force all weston_launcher_open()s to use O_CLOEXEC

Pekka Paalanen ppaalanen at gmail.com
Fri May 15 08:11:31 PDT 2015


On Fri,  1 May 2015 11:46:36 -0500
Derek Foreman <derekf at osg.samsung.com> wrote:

> Really, there's pretty much no time we'd ever want O_CLOEXEC unset,
> as it will likely result in leaking fds to processes that aren't
> interested in them or shouldn't have them.
> 
> This also removes the (now unused) code from weston_logind_open() that
> could drop O_CLOEXEC.
> 
> Signed-off-by: Derek Foreman <derekf at osg.samsung.com>
> ---
> Daniel suggested I do something like this instead of fixing all the
> callers as I did in my previous patches.
> 
> I think this should supersede my previous two patches on the subject.
> 
> It's still possible for someone to leak fds to child processes if they
> really want to (by using fcntl to clear O_CLOEXEC).  I really can't think
> of a use case for that.  By making it much harder to do on purpose it's
> become almost impossible to do by accident...
> 
>  src/launcher-util.c |  8 +++++++-
>  src/logind-util.c   | 20 ++------------------
>  2 files changed, 9 insertions(+), 19 deletions(-)

Pushed.
   b0f5a25..2663c68  master -> master

Thanks,
pq


More information about the wayland-devel mailing list