Add prefix argument to privileged audit rules (#790)

We need to strip the chroot basedir prefix and make these files
have absolute paths.
This commit is contained in:
Andrew Walker
2024-12-10 07:51:19 -06:00
committed by GitHub
parent 1b4f280312
commit bd61b40dad

View File

@@ -36,7 +36,7 @@ def build_rootfs_image():
# Generate audit rules
gencmd = os.path.join(CHROOT_BASEDIR, 'conf', 'audit_rules', 'privileged-rules.py')
priv_rule_file = os.path.join(CHROOT_BASEDIR, 'conf', 'audit_rules', '31-privileged.rules')
run([gencmd, '--target_dir', CHROOT_BASEDIR, '--privilege_file', priv_rule_file])
run([gencmd, '--target_dir', CHROOT_BASEDIR, '--privilege_file', priv_rule_file, '--prefix', CHROOT_BASEDIR])
# Remove the audit file generation script
os.unlink(gencmd)