aboutsummaryrefslogtreecommitdiffhomepage
path: root/container/autoroot.go
diff options
context:
space:
mode:
Diffstat (limited to 'container/autoroot.go')
-rw-r--r--container/autoroot.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/container/autoroot.go b/container/autoroot.go
index b155145c..215a7bb3 100644
--- a/container/autoroot.go
+++ b/container/autoroot.go
@@ -56,6 +56,11 @@ func (r *AutoRootOp) early(state *setupState) error {
}
func (r *AutoRootOp) apply(state *setupState) error {
+ if state.nonrepeatable&nrAutoRoot != 0 {
+ return msg.WrapErr(syscall.EINVAL, "autoroot is not repeatable")
+ }
+ state.nonrepeatable |= nrAutoRoot
+
for _, op := range r.resolved {
msg.Verbosef("%s %s", op.prefix(), op)
if err := op.apply(state); err != nil {