Merge branch 'master' of git://git.qubes-os.org/marmarek/core-agent-linux into r3-templates
This commit is contained in:
commit
923416914d
@ -36,11 +36,11 @@ while true; do
|
|||||||
|
|
||||||
RULES=$(qubesdb-read $XENSTORE_IPTABLES_HEADER)
|
RULES=$(qubesdb-read $XENSTORE_IPTABLES_HEADER)
|
||||||
IPTABLES_SAVE=$(iptables-save | sed '/^\*filter/,/^COMMIT/d')
|
IPTABLES_SAVE=$(iptables-save | sed '/^\*filter/,/^COMMIT/d')
|
||||||
OUT=$(printf '%s\n%s\n' "$RULES" "$IPTABLES_SAVE" | sed 's/\\n/\n/g' | iptables-restore 2>&1 || true)
|
OUT=$(printf '%s\n%s\n' "$RULES" "$IPTABLES_SAVE" | sed 's/\\n\|\\x0a/\n/g' | iptables-restore 2>&1 || true)
|
||||||
|
|
||||||
for i in $(qubesdb-list -f /qubes-iptables-domainrules) ; do
|
for i in $(qubesdb-list -f /qubes-iptables-domainrules) ; do
|
||||||
RULES=$(qubesdb-read "$i")
|
RULES=$(qubesdb-read "$i")
|
||||||
ERRS=$(printf '%s\n' "$RULES" | sed 's/\\n/\n/g' | /sbin/iptables-restore -n 2>&1 || true)
|
ERRS=$(printf '%s\n' "$RULES" | sed 's/\\n\|\\x0a/\n/g' | /sbin/iptables-restore -n 2>&1 || true)
|
||||||
if [ -n "$ERRS" ]; then
|
if [ -n "$ERRS" ]; then
|
||||||
echo "Failed applying rules for $i: $ERRS" >&2
|
echo "Failed applying rules for $i: $ERRS" >&2
|
||||||
OUT="$OUT$ERRS"
|
OUT="$OUT$ERRS"
|
||||||
|
Loading…
Reference in New Issue
Block a user