mirror of
https://github.com/Kicksecure/security-misc.git
synced 2025-06-07 18:42:40 -04:00
code simplification
This commit is contained in:
parent
72812da63f
commit
a89befd902
1 changed files with 9 additions and 7 deletions
|
@ -79,14 +79,16 @@ set_file_perms() {
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! getent passwd | grep -q "^${owner}:" && ! [ "${mode}" = "nosuid" ]; then
|
if [ ! "${mode}" = "nosuid" ]; then
|
||||||
echo "ERROR: User '${owner}' does not exist!" >&2
|
if ! getent passwd | grep -q "^${owner}:"; then
|
||||||
continue
|
echo "ERROR: User '${owner}' does not exist!" >&2
|
||||||
fi
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
if ! getent group | grep -q "^${group}:" && ! [ "${mode}" = "nosuid" ]; then
|
if ! getent group | grep -q "^${group}:"; then
|
||||||
echo "ERROR: Group '${group}' does not exist!" >&2
|
echo "ERROR: Group '${group}' does not exist!" >&2
|
||||||
continue
|
continue
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
## The permissions should not be reset during upgrades.
|
## The permissions should not be reset during upgrades.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue