mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 08:25:20 +09:00
As requested in https://github.com/systemd/systemd/pull/27867#pullrequestreview-1567161854.
/dev/console, /dev/tty0, and /dev/ttyN are "different" device nodes
that may point to a single underlying device. We want to use a single
lock so that we don't get a race if different writers are using a different
device path, so let's just always lock around /dev/console.
This effectively makes the locking less granular.
Fixup for a0043bfa51.
Fixes https://github.com/systemd/systemd/issues/28721.
Maybe fixes https://github.com/systemd/systemd/issues/28778 and
https://github.com/systemd/systemd/issues/28634.
11 lines
249 B
C
11 lines
249 B
C
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
|
#pragma once
|
|
|
|
#include <sys/types.h>
|
|
|
|
int lock_dev_console(void);
|
|
|
|
int dev_setup(const char *prefix, uid_t uid, gid_t gid);
|
|
|
|
int make_inaccessible_nodes(const char *parent_dir, uid_t uid, gid_t gid);
|