summaryrefslogtreecommitdiffstats
path: root/src/udev/cdrom_id/cdrom_id.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2022-09-17 19:03:15 +0200
committerGitHub <noreply@github.com>2022-09-17 19:03:15 +0200
commit0ea720ca7ea03a3dbf21a5d152e294b9a293dc3d (patch)
tree9f2b3217706eb05db1e260f2eddfd11e35f21275 /src/udev/cdrom_id/cdrom_id.c
parentMerge pull request #24708 from keszybz/not-available-in-tables (diff)
parentudev: use read_virtual_file() at one more place (diff)
downloadsystemd-0ea720ca7ea03a3dbf21a5d152e294b9a293dc3d.tar.xz
systemd-0ea720ca7ea03a3dbf21a5d152e294b9a293dc3d.zip
Merge pull request #24622 from yuwata/udev-open-with-noctty
udev: open with O_NOCTTY
Diffstat (limited to 'src/udev/cdrom_id/cdrom_id.c')
-rw-r--r--src/udev/cdrom_id/cdrom_id.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/udev/cdrom_id/cdrom_id.c b/src/udev/cdrom_id/cdrom_id.c
index 2d758c4082..5945dcbbae 100644
--- a/src/udev/cdrom_id/cdrom_id.c
+++ b/src/udev/cdrom_id/cdrom_id.c
@@ -743,7 +743,7 @@ static int open_drive(Context *c) {
assert(c->fd < 0);
for (int cnt = 0;; cnt++) {
- fd = open(arg_node, O_RDONLY|O_NONBLOCK|O_CLOEXEC);
+ fd = open(arg_node, O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_NOCTTY);
if (fd >= 0)
break;
if (++cnt >= 20 || errno != EBUSY)