Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3d14bd2

Browse files
committed
Fix "is db labeled test?" in chkselinuxenv script.
Don't test whether the number of labels is numerically equal to zero; count(*) isn't going return zero anyway, and the current coding blows up if it returns an empty string or an error.
1 parent d532184 commit 3d14bd2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contrib/sepgsql/chkselinuxenv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ echo "ok"
210210
# template1 database must be labeled
211211
echo -n "checking for labels in template1 ... "
212212
NUM=`${CMD_PSQL} template1 -Atc 'SELECT count(*) FROM pg_catalog.pg_seclabel' 2>/dev/null`
213-
if [ -z "${NUM}" -o "$NUM" -eq 0 ]; then
213+
if [ -z "${NUM}" ]; then
214214
echo "failed"
215215
echo ""
216216
echo "In order to regression test sepgsql, initial labels must be assigned"

0 commit comments

Comments
 (0)