mirror of
https://github.com/systemd/systemd.git
synced 2025-08-03 08:22:21 +03:00
udev/v4l_id: use O_CLOEXEC|O_NOCTTY
This is the usual set of flags. O_CLOEXEC doesn't matter because we don't spawn anything, but O_NOCTTY could possibly make a difference if the helper is called on a wrong device type.
This commit is contained in:
@ -74,7 +74,7 @@ static int run(int argc, char *argv[]) {
|
||||
if (r <= 0)
|
||||
return r;
|
||||
|
||||
fd = open(arg_device, O_RDONLY);
|
||||
fd = open(arg_device, O_RDONLY|O_CLOEXEC|O_NOCTTY);
|
||||
if (fd < 0)
|
||||
return log_error_errno(errno, "Failed to open %s: %m", arg_device);
|
||||
|
||||
|
Reference in New Issue
Block a user