1
Fork 0
mirror of https://https.git.savannah.gnu.org/git/guix.git/ synced 2025-07-14 02:50:45 +02:00
guix/gnu/packages/patches/network-manager-plugin-ownership.patch
Ludovic Courtès 436a00be92
gnu: network-manager: Remove ownership check for plugins.
Fixes <https://issues.guix.gnu.org/78047>.

Fixes a bug on Guix System whereby, when ‘guix-configuration’
has (privileged? #f), NetworkManager would fail to start due to plugins
not being owned by ‘root’.

* gnu/packages/patches/network-manager-plugin-ownership.patch: New file.
* gnu/packages/gnome.scm (network-manager)[source]: Use it.
* gnu/local.mk (dist_patch_DATA): Add it.

Reported-by: Rodion Goritskov <rodion@goritskov.com>
Change-Id: I9fff098788e79d1f00c9605a6067b16078ea0396
2025-06-23 15:15:42 +02:00

27 lines
1 KiB
Diff

NetworkManager insists that plugins be root-owned. This is the case when running
guix-daemon with root privileged, but not when running it unprivileged (in that case,
file in the store belong to the 'guix-daemon' user.)
Skip that test entirely since it doesn't provide any additional safety on Guix System.
See <https://issues.guix.gnu.org/78047>.
diff --git a/src/core/nm-core-utils.c b/src/core/nm-core-utils.c
index 895a991..738f8c7 100644
--- a/src/core/nm-core-utils.c
+++ b/src/core/nm-core-utils.c
@@ -4319,14 +4319,6 @@ nm_utils_validate_plugin(const char *path, struct stat *st, GError **error)
return FALSE;
}
- if (st->st_uid != 0) {
- g_set_error_literal(error,
- NM_UTILS_ERROR,
- NM_UTILS_ERROR_UNKNOWN,
- "file has invalid owner (should be root)");
- return FALSE;
- }
-
if (st->st_mode & (S_IWGRP | S_IWOTH | S_ISUID)) {
g_set_error_literal(error,
NM_UTILS_ERROR,