code simplification

This commit is contained in:
Patrick Schleizer 2019-12-20 03:19:12 -05:00
parent 01dd567f8b
commit 706dba104d
No known key found for this signature in database
GPG Key ID: CB8D50BB77BB3C48

View File

@ -97,7 +97,11 @@ set_file_perms() {
continue
fi
if [ ! "$mode_from_config" = "nosuid" ]; then
if [ "$mode_from_config" = "nosuid" ]; then
## If mode_from_config is "nosuid" the config does not set owner and
## group. Therefore do not enforce owner/group check.
true OK
else
if ! getent passwd | grep -q "^${owner}:"; then
echo "ERROR: User '$owner' does not exist!" >&2
continue