summaryrefslogtreecommitdiff
path: root/src/udev/ata_id/ata_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/ata_id/ata_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/ata_id/ata_id.c')
-rw-r--r--src/udev/ata_id/ata_id.c2
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;