Skip to content

Commit 00c1f2f

Browse files
committed
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 <[email protected]>
1 parent 4035385 commit 00c1f2f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pkg/rootless/rootless_linux.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -384,8 +384,7 @@ can_use_shortcut (char **argv)
384384
|| strcmp (argv[argc], "version") == 0
385385
|| strcmp (argv[argc], "context") == 0
386386
|| strcmp (argv[argc], "search") == 0
387-
|| strcmp (argv[argc], "compose") == 0
388-
|| (strcmp (argv[argc], "system") == 0 && argv[argc+1] && strcmp (argv[argc+1], "service") != 0))
387+
|| strcmp (argv[argc], "compose") == 0)
389388
{
390389
ret = false;
391390
break;

0 commit comments

Comments
 (0)