aboutsummaryrefslogtreecommitdiff
path: root/pkg/rootless/rootless.go
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2019-03-10 11:22:57 +0100
committerGiuseppe Scrivano <gscrivan@redhat.com>2019-03-11 11:48:25 +0100
commitf31ba2929ba64f5f279bb3d8d60562d4b77fd0df (patch)
treeac2a0087eae5269ce861a36786bcab35b110ae28 /pkg/rootless/rootless.go
parente22fc79f39a974323cb9463996accacb864e4284 (diff)
downloadpodman-f31ba2929ba64f5f279bb3d8d60562d4b77fd0df.tar.gz
podman-f31ba2929ba64f5f279bb3d8d60562d4b77fd0df.tar.bz2
podman-f31ba2929ba64f5f279bb3d8d60562d4b77fd0df.zip
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 <gscrivan@redhat.com>
Diffstat (limited to 'pkg/rootless/rootless.go')
-rw-r--r--pkg/rootless/rootless.go9
1 files changed, 9 insertions, 0 deletions
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
+}