#!/bin/sh
# If using normal root, avoid changing anything.
if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then
	exit 0
fi

# used to also run on / if uid == 0 but that's really broken
if [ -e /etc/permissions -a -x /usr/bin/chkstat ]; then
	/usr/bin/chkstat \
		--root "$RPM_BUILD_ROOT" \
		--noheader \
		--set \
		--system \
		--no-fscaps \
		--level secure
fi
