From f31ba2929ba64f5f279bb3d8d60562d4b77fd0df Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Sun, 10 Mar 2019 11:22:57 +0100 Subject: rootless: support a custom arg to the new process let the process running as euid != 0 pass down an argument to the process running in the user namespace. This will be useful for commands like rm -a that needs to join different namespaces, so that we can re-exec separately for each of them. Signed-off-by: Giuseppe Scrivano --- pkg/rootless/rootless.go | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 pkg/rootless/rootless.go (limited to 'pkg/rootless/rootless.go') diff --git a/pkg/rootless/rootless.go b/pkg/rootless/rootless.go new file mode 100644 index 000000000..a531e43ce --- /dev/null +++ b/pkg/rootless/rootless.go @@ -0,0 +1,9 @@ +package rootless + +// Opts allows to customize how re-execing to a rootless process is done +type Opts struct { + // Argument overrides the arguments on the command line + // for the re-execed process. The process in the namespace + // must use rootless.Argument() to read its value. + Argument string +} -- cgit v1.2.3-54-g00ecf