fix: zapret2 file permission fixes

This commit is contained in:
FUFSoB committed 2026-10-21 21:51:39 +05:00
1 parent a41fbc10e6
commit 20f1bdd110
6 files changed
+63 -5

No files matched your search

@@ -38,6 +38,9 @@ in
# Ahead of the proxy at boot, so it starts with the hosts already in.
before = [ "proxy-suite-socks.service" ];
wantedBy = [ "multi-user.target" ];
# nfqws2 writes verdicts in bursts (a page's unanswered addresses), each a start: the
# start limit would fail the path unit with it, and nothing would sync until a reboot.
startLimitIntervalSec = 0;
serviceConfig = {
Type = "oneshot";
ExecStart = "${sync} ${lib.escapeShellArg stateDir} ${lib.escapeShellArg outDir}";
+7 -1
View File
@@ -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
{