OSDN Git Service

wayland: fix toctou violation when opening drm device
authorU. Artie Eoff <ullysses.a.eoff@intel.com>
Tue, 14 Nov 2017 17:52:45 +0000 (09:52 -0800)
committerXiang, Haihao <haihao.xiang@intel.com>
Thu, 16 Nov 2017 18:00:22 +0000 (10:00 -0800)
commit2ea89fcb5075d090432f1140f863e8a82201ea22
tree42d6f3cfe426cf8c65cd594ba7fdcc86002f8b66
parent4794b9989b91a3326d1819b972ec9d48e4b78139
wayland: fix toctou violation when opening drm device

A file's attributes could change between the stat() and the
open() operations.  Thus, check file attributes on the opened
file descriptor instead of the filename.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
va/wayland/va_wayland_drm.c