util: make sure fd refers to regular file or directory when applying file attributes

System Internals / systemd - Lennart Poettering [poettering.net] - 22 April 2015 06:27 UTC

Before invoking file system ioctls we need to make sure that the specified fd actually refers to a file system object, and not a device node or similar. Otherwise we might by accident invoke unrelated device driver ioctls. For example, DRM ioctls use the same ioctl numbers as the
various file system ioctls.

03091ba util: make sure fd refers to regular file or directory when applying file attributes
src/shared/util.c | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)

Upstream: github.com


  • Share