From b9a1f87b9ea80edf932ac456b575489525027aaa Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Tue, 25 Nov 2025 15:58:44 +0100 Subject: [PATCH] rootless_linux.c: use shortcut for system commands There doesn't seem any reason why the system commands should not join the userns. In particular the main commands use ParentNSRequired and UnshareNSRequired when they don't want to be joined to the main userns. Since the system command don't set these the go code does the join and re-exec anyway so might as well use the shortcut to speed that up. Signed-off-by: Paul Holzinger --- pkg/rootless/rootless_linux.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/rootless/rootless_linux.c b/pkg/rootless/rootless_linux.c index 3d74af6a6c..644c8ef9a2 100644 --- a/pkg/rootless/rootless_linux.c +++ b/pkg/rootless/rootless_linux.c @@ -384,8 +384,7 @@ can_use_shortcut (char **argv) || strcmp (argv[argc], "version") == 0 || strcmp (argv[argc], "context") == 0 || strcmp (argv[argc], "search") == 0 - || strcmp (argv[argc], "compose") == 0 - || (strcmp (argv[argc], "system") == 0 && argv[argc+1] && strcmp (argv[argc+1], "service") != 0)) + || strcmp (argv[argc], "compose") == 0) { ret = false; break;