mirror of
https://github.com/Kicksecure/security-misc.git
synced 2024-10-01 08:25:45 -04:00
refactoring
This commit is contained in:
parent
6cd9eb44fb
commit
20b8a407ac
@ -92,18 +92,15 @@ set_file_perms() {
|
||||
nosuid=""
|
||||
if [ "$mode_from_config" = "nosuid" ]; then
|
||||
nosuid="true"
|
||||
|
||||
## If mode_from_config is "nosuid" the config does not set owner and
|
||||
## group. Therefore do not enforce owner/group check.
|
||||
else
|
||||
if ! seq -w 000 4777 | grep -qw "$mode_from_config"; then
|
||||
echo "ERROR: Mode '$mode_from_config' is invalid!" >&2
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user