1
0
mirror of https://github.com/systemd/systemd synced 2025-11-22 02:04:45 +01:00

Compare commits

..

No commits in common. "dbcbe4aa0488ce130d574ef1a6d457045eac0bbb" and "463f0a027a6a6a842bd026979a9aeb841c732bb1" have entirely different histories.

6 changed files with 19 additions and 32 deletions

View File

@ -52,13 +52,12 @@
<refsect1>
<title>Description</title>
<para><function>udev_enumerate_new()</function> creates an enumeration context to scan
<filename>/sys/</filename>.</para>
<para><function>udev_enumerate_new()</function> creates an enumeration context to scan /sys.</para>
<para><function>udev_enumerate_ref()</function> takes a reference of an enumeration context.</para>
<para><function>udev_enumerate_unref()</function> drops a reference of an enumeration context. If the
refcount reaches zero, all resources of the enumeration context will be released.</para>
<para><function>udev_enumerate_unref()</function> drops a reference of an enumeration context. If the refcount reaches zero,
all resources of the enumeration context will be released.</para>
</refsect1>
<refsect1>

View File

@ -1454,6 +1454,12 @@ static void set_io_weight(Unit *u, uint64_t weight) {
(void) set_attribute_and_warn(u, "io.weight", buf);
}
static void cgroup_apply_bpf_foreign_program(Unit *u) {
assert(u);
(void) bpf_foreign_install(u);
}
static void cgroup_context_apply(
Unit *u,
CGroupMask apply_mask,
@ -1603,7 +1609,7 @@ static void cgroup_context_apply(
cgroup_apply_firewall(u);
if (apply_mask & CGROUP_MASK_BPF_FOREIGN)
(void) bpf_foreign_install(u);
cgroup_apply_bpf_foreign_program(u);
if (apply_mask & CGROUP_MASK_BPF_SOCKET_BIND)
cgroup_apply_socket_bind(u);

View File

@ -425,6 +425,9 @@ static int manager_varlink_init_system(Manager *m) {
assert(m);
if (!MANAGER_IS_SYSTEM(m))
return 0;
r = manager_setup_varlink_server(m);
if (r < 0)
return log_error_errno(r, "Failed to set up varlink server: %m");
@ -453,6 +456,9 @@ static int manager_varlink_init_user(Manager *m) {
assert(m);
if (!MANAGER_IS_USER(m))
return 0;
if (MANAGER_IS_TEST_RUN(m))
return 0;

View File

@ -161,7 +161,7 @@ static int generator_add_ordering(
assert(order);
assert(dst);
/* Adds an explicit ordering dependency of type <order> from <src> to <dst>. If <instance> is
/* Adds in an explicit ordering dependency of type <order> from <src> to <dst>. If <instance> is
* specified, it is inserted into <dst>. */
if (instance) {

View File

@ -25,7 +25,7 @@ static enum {
ACTION_RM_VSOCK,
} arg_action = ACTION_MAKE_VSOCK;
static char *arg_issue_path = NULL;
static char* arg_issue_path = NULL;
static bool arg_issue_stdout = false;
STATIC_DESTRUCTOR_REGISTER(arg_issue_path, freep);

View File

@ -1183,15 +1183,7 @@ static int start_tpm(
if (r < 0)
return log_error_errno(r, "Failed to find swtpm_setup binary: %m");
/* Try passing --profile-name default-v2 first, in order to support RSA4096 pcrsig keys, which was
* added in 0.11. */
_cleanup_strv_free_ char **argv = strv_new(
swtpm_setup,
"--tpm-state", state_dir,
"--tpm2",
"--pcr-banks", "sha256",
"--not-overwrite",
"--profile-name", "default-v2");
_cleanup_strv_free_ char **argv = strv_new(swtpm_setup, "--tpm-state", state_dir, "--tpm2", "--pcr-banks", "sha256", "--not-overwrite");
if (!argv)
return log_oom();
@ -1202,22 +1194,6 @@ static int start_tpm(
log_error_errno(errno, "Failed to execute '%s': %m", argv[0]);
_exit(EXIT_FAILURE);
}
if (r == -EPROTO) {
/* If swtpm_setup fails, try again removing the default-v2 profile, as it might be an older
* version. */
strv_remove(argv, "--profile-name");
strv_remove(argv, "default-v2");
r = safe_fork("(swtpm-setup)", FORK_CLOSE_ALL_FDS|FORK_LOG|FORK_WAIT, NULL);
if (r == 0) {
/* Child */
execvp(argv[0], argv);
log_error_errno(errno, "Failed to execute '%s': %m", argv[0]);
_exit(EXIT_FAILURE);
}
}
if (r < 0)
return log_error_errno(r, "Failed to run swtpm_setup: %m");
strv_free(argv);
argv = strv_new(sd_socket_activate, "--listen", listen_address, swtpm, "socket", "--tpm2", "--tpmstate");