mirror of
https://github.com/systemd/systemd
synced 2026-03-24 15:55:00 +01:00
Compare commits
14 Commits
84817bfdb3
...
8a513eee30
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8a513eee30 | ||
|
|
2846007ecf | ||
|
|
5865dc1493 | ||
|
|
bd73806888 | ||
|
|
c5f62204ee | ||
|
|
cb18d4e5d9 | ||
|
|
4f11590f9b | ||
|
|
6476676b84 | ||
|
|
25e399948b | ||
|
|
2d50e3c7bc | ||
|
|
9f5c4c80d0 | ||
|
|
15c04125a2 | ||
|
|
1ba328a1e6 | ||
|
|
343ff58001 |
@ -68,6 +68,11 @@ usb:v08FFp5731*
|
||||
usb:v5501p08FF*
|
||||
ID_AUTOSUSPEND=1
|
||||
|
||||
# Supported by libfprint driver egis0570
|
||||
usb:v1C7Ap0570*
|
||||
usb:v1C7Ap0571*
|
||||
ID_AUTOSUSPEND=1
|
||||
|
||||
# Supported by libfprint driver elan
|
||||
usb:v04F3p0903*
|
||||
usb:v04F3p0907*
|
||||
@ -127,6 +132,11 @@ usb:v04F3p0C42*
|
||||
usb:v04F3p0C4D*
|
||||
usb:v04F3p0C4F*
|
||||
usb:v04F3p0C63*
|
||||
usb:v04F3p0C6E*
|
||||
ID_AUTOSUSPEND=1
|
||||
|
||||
# Supported by libfprint driver elanmoc
|
||||
usb:v04F3p0C7E*
|
||||
ID_AUTOSUSPEND=1
|
||||
|
||||
# Supported by libfprint driver etes603
|
||||
@ -264,7 +274,6 @@ usb:v147Ep1002*
|
||||
usb:v1491p0088*
|
||||
usb:v16D1p1027*
|
||||
usb:v1C7Ap0300*
|
||||
usb:v1C7Ap0570*
|
||||
usb:v1C7Ap0575*
|
||||
usb:v27C6p5042*
|
||||
usb:v27C6p5110*
|
||||
|
||||
@ -112,14 +112,6 @@ ieee1394:ven*sp0000A02Dver00000110
|
||||
# BridgeCo. Enhancement BreakOut Box (BeBoB) for DM1000, DM1100, and DM1500 ASICs.
|
||||
#
|
||||
|
||||
# Match to eAR Master One, Eroica, Figaro, and Ciaccona.
|
||||
ieee1394:node:ven0x000aacmo0x000002units0x00a02d:0x010001
|
||||
ieee1394:ven00000AACmo00000002sp0000A02Dver00010001
|
||||
ID_VENDOR_FROM_DATABASE=Acoustic Reality
|
||||
ID_MODEL_FROM_DATABASE=eAR FireWire Audio
|
||||
IEEE1394_UNIT_FUNCTION_AUDIO=1
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=0
|
||||
|
||||
ieee1394:node:ven0x0003dbmo0x01eeeeunits0x00a02d:0x010001
|
||||
ieee1394:ven000003DBmo0001EEEEsp0000A02Dver00010001
|
||||
ID_VENDOR_FROM_DATABASE=Apogee Electronics
|
||||
@ -322,7 +314,7 @@ ieee1394:ven00000FF2mo00010065sp0000A02Dver00010001
|
||||
IEEE1394_UNIT_FUNCTION_AUDIO=1
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=0
|
||||
|
||||
# An extension card for Mackie d.2.
|
||||
# An extension card for Mackie d.2. Mackie d.2 Pro is preinstalled model.
|
||||
ieee1394:node:ven0x000ff2mo0x010067units0x00a02d:0x010001
|
||||
ieee1394:ven00000FF2mo00010067sp0000A02Dver00010001
|
||||
ID_VENDOR_FROM_DATABASE=Loud Technologies
|
||||
@ -330,8 +322,41 @@ ieee1394:ven00000FF2mo00010067sp0000A02Dver00010001
|
||||
IEEE1394_UNIT_FUNCTION_AUDIO=1
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=0
|
||||
|
||||
# Match to FireFly 202, 302, 808, and 808 Universal.
|
||||
# Match to HelixBoard 12 mk II, 18 mk II, 24 mk II, 12 Universal, 18 Universal, and 24 Universal.
|
||||
ieee1394:node:ven0x001496mo0x050000units0x00a02d:0x010001
|
||||
ieee1394:ven00001496mo00050000sp0000A02Dver00010001
|
||||
ID_VENDOR_FROM_DATABASE=Phonic
|
||||
ID_MODEL_FROM_DATABASE=Helixboard 12 FireWire MkII
|
||||
IEEE1394_UNIT_FUNCTION_MIDI=1
|
||||
IEEE1394_UNIT_FUNCTION_AUDIO=1
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=0
|
||||
|
||||
ieee1394:node:ven0x001496mo0x060000units0x00a02d:0x010001
|
||||
ieee1394:ven00001496mo00060000sp0000A02Dver00010001
|
||||
ID_VENDOR_FROM_DATABASE=Phonic
|
||||
ID_MODEL_FROM_DATABASE=Helixboard 18 FireWire MkII
|
||||
IEEE1394_UNIT_FUNCTION_MIDI=1
|
||||
IEEE1394_UNIT_FUNCTION_AUDIO=1
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=0
|
||||
|
||||
ieee1394:node:ven0x001496mo0x070000units0x00a02d:0x010001
|
||||
ieee1394:ven00001496mo00070000sp0000A02Dver00010001
|
||||
ID_VENDOR_FROM_DATABASE=Phonic
|
||||
ID_MODEL_FROM_DATABASE=Helixboard 24 FireWire MkII
|
||||
IEEE1394_UNIT_FUNCTION_MIDI=1
|
||||
IEEE1394_UNIT_FUNCTION_AUDIO=1
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=0
|
||||
|
||||
ieee1394:node:ven0x001496mo0x080000units0x00a02d:0x010001
|
||||
ieee1394:ven00001496mo00080000sp0000A02Dver00010001
|
||||
ID_VENDOR_FROM_DATABASE=Phonic
|
||||
ID_MODEL_FROM_DATABASE=Firefly 808 FireWire
|
||||
IEEE1394_UNIT_FUNCTION_MIDI=1
|
||||
IEEE1394_UNIT_FUNCTION_AUDIO=1
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=0
|
||||
|
||||
# Match to FireFly 202, 302, 808 Universal.
|
||||
# Match to HelixBoard 12 FireWire, 18 FireWire, 24 FireWire.
|
||||
# Match to HelixBoard 12 Universal, 18 Universal, and 24 Universal.
|
||||
ieee1394:node:ven0x001496mo0x000000units0x00a02d:0x010001
|
||||
ieee1394:ven00001496mo00000000sp0000A02Dver00010001
|
||||
ID_VENDOR_FROM_DATABASE=Phonic
|
||||
@ -386,6 +411,15 @@ ieee1394:ven00010065mo00010067sp0000A02Dver00010001
|
||||
IEEE1394_UNIT_FUNCTION_AUDIO=1
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=0
|
||||
|
||||
# Match to TerraTec Aureon 7.1 FireWire.
|
||||
# Match to eAR Master One, Eroica, Figaro, and Ciaccona. OEM by TerraTec perhaps.
|
||||
ieee1394:node:ven0x000aacmo0x000002units0x00a02d:0x010001
|
||||
ieee1394:ven00000AACmo00000002sp0000A02Dver00010001
|
||||
ID_VENDOR_FROM_DATABASE=TerraTec
|
||||
ID_MODEL_FROM_DATABASE=Aureon 7.1 FireWire
|
||||
IEEE1394_UNIT_FUNCTION_AUDIO=1
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=0
|
||||
|
||||
ieee1394:node:ven0x000aacmo0x000003units0x00a02d:0x010001
|
||||
ieee1394:ven00000AACmo00000003sp0000A02Dver00010001
|
||||
ID_VENDOR_FROM_DATABASE=TerraTec Electronic
|
||||
@ -545,6 +579,7 @@ ieee1394:ven00000FF2mo00081216sp0000A02Dver00010001
|
||||
IEEE1394_UNIT_FUNCTION_AUDIO=1
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=0
|
||||
|
||||
# Match to former model of Onyx 1640i.
|
||||
ieee1394:node:ven0x000ff2mo0x001640units0x00a02d:0x010001
|
||||
ieee1394:ven00000FF2mo00001640sp0000A02Dver00010001
|
||||
ID_VENDOR_FROM_DATABASE=Loud Technologies
|
||||
@ -707,7 +742,7 @@ ieee1394:ven00000FF2mo00000007sp00000FF2ver00000001
|
||||
ID_MODEL_FROM_DATABASE=Mackie Onyx Blackbird
|
||||
IEEE1394_UNIT_FUNCTION_AUDIO=1
|
||||
|
||||
# Match to Onyx 1640i, and latter models of Onyx 820i, 1220i, and 1620i.
|
||||
# Match to latter models of Onyx 820i, 1220i, 1620i, and 1640i.
|
||||
ieee1394:node:ven0x000ff2mo0x000006units0x000ff2:0x000001
|
||||
ieee1394:ven00000FF2mo00000006sp00000FF2ver00000001
|
||||
ID_VENDOR_FROM_DATABASE=Loud Technologies
|
||||
|
||||
@ -172,7 +172,7 @@
|
||||
for the first time it is possible to configure the root user's password to be <literal>systemd</literal>
|
||||
like this:</para>
|
||||
|
||||
<para><programlisting># systemd-nspawn --image=… --set-credential=password.hashed-password.root:'$y$j9T$yAuRJu1o5HioZAGDYPU5d.$F64ni6J2y2nNQve90M/p0ZP0ECP/qqzipNyaY9fjGpC' …</programlisting></para>
|
||||
<para><programlisting># systemd-nspawn --image=… --set-credential=passwd.hashed-password.root:'$y$j9T$yAuRJu1o5HioZAGDYPU5d.$F64ni6J2y2nNQve90M/p0ZP0ECP/qqzipNyaY9fjGpC' …</programlisting></para>
|
||||
|
||||
<para>Note again that the data specified in these credentials is consulted only when creating an account
|
||||
for the first time, it may not be used for changing the password or shell of an account that already
|
||||
|
||||
@ -160,6 +160,24 @@ bool cg_freezer_supported(void) {
|
||||
return supported;
|
||||
}
|
||||
|
||||
bool cg_kill_supported(void) {
|
||||
static thread_local int supported = -1;
|
||||
|
||||
if (supported >= 0)
|
||||
return supported;
|
||||
|
||||
if (cg_all_unified() <= 0)
|
||||
supported = false;
|
||||
else if (access("/sys/fs/cgroup/init.scope/cgroup.kill", F_OK) < 0) {
|
||||
if (errno != ENOENT)
|
||||
log_debug_errno(errno, "Failed to check if cgroup.kill is available, assuming not: %m");
|
||||
supported = false;
|
||||
} else
|
||||
supported = true;
|
||||
|
||||
return supported;
|
||||
}
|
||||
|
||||
int cg_enumerate_subgroups(const char *controller, const char *path, DIR **_d) {
|
||||
_cleanup_free_ char *fs = NULL;
|
||||
int r;
|
||||
@ -358,6 +376,29 @@ int cg_kill(
|
||||
return cg_kill_items(controller, path, sig, flags, s, log_kill, userdata, "cgroup.threads");
|
||||
}
|
||||
|
||||
int cg_kill_kernel_sigkill(const char *controller, const char *path) {
|
||||
/* Kills the cgroup at `path` directly by writing to its cgroup.kill file.
|
||||
* This sends SIGKILL to all processes in the cgroup and has the advantage of
|
||||
* being completely atomic, unlike cg_kill_items. */
|
||||
int r;
|
||||
_cleanup_free_ char *killfile = NULL;
|
||||
|
||||
assert(path);
|
||||
|
||||
if (!cg_kill_supported())
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
r = cg_get_path(controller, path, "cgroup.kill", &killfile);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
r = write_string_file(killfile, "1", WRITE_STRING_FILE_DISABLE_BUFFER);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int cg_kill_recursive(
|
||||
const char *controller,
|
||||
const char *path,
|
||||
@ -375,38 +416,46 @@ int cg_kill_recursive(
|
||||
assert(path);
|
||||
assert(sig >= 0);
|
||||
|
||||
if (!s) {
|
||||
s = allocated_set = set_new(NULL);
|
||||
if (!s)
|
||||
return -ENOMEM;
|
||||
}
|
||||
if (sig == SIGKILL && cg_kill_supported() &&
|
||||
!FLAGS_SET(flags, CGROUP_IGNORE_SELF) && !s && !log_kill) {
|
||||
/* ignore CGROUP_SIGCONT, since this is a no-op alongside SIGKILL */
|
||||
ret = cg_kill_kernel_sigkill(controller, path);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
} else {
|
||||
if (!s) {
|
||||
s = allocated_set = set_new(NULL);
|
||||
if (!s)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
ret = cg_kill(controller, path, sig, flags, s, log_kill, userdata);
|
||||
ret = cg_kill(controller, path, sig, flags, s, log_kill, userdata);
|
||||
|
||||
r = cg_enumerate_subgroups(controller, path, &d);
|
||||
if (r < 0) {
|
||||
if (ret >= 0 && r != -ENOENT)
|
||||
return r;
|
||||
r = cg_enumerate_subgroups(controller, path, &d);
|
||||
if (r < 0) {
|
||||
if (ret >= 0 && r != -ENOENT)
|
||||
return r;
|
||||
|
||||
return ret;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
while ((r = cg_read_subgroup(d, &fn)) > 0) {
|
||||
_cleanup_free_ char *p = NULL;
|
||||
while ((r = cg_read_subgroup(d, &fn)) > 0) {
|
||||
_cleanup_free_ char *p = NULL;
|
||||
|
||||
p = path_join(empty_to_root(path), fn);
|
||||
free(fn);
|
||||
if (!p)
|
||||
return -ENOMEM;
|
||||
p = path_join(empty_to_root(path), fn);
|
||||
free(fn);
|
||||
if (!p)
|
||||
return -ENOMEM;
|
||||
|
||||
r = cg_kill_recursive(controller, p, sig, flags, s, log_kill, userdata);
|
||||
if (r != 0 && ret >= 0)
|
||||
r = cg_kill_recursive(controller, p, sig, flags, s, log_kill, userdata);
|
||||
if (r != 0 && ret >= 0)
|
||||
ret = r;
|
||||
}
|
||||
if (ret >= 0 && r < 0)
|
||||
ret = r;
|
||||
}
|
||||
if (ret >= 0 && r < 0)
|
||||
ret = r;
|
||||
|
||||
if (flags & CGROUP_REMOVE) {
|
||||
if (FLAGS_SET(flags, CGROUP_REMOVE)) {
|
||||
r = cg_rmdir(controller, path);
|
||||
if (r < 0 && ret >= 0 && !IN_SET(r, -ENOENT, -EBUSY))
|
||||
return r;
|
||||
|
||||
@ -172,6 +172,7 @@ typedef enum CGroupFlags {
|
||||
typedef int (*cg_kill_log_func_t)(pid_t pid, int sig, void *userdata);
|
||||
|
||||
int cg_kill(const char *controller, const char *path, int sig, CGroupFlags flags, Set *s, cg_kill_log_func_t kill_log, void *userdata);
|
||||
int cg_kill_kernel_sigkill(const char *controller, const char *path);
|
||||
int cg_kill_recursive(const char *controller, const char *path, int sig, CGroupFlags flags, Set *s, cg_kill_log_func_t kill_log, void *userdata);
|
||||
|
||||
int cg_split_spec(const char *spec, char **ret_controller, char **ret_path);
|
||||
@ -272,6 +273,7 @@ int cg_kernel_controllers(Set **controllers);
|
||||
|
||||
bool cg_ns_supported(void);
|
||||
bool cg_freezer_supported(void);
|
||||
bool cg_kill_supported(void);
|
||||
|
||||
int cg_all_unified(void);
|
||||
int cg_hybrid_unified(void);
|
||||
|
||||
@ -245,7 +245,7 @@ EFI_STATUS process_random_seed(EFI_FILE *root_dir, RandomSeedMode mode) {
|
||||
|
||||
err = uefi_call_wrapper(root_dir->Open, 5, root_dir, &handle, (CHAR16*) L"\\loader\\random-seed", EFI_FILE_MODE_READ|EFI_FILE_MODE_WRITE, 0ULL);
|
||||
if (EFI_ERROR(err)) {
|
||||
if (err != EFI_NOT_FOUND)
|
||||
if (err != EFI_NOT_FOUND && err != EFI_WRITE_PROTECTED)
|
||||
Print(L"Failed to open random seed file: %r\n", err);
|
||||
return err;
|
||||
}
|
||||
|
||||
@ -765,7 +765,9 @@ static int ndisc_router_process_autonomous_prefix(Link *link, sd_ndisc_router *r
|
||||
assert(link);
|
||||
assert(rt);
|
||||
|
||||
r = sd_ndisc_router_get_timestamp(rt, clock_boottime_or_monotonic(), &time_now);
|
||||
/* Do not use clock_boottime_or_monotonic() here, as the kernel internally manages cstamp and
|
||||
* tstamp with jiffies, and it is not increased while the system is suspended. */
|
||||
r = sd_ndisc_router_get_timestamp(rt, CLOCK_MONOTONIC, &time_now);
|
||||
if (r < 0)
|
||||
return log_link_error_errno(link, r, "Failed to get RA timestamp: %m");
|
||||
|
||||
|
||||
@ -11,6 +11,7 @@ TEST_NO_NSPAWN=1
|
||||
test_append_files() {
|
||||
(
|
||||
local workspace="${1:?}"
|
||||
dracut_install busybox
|
||||
|
||||
if selinuxenabled >/dev/null; then
|
||||
dracut_install selinuxenabled
|
||||
|
||||
@ -126,7 +126,6 @@ BASICTOOLS=(
|
||||
base64
|
||||
basename
|
||||
bash
|
||||
busybox
|
||||
capsh
|
||||
cat
|
||||
chmod
|
||||
@ -229,7 +228,7 @@ is_built_with_asan() {
|
||||
|
||||
# Borrowed from https://github.com/google/oss-fuzz/blob/cd9acd02f9d3f6e80011cc1e9549be526ce5f270/infra/base-images/base-runner/bad_build_check#L182
|
||||
local _asan_calls
|
||||
_asan_calls="$(objdump -dC "$SYSTEMD_JOURNALD" | grep -E "(callq?|brasl?)\s+[^ <]+\s+<__asan" -c)"
|
||||
_asan_calls="$(objdump -dC "$SYSTEMD_JOURNALD" | grep -E "(callq?|brasl?|bl)\s.+__asan" -c)"
|
||||
if ((_asan_calls < 1000)); then
|
||||
return 1
|
||||
else
|
||||
@ -1681,6 +1680,11 @@ inst_libs() {
|
||||
|
||||
while read -r line; do
|
||||
[[ "$line" = 'not a dynamic executable' ]] && break
|
||||
# Skip a harmless error when running the tests on a system with a significantly
|
||||
# older systemd version (ldd tries to resolve the unprefixed RPATH for libsystemd.so.0,
|
||||
# which is in this case older than the already installed libsystemd.so.0 in $initdir).
|
||||
# The issue is triggered by installing test dependencies in install_missing_libraries().
|
||||
[[ "$line" =~ libsystemd.so.*:\ version\ .*\ not\ found ]] && continue
|
||||
|
||||
if [[ "$line" =~ $so_regex ]]; then
|
||||
file="${BASH_REMATCH[1]}"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user