Skip to content

Commit

Permalink
fix apparmor cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Andrwe@Gitlab <[email protected]>
  • Loading branch information
Andrwe committed May 20, 2024
1 parent 2228bc5 commit 8a82c05
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,6 @@ def _get_privoxy_args(shell: Subprocess, config_path: str = "") -> list[str]:
data = Path("/etc/apparmor.d/usr.sbin.privoxy").read_text(encoding="UTF-8")
if config_dir not in data:
data = f"""
#{"@{PROC}=/proc/"}
#{"@{pid}={[1-9],[1-9][0-9],[1-9][0-9][0-9],[1-9][0-9][0-9][0-9],[1-9][0-9][0-9][0-9][0-9],[1-9][0-9][0-9][0-9][0-9][0-9],[1-4][0-9][0-9][0-9][0-9][0-9][0-9]}"}
#{"@{tid}=@{pid}"}
#{"@{pids}=@{pid}"}
#{"@{uid}={[0-9],[1-9][0-9],[1-9][0-9][0-9],[1-9][0-9][0-9][0-9],[1-9][0-9][0-9][0-9][0-9],[1-9][0-9][0-9][0-9][0-9][0-9],[1-9][0-9][0-9][0-9][0-9][0-9][0-9],[1-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9],[1-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9],[1-4][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]}"}
#{"@{uids}=@{uid}"}
#{"@{sys}=/sys/"}
include if exists <tunables>
/usr/sbin/privoxy {"{"}
#include <abstractions/base>
Expand All @@ -141,7 +134,6 @@ def _get_privoxy_args(shell: Subprocess, config_path: str = "") -> list[str]:
"""
Path("/etc/apparmor.d/usr.sbin.privoxy").write_text(data, encoding="UTF-8")
apparmor = shell.run("apparmor_parser", "-r", "/etc/apparmor.d/usr.sbin.privoxy")
print(apparmor)
assert apparmor.returncode == 0
else:
privoxy_args.append(_get_privoxy_config(shell))
Expand Down

0 comments on commit 8a82c05

Please sign in to comment.