summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/basic/missing_syscall.h2
-rw-r--r--src/boot/bootctl.c10
-rw-r--r--src/core/cgroup.h1
-rw-r--r--src/core/dbus-cgroup.c1
-rw-r--r--src/core/manager.c1
-rw-r--r--src/core/namespace.c3
-rw-r--r--src/nspawn/nspawn-register.c8
7 files changed, 16 insertions, 10 deletions
diff --git a/src/basic/missing_syscall.h b/src/basic/missing_syscall.h
index e102083684..e6fd67cb9d 100644
--- a/src/basic/missing_syscall.h
+++ b/src/basic/missing_syscall.h
@@ -279,6 +279,8 @@ static inline key_serial_t request_key(const char *type, const char *description
# define __NR_copy_file_range 391
# elif defined __aarch64__
# define __NR_copy_file_range 285
+# elif defined __powerpc__
+# define __NR_copy_file_range 379
# else
# warning "__NR_copy_file_range not defined for your architecture"
# endif
diff --git a/src/boot/bootctl.c b/src/boot/bootctl.c
index 0d42948720..7cb2259717 100644
--- a/src/boot/bootctl.c
+++ b/src/boot/bootctl.c
@@ -288,7 +288,7 @@ static int status_binaries(const char *esp_path, sd_id128_t partition) {
else if (r < 0)
return r;
- r = enumerate_binaries(esp_path, "EFI/Boot", "boot");
+ r = enumerate_binaries(esp_path, "EFI/BOOT", "boot");
if (r == 0)
log_error("No default/fallback boot loader installed in ESP.");
else if (r < 0)
@@ -548,7 +548,7 @@ static int mkdir_one(const char *prefix, const char *suffix) {
static const char *efi_subdirs[] = {
"EFI",
"EFI/systemd",
- "EFI/Boot",
+ "EFI/BOOT",
"loader",
"loader/entries"
};
@@ -579,7 +579,7 @@ static int copy_one_file(const char *esp_path, const char *name, bool force) {
char *v;
/* Create the EFI default boot loader name (specified for removable devices) */
- v = strjoina(esp_path, "/EFI/Boot/BOOT", name + strlen("systemd-boot"));
+ v = strjoina(esp_path, "/EFI/BOOT/BOOT", name + strlen("systemd-boot"));
strupper(strrchr(v, '/') + 1);
k = copy_file(p, v, force);
@@ -781,7 +781,7 @@ static int remove_boot_efi(const char *esp_path) {
struct dirent *de;
int r, c = 0;
- p = strjoina(esp_path, "/EFI/Boot");
+ p = strjoina(esp_path, "/EFI/BOOT");
d = opendir(p);
if (!d) {
if (errno == ENOENT)
@@ -797,7 +797,7 @@ static int remove_boot_efi(const char *esp_path) {
if (!endswith_no_case(de->d_name, ".efi"))
continue;
- if (!startswith_no_case(de->d_name, "Boot"))
+ if (!startswith_no_case(de->d_name, "boot"))
continue;
fd = openat(dirfd(d), de->d_name, O_RDONLY|O_CLOEXEC);
diff --git a/src/core/cgroup.h b/src/core/cgroup.h
index f21409bd5d..a57403e79f 100644
--- a/src/core/cgroup.h
+++ b/src/core/cgroup.h
@@ -119,7 +119,6 @@ struct CGroupContext {
bool delegate;
};
-#include "cgroup-util.h"
#include "unit.h"
void cgroup_context_init(CGroupContext *c);
diff --git a/src/core/dbus-cgroup.c b/src/core/dbus-cgroup.c
index 27bbe2d26d..6167ce92cd 100644
--- a/src/core/dbus-cgroup.c
+++ b/src/core/dbus-cgroup.c
@@ -960,6 +960,7 @@ int bus_cgroup_set_property(
while ((r = sd_bus_message_read(message, "(ss)", &path, &rwm)) > 0) {
if ((!startswith(path, "/dev/") &&
+ !startswith(path, "/run/systemd/inaccessible/") &&
!startswith(path, "block-") &&
!startswith(path, "char-")) ||
strpbrk(path, WHITESPACE))
diff --git a/src/core/manager.c b/src/core/manager.c
index c69b797430..a0181e2138 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -64,7 +64,6 @@
#include "manager.h"
#include "missing.h"
#include "mkdir.h"
-#include "mkdir.h"
#include "parse-util.h"
#include "path-lookup.h"
#include "path-util.h"
diff --git a/src/core/namespace.c b/src/core/namespace.c
index 02ec81f71c..52a2505d94 100644
--- a/src/core/namespace.c
+++ b/src/core/namespace.c
@@ -347,7 +347,8 @@ static int make_read_only(BindMount *m) {
else if (IN_SET(m->mode, READWRITE, PRIVATE_TMP, PRIVATE_VAR_TMP, PRIVATE_DEV)) {
r = bind_remount_recursive(m->path, false);
if (r == 0 && m->mode == PRIVATE_DEV) /* can be readonly but the submounts can't*/
- r = mount(NULL, m->path, NULL, MS_REMOUNT|DEV_MOUNT_OPTIONS|MS_RDONLY, NULL);
+ if (mount(NULL, m->path, NULL, MS_REMOUNT|DEV_MOUNT_OPTIONS|MS_RDONLY, NULL) < 0)
+ r = -errno;
} else
r = 0;
diff --git a/src/nspawn/nspawn-register.c b/src/nspawn/nspawn-register.c
index 20103c5e88..7fd711b8a4 100644
--- a/src/nspawn/nspawn-register.c
+++ b/src/nspawn/nspawn-register.c
@@ -112,7 +112,7 @@ int register_machine(
* systemd-nspawn@.service, to keep the device
* policies in sync regardless if we are run with or
* without the --keep-unit switch. */
- r = sd_bus_message_append(m, "(sv)", "DeviceAllow", "a(ss)", 9,
+ r = sd_bus_message_append(m, "(sv)", "DeviceAllow", "a(ss)", 11,
/* Allow the container to
* access and create the API
* device nodes, so that
@@ -132,7 +132,11 @@ int register_machine(
* container to ever create
* these device nodes. */
"/dev/pts/ptmx", "rw",
- "char-pts", "rw");
+ "char-pts", "rw",
+ /* Allow /run/systemd/inaccessible/{chr,blk}
+ * devices inside the container */
+ "/run/systemd/inaccessible/chr", "rwm",
+ "/run/systemd/inaccessible/blk", "rwm");
if (r < 0)
return bus_log_create_error(r);