From b385eb548aea99bd0ca45c24edd04c1f09b8f5ea Mon Sep 17 00:00:00 2001 From: Johannes Schauer Marin Rodrigues Date: Thu, 28 Jul 2022 17:21:27 +0200 Subject: [PATCH] only check first argument if we have one --- mmdebstrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mmdebstrap b/mmdebstrap index f997ac4..b4d2fd6 100755 --- a/mmdebstrap +++ b/mmdebstrap @@ -4150,7 +4150,7 @@ sub main() { # this is like: # lxc-usernsexec -- lxc-unshare -s 'MOUNT|PID|UTSNAME|IPC' ... # but without needing lxc - if ($ARGV[0] eq "--unshare-helper") { + if (scalar @ARGV >= 1 && $ARGV[0] eq "--unshare-helper") { if ($EFFECTIVE_USER_ID != 0 && !test_unshare_userns(1)) { exit 1; }