diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-09-10 01:56:19 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-09-10 07:16:43 +0900 |
commit | 32703bd14cc6c11354795e1c600b1618944722ae (patch) | |
tree | 0940d60e9d83b6158bca711949096a5fd4743e4b /src/udev/ata_id/ata_id.c | |
parent | 9a18458834ed6fe560879b2ddd6909d26b755fa3 (diff) | |
download | systemd-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/ata_id/ata_id.c')
-rw-r--r-- | src/udev/ata_id/ata_id.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/udev/ata_id/ata_id.c b/src/udev/ata_id/ata_id.c index 1fc27f4b64..f451c0d0e1 100644 --- a/src/udev/ata_id/ata_id.c +++ b/src/udev/ata_id/ata_id.c @@ -439,7 +439,7 @@ int main(int argc, char *argv[]) { return 1; } - fd = open(node, O_RDONLY|O_NONBLOCK|O_CLOEXEC); + fd = open(node, O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_NOCTTY); if (fd < 0) { log_error("unable to open '%s'", node); return 1; |