mirror of
git://github.com/lxc/lxc
synced 2025-08-31 05:39:33 +00:00
Merge pull request #3097 from lpirl/proc-1-uid_map-permission-denied
suppress false-negative error in templates and nvidia hook
This commit is contained in:
@@ -58,8 +58,12 @@ in_userns() {
|
|||||||
echo $fields | grep -q " 0 1$" && { echo userns-root; return; } || true
|
echo $fields | grep -q " 0 1$" && { echo userns-root; return; } || true
|
||||||
done < /proc/self/uid_map
|
done < /proc/self/uid_map
|
||||||
|
|
||||||
[ "$(cat /proc/self/uid_map)" = "$(cat /proc/1/uid_map)" ] && \
|
if [ -e /proc/1/uid_map ]; then
|
||||||
{ echo userns-root; return; }
|
if [ "$(cat /proc/self/uid_map)" = "$(cat /proc/1/uid_map)" ]; then
|
||||||
|
echo userns-root
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
fi
|
||||||
echo yes
|
echo yes
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -42,7 +42,12 @@ in_userns() {
|
|||||||
fi
|
fi
|
||||||
done < /proc/self/uid_map
|
done < /proc/self/uid_map
|
||||||
|
|
||||||
[ "$(cat /proc/self/uid_map)" = "$(cat /proc/1/uid_map)" ] && { echo userns-root; return; }
|
if [ -e /proc/1/uid_map ]; then
|
||||||
|
if [ "$(cat /proc/self/uid_map)" = "$(cat /proc/1/uid_map)" ]; then
|
||||||
|
echo userns-root
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
fi
|
||||||
echo yes
|
echo yes
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -179,7 +179,12 @@ in_userns() {
|
|||||||
fi
|
fi
|
||||||
done < /proc/self/uid_map
|
done < /proc/self/uid_map
|
||||||
|
|
||||||
[ "$(cat /proc/self/uid_map)" = "$(cat /proc/1/uid_map)" ] && { echo userns-root; return; }
|
if [ -e /proc/1/uid_map ]; then
|
||||||
|
if [ "$(cat /proc/self/uid_map)" = "$(cat /proc/1/uid_map)" ]; then
|
||||||
|
echo userns-root
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
fi
|
||||||
echo yes
|
echo yes
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -51,8 +51,13 @@ in_userns() {
|
|||||||
fi
|
fi
|
||||||
done < /proc/self/uid_map
|
done < /proc/self/uid_map
|
||||||
|
|
||||||
[ "$(cat /proc/self/uid_map)" = "$(cat /proc/1/uid_map)" ] && { echo userns-root; return; }
|
if [ -e /proc/1/uid_map ]; then
|
||||||
echo yes
|
if [ "$(cat /proc/self/uid_map)" = "$(cat /proc/1/uid_map)" ]; then
|
||||||
|
echo userns-root
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
echo yes
|
||||||
}
|
}
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
|
@@ -62,7 +62,12 @@ in_userns() {
|
|||||||
fi
|
fi
|
||||||
done < /proc/self/uid_map
|
done < /proc/self/uid_map
|
||||||
|
|
||||||
[ "$(cat /proc/self/uid_map)" = "$(cat /proc/1/uid_map)" ] && { echo userns-root; return; }
|
if [ -e /proc/1/uid_map ]; then
|
||||||
|
if [ "$(cat /proc/self/uid_map)" = "$(cat /proc/1/uid_map)" ]; then
|
||||||
|
echo userns-root
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
fi
|
||||||
echo yes
|
echo yes
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user