Skip to content

Commit

Permalink
Handle audit plugin changes
Browse files Browse the repository at this point in the history
  • Loading branch information
anodos325 committed Jan 3, 2025
1 parent a506fba commit b82a2db
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions scale_build/image/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ def build_rootfs_image():
# Remove the audit file generation script
os.unlink(gencmd)

# Copy over audit plugins configuration
conf_plugins_dir = os.path.join(CHROOT_BASEDIR, 'conf', 'audit_plugins')
audit_plugins = os.path.join(CHROOT_BASEDIR, 'etc', 'audit', 'plugins.d')
for plugin in os.listdir(conf_plugins_dir):
src = os.path.join(conf_plugins_dir, plugin)
dst = os.path.join(audit_plugins, plugin)
shutil.copyfile(src, dst)

# Generate mtree of relevant root filesystem directories
mtree_file = generate_mtree(CHROOT_BASEDIR, version)
shutil.copyfile(mtree_file, os.path.join(CHROOT_BASEDIR, 'conf', 'rootfs.mtree'))
Expand Down

0 comments on commit b82a2db

Please sign in to comment.