nss test_range: make sure /etc/nsswitch.conf and /etc/subuid exists

Signed-off-by: Serge Hallyn <serge@hallyn.com>
This commit is contained in:
Serge Hallyn 2021-12-27 15:26:27 -06:00
parent 62449968fa
commit 4ce27b5e60

View File

@ -5,6 +5,7 @@ set -x
echo "starting check_range tests" echo "starting check_range tests"
export LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH export LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH
touch /etc/nsswitch.conf
mount --bind ./nsswitch3.conf /etc/nsswitch.conf mount --bind ./nsswitch3.conf /etc/nsswitch.conf
cleanup1() { cleanup1() {
umount /etc/nsswitch.conf umount /etc/nsswitch.conf
@ -34,6 +35,7 @@ fi
umount /etc/nsswitch.conf umount /etc/nsswitch.conf
mount --bind ./nsswitch1.conf /etc/nsswitch.conf mount --bind ./nsswitch1.conf /etc/nsswitch.conf
touch /etc/subuid /etc/subgid
mount --bind ./empty /etc/subuid mount --bind ./empty /etc/subuid
cleanup2() { cleanup2() {