chiark / gitweb /
util: make sure fd refers to regular file or directory when applying file attributes
authorLennart Poettering <lennart@poettering.net>
Wed, 22 Apr 2015 11:05:26 +0000 (13:05 +0200)
committerSven Eden <yamakuzure@gmx.net>
Tue, 14 Mar 2017 07:09:35 +0000 (08:09 +0100)
commite50b238ba361def3ce7987b0ca58f4f90e6dfd99
treeba5c51eecbce0795c39dd0414edf556eff138fea
parent4f903e3b2126cb46097fd6b4647718d07a4914f2
util: make sure fd refers to regular file or directory when applying file attributes

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.
src/shared/util.c