summaryrefslogtreecommitdiff
path: root/src/udev/udev-builtin-input_id.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2022-09-10 01:56:19 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2022-09-10 07:16:43 +0900
commit32703bd14cc6c11354795e1c600b1618944722ae (patch)
tree0940d60e9d83b6158bca711949096a5fd4743e4b /src/udev/udev-builtin-input_id.c
parent9a18458834ed6fe560879b2ddd6909d26b755fa3 (diff)
downloadsystemd-32703bd14cc6c11354795e1c600b1618944722ae.tar.gz
udev: always open with O_NOCTTY
All files or device nodes opened here should not be console tty. Let's open it the flags for safety.
Diffstat (limited to 'src/udev/udev-builtin-input_id.c')
-rw-r--r--src/udev/udev-builtin-input_id.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/udev/udev-builtin-input_id.c b/src/udev/udev-builtin-input_id.c
index 6da8ad85bb..0742120248 100644
--- a/src/udev/udev-builtin-input_id.c
+++ b/src/udev/udev-builtin-input_id.c
@@ -50,7 +50,7 @@ static void extract_info(sd_device *dev, bool test) {
struct input_absinfo xabsinfo = {}, yabsinfo = {};
_cleanup_close_ int fd = -1;
- fd = sd_device_open(dev, O_RDONLY|O_CLOEXEC|O_NONBLOCK);
+ fd = sd_device_open(dev, O_RDONLY|O_CLOEXEC|O_NONBLOCK|O_NOCTTY);
if (fd < 0)
return;