Add status into init_startstop_service interface

Alter interface init_startstop_service to also allow for the status permission.  systemctl start <foo> and systemctl stop <foo> work correctly.  But systemctl restart <foo> will fail as restart uses status to determine the action to take.

This interface is used by many other modules (like iptables, logging, apache, cron, etc...  - see 'admin' interface).  This allows restart to work for all these services.

Signed-off-by: Dave Sugar <dsugar@tresys.com>
This commit is contained in:
David Sugar 2017-09-13 20:26:57 +00:00 committed by Chris PeBenito
parent c149cf9fc3
commit 153fb2f591

View File

@ -1703,10 +1703,10 @@ interface(`init_startstop_service',`
# all callers are updated to provide unit files.
ifelse(`$5',`',`',`
gen_require(`
class service { start stop };
class service { start status stop };
')
allow $1 $5:service { start stop };
allow $1 $5:service { start status stop };
')
')
')