[PATCH weston] compositor-drm: Open drm device with CLOEXEC
Hardening
rdp.effort at gmail.com
Mon May 4 08:08:28 PDT 2015
Le 01/05/2015 16:59, Derek Foreman a écrit :
> Signed-off-by: Derek Foreman <derekf at osg.samsung.com>
> ---
> src/compositor-drm.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/compositor-drm.c b/src/compositor-drm.c
> index 43197a8..6a2dbd9 100644
> --- a/src/compositor-drm.c
> +++ b/src/compositor-drm.c
> @@ -1329,7 +1329,8 @@ init_drm(struct drm_compositor *ec, struct udev_device *device)
> }
>
> filename = udev_device_get_devnode(device);
> - fd = weston_launcher_open(ec->base.launcher, filename, O_RDWR);
> + fd = weston_launcher_open(ec->base.launcher, filename,
> + O_RDWR | O_CLOEXEC);
> if (fd < 0) {
> /* Probably permissions error */
> weston_log("couldn't open %s, skipping\n",
>
Reviewed-By: David FORT <contact at hardening-consulting.com>
--
David FORT
website: http://www.hardening-consulting.com/
More information about the wayland-devel
mailing list