Such units are provided by new systemd (>= 255).
We retain old logic and service exceptions for package to work with both new
and old systemd versions.
Change-Id: Ia01365e0ba76053932b61bf3f143e0bcdbddf573
else
gid="$3"
fi
- result=$(cat $systemd_service_list | grep ";$service_name;$uid;$gid;$4;")
+ # systemd does provide special .service units with no [Service] section, these have to be treated specially
+ if grep -qE '^\[Service\]$' $1; then
+ check_smack_label="$4;"
+ else
+ check_smack_label=""
+ fi
+ result=$(cat $systemd_service_list | grep ";$service_name;$uid;$gid;$check_smack_label")
if [ "$result" == "" ]
then
echo "Not permitted Systemd Service (system session) : $1"