This commit is contained in:
madaidan 2019-10-16 19:46:59 +00:00 committed by GitHub
parent f08c03ab21
commit 61f742304d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,6 +25,15 @@ create_whitelist() {
if grep -q "${1}" /etc/group; then
chmod o-rwx "${whitelist_path}"
chgrp -fR "${1}" "${whitelist_path}"
## Changing the permissions of /sys recursively
## causes errors as the permissions of /sys/kernel/debug
## and /sys/fs/cgroup cannot be changed which makes
## systemd say the service has failed even though
## everything has completed successfully. So, this
## returns "0" instead which makes systemd say the
## service has succeeded.
return 0
else
echo "ERROR: The ${1} group does not exist, the ${1} whitelist was not created."
fi