Skip to content

Commit 19efd19

Browse files
authored
add check for when unshare is super old and doesn't support --user flag
1 parent ab378ea commit 19efd19

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

useful-tools/hooks/fix-namespaces.hook

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ _is_false_positive() {
4040
elif [ ! -d /etc/sysctl.d ] \
4141
|| [ ! -d /etc/apparmor.d ]; then
4242
FALSE_POSITIVE=1
43+
elif ! unshare --help | grep -q -- '--user'; then
44+
FALSE_POSITIVE=1
4345
fi
4446

4547
if [ "$FALSE_POSITIVE" = 1 ]; then

0 commit comments

Comments
 (0)