#
#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source. A copy of the CDDL is also available via the Internet at
#
# Copyright 2015, Richard Lowe.
# Verify that zones can be configured with security-flags
LC_ALL=C # Collation is important
name=$1
(echo "create -b";
echo "verify";
echo "commit";
r=$?
if (($r != 0)); then
return 1
else
return 0
fi
}
name=$1
expect=$2
(echo "create -b";
echo "verify";
echo "commit";
r=$?
# Ideally will fail, since we don't want the create to have succeeded.
if (($r == 0)); then
return 1
else
if (( $? != 0 )); then
echo "Wanted:"
echo " $expect"
echo "Got:"
return 1;
else
return 0
fi
fi
}
ret=0
EOF
add security-flags
set lower=none
set default=aslr
set upper=all
end
EOF
add security-flags
set default=aslr
end
EOF
add security-flags
set lower=aslr
set default=none
set upper=all
end
EOF
add security-flags
set lower=aslr
set default=none
end
EOF
add security-flags
set lower=none
set default=all
set upper=none
end
EOF
add security-flags
set default=all
set upper=none
end
EOF
add security-flags
set lower=none
set default=all
set upper=none
end
EOF
add security-flags
set lower=all
set upper=none
end
EOF
add security-flags
set default=fail
end
EOF
add security-flags
set lower=fail
end
EOF
add security-flags
set upper=fail
end
EOF
exit $ret