-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
overlay sys-apps/systemd: Regenerate patches and add mutable overlays
- Loading branch information
Showing
21 changed files
with
2,047 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 6 additions & 6 deletions
12
...overlay/sys-apps/systemd/files/0002-networkd-default-to-kernel-IPForwarding-setting.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
From e124d3716ada4fc7c34278435a61d51b07b61024 Mon Sep 17 00:00:00 2001 | ||
From 29e0d59627227fc490a1492ac8496d1e5811b13f Mon Sep 17 00:00:00 2001 | ||
From: Nick Owens <nick.owens@coreos.com> | ||
Date: Tue, 2 Jun 2015 18:22:32 -0700 | ||
Subject: [PATCH 2/7] networkd: default to "kernel" IPForwarding setting | ||
Subject: [PATCH 02/20] networkd: default to "kernel" IPForwarding setting | ||
|
||
--- | ||
src/network/networkd-network.c | 1 + | ||
1 file changed, 1 insertion(+) | ||
|
||
diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c | ||
index a6c5b44238..54f9d12fec 100644 | ||
index dcd3e5ae12..2ae481d1ec 100644 | ||
--- a/src/network/networkd-network.c | ||
+++ b/src/network/networkd-network.c | ||
@@ -465,6 +465,7 @@ int network_load_one(Manager *manager, OrderedHashmap **networks, const char *fi | ||
@@ -461,6 +461,7 @@ int network_load_one(Manager *manager, OrderedHashmap **networks, const char *fi | ||
.link_local = _ADDRESS_FAMILY_INVALID, | ||
.ipv6ll_address_gen_mode = _IPV6_LINK_LOCAL_ADDRESS_GEN_MODE_INVALID, | ||
|
||
+ .ip_forward = _ADDRESS_FAMILY_INVALID, | ||
.ipv4_accept_local = -1, | ||
.ipv4_route_localnet = -1, | ||
.ipv6_privacy_extensions = IPV6_PRIVACY_EXTENSIONS_NO, | ||
.ipv6_privacy_extensions = _IPV6_PRIVACY_EXTENSIONS_INVALID, | ||
-- | ||
2.25.1 | ||
2.34.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...coreos-overlay/sys-apps/systemd/files/0007-units-Keep-using-old-journal-file-format.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
77 changes: 77 additions & 0 deletions
77
...lay/sys-apps/systemd/files/0008-mount-util-Add-a-helper-for-remounting-a-bind-mount.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
From c98027ec7424c336df9e1065121fb5d911cc0dd8 Mon Sep 17 00:00:00 2001 | ||
From: Krzesimir Nowak <knowak@microsoft.com> | ||
Date: Tue, 23 Jan 2024 10:44:23 +0100 | ||
Subject: [PATCH 08/20] mount-util: Add a helper for remounting a bind mount | ||
|
||
--- | ||
src/shared/mount-util.c | 10 ++++++++++ | ||
src/shared/mount-util.h | 1 + | ||
src/test/test-mount-util.c | 19 +++++++++++++++++++ | ||
3 files changed, 30 insertions(+) | ||
|
||
diff --git a/src/shared/mount-util.c b/src/shared/mount-util.c | ||
index 4f2acce513..dd9a995fb6 100644 | ||
--- a/src/shared/mount-util.c | ||
+++ b/src/shared/mount-util.c | ||
@@ -453,6 +453,16 @@ int bind_remount_one_with_mountinfo( | ||
return 0; | ||
} | ||
|
||
+int bind_remount_one(const char *path, unsigned long new_flags, unsigned long flags_mask) { | ||
+ _cleanup_fclose_ FILE *proc_self_mountinfo = NULL; | ||
+ | ||
+ proc_self_mountinfo = fopen("/proc/self/mountinfo", "re"); | ||
+ if (!proc_self_mountinfo) | ||
+ return log_debug_errno(errno, "Failed to open /proc/self/mountinfo: %m"); | ||
+ | ||
+ return bind_remount_one_with_mountinfo(path, new_flags, flags_mask, proc_self_mountinfo); | ||
+} | ||
+ | ||
static int mount_switch_root_pivot(int fd_newroot, const char *path) { | ||
assert(fd_newroot >= 0); | ||
assert(path); | ||
diff --git a/src/shared/mount-util.h b/src/shared/mount-util.h | ||
index ef31104900..679c94c950 100644 | ||
--- a/src/shared/mount-util.h | ||
+++ b/src/shared/mount-util.h | ||
@@ -26,6 +26,7 @@ static inline int bind_remount_recursive(const char *prefix, unsigned long new_f | ||
} | ||
|
||
int bind_remount_one_with_mountinfo(const char *path, unsigned long new_flags, unsigned long flags_mask, FILE *proc_self_mountinfo); | ||
+int bind_remount_one(const char *path, unsigned long new_flags, unsigned long flags_mask); | ||
|
||
int mount_switch_root_full(const char *path, unsigned long mount_propagation_flag, bool force_ms_move); | ||
static inline int mount_switch_root(const char *path, unsigned long mount_propagation_flag) { | ||
diff --git a/src/test/test-mount-util.c b/src/test/test-mount-util.c | ||
index c3d0acb6af..73152ffd55 100644 | ||
--- a/src/test/test-mount-util.c | ||
+++ b/src/test/test-mount-util.c | ||
@@ -213,6 +213,25 @@ TEST(bind_remount_one) { | ||
_exit(EXIT_SUCCESS); | ||
} | ||
|
||
+ assert_se(wait_for_terminate_and_check("test-remount-one-with-mountinfo", pid, WAIT_LOG) == EXIT_SUCCESS); | ||
+ | ||
+ pid = fork(); | ||
+ assert_se(pid >= 0); | ||
+ | ||
+ if (pid == 0) { | ||
+ /* child */ | ||
+ | ||
+ assert_se(detach_mount_namespace() >= 0); | ||
+ | ||
+ assert_se(bind_remount_one("/run", MS_RDONLY, MS_RDONLY) >= 0); | ||
+ assert_se(bind_remount_one("/run", MS_NOEXEC, MS_RDONLY|MS_NOEXEC) >= 0); | ||
+ assert_se(bind_remount_one("/proc/idontexist", MS_RDONLY, MS_RDONLY) == -ENOENT); | ||
+ assert_se(bind_remount_one("/proc/self", MS_RDONLY, MS_RDONLY) == -EINVAL); | ||
+ assert_se(bind_remount_one("/", MS_RDONLY, MS_RDONLY) >= 0); | ||
+ | ||
+ _exit(EXIT_SUCCESS); | ||
+ } | ||
+ | ||
assert_se(wait_for_terminate_and_check("test-remount-one", pid, WAIT_LOG) == EXIT_SUCCESS); | ||
} | ||
|
||
-- | ||
2.34.1 | ||
|
26 changes: 26 additions & 0 deletions
26
...os-overlay/sys-apps/systemd/files/0009-sysext-Do-not-log-failed-unmount-error-again.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
From 02f43475f4ffe39e48edfe5a2b40cd1f28d5fab8 Mon Sep 17 00:00:00 2001 | ||
From: Krzesimir Nowak <knowak@microsoft.com> | ||
Date: Thu, 15 Feb 2024 14:59:19 +0100 | ||
Subject: [PATCH 09/20] sysext: Do not log failed unmount error again | ||
|
||
umount_verbose is already doing it for us. | ||
--- | ||
src/sysext/sysext.c | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/src/sysext/sysext.c b/src/sysext/sysext.c | ||
index 8dc515e4d5..afd79c3868 100644 | ||
--- a/src/sysext/sysext.c | ||
+++ b/src/sysext/sysext.c | ||
@@ -264,7 +264,7 @@ static int unmerge_hierarchy( | ||
|
||
r = umount_verbose(LOG_ERR, p, MNT_DETACH|UMOUNT_NOFOLLOW); | ||
if (r < 0) | ||
- return log_error_errno(r, "Failed to unmount file system '%s': %m", p); | ||
+ return r; | ||
|
||
log_info("Unmerged '%s'.", p); | ||
} | ||
-- | ||
2.34.1 | ||
|
Oops, something went wrong.