fix: zapret2 file permission fixes
This commit is contained in:
6 files changed
+63
-5
No files matched your search
@@ -437,8 +437,14 @@ let
|
||||
. "$ZAPRET_BASE/init.d/sysv/functions"
|
||||
opt="--qnum=$QNUM $NFQWS2_OPT"
|
||||
filter_apply_hostlist_target opt
|
||||
# --user=root leaves nfqws2 root's own groups (initgroups), and with them only
|
||||
# CAP_NET_ADMIN and CAP_NET_RAW: the unit's Group= and SupplementaryGroups=, through
|
||||
# which it appends to the lists the zapret scope's group renames in (theirs, then),
|
||||
# would be gone. --uid after it keeps uid 0 and the groups the unit started it with.
|
||||
uid=
|
||||
if [ "$(id -u)" = 0 ]; then uid="--uid=0:$(id -G | tr ' ' ,)"; fi
|
||||
set -f
|
||||
exec "$NFQWS2" $NFQWS2_OPT_BASE $opt
|
||||
exec "$NFQWS2" $NFQWS2_OPT_BASE $uid $opt
|
||||
'';
|
||||
in
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user