diff options
author | Lennart Poettering <lennart@poettering.net> | 2022-09-17 19:03:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-17 19:03:15 +0200 |
commit | 0ea720ca7ea03a3dbf21a5d152e294b9a293dc3d (patch) | |
tree | 9f2b3217706eb05db1e260f2eddfd11e35f21275 /src/udev/udevd.c | |
parent | eb5b6b73103bf707111d19335cda19d3006bfd39 (diff) | |
parent | 43be6d59bd61e879f1aa9203b50f477afd7463bd (diff) | |
download | systemd-0ea720ca7ea03a3dbf21a5d152e294b9a293dc3d.tar.gz |
Merge pull request #24622 from yuwata/udev-open-with-noctty
udev: open with O_NOCTTY
Diffstat (limited to 'src/udev/udevd.c')
-rw-r--r-- | src/udev/udevd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/udev/udevd.c b/src/udev/udevd.c index 8451313f55..20a9a8cdbe 100644 --- a/src/udev/udevd.c +++ b/src/udev/udevd.c @@ -544,7 +544,7 @@ static int worker_lock_whole_disk(sd_device *dev, int *ret_fd) { if (r == 0) goto nolock; - fd = sd_device_open(dev_whole_disk, O_RDONLY|O_CLOEXEC|O_NONBLOCK); + fd = sd_device_open(dev_whole_disk, O_RDONLY|O_CLOEXEC|O_NONBLOCK|O_NOCTTY); if (fd < 0) { bool ignore = ERRNO_IS_DEVICE_ABSENT(fd); @@ -599,7 +599,7 @@ static int worker_mark_block_device_read_only(sd_device *dev) { if (STARTSWITH_SET(val, "dm-", "md", "drbd", "loop", "nbd", "zram")) return 0; - 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 log_device_debug_errno(dev, fd, "Failed to open '%s', ignoring: %m", val); |