From d99e82c633f345dc2cfac325e812a7e91a64616a Mon Sep 17 00:00:00 2001 From: Timo Teräs Date: Wed, 12 Mar 2014 09:08:26 +0200 Subject: audit: include all files in etc/apk in overlay This implements a new protected path flag '!' to include always matching entries in the backup mode (overlay). This is also turned on for etc/apk to include everything there in overlay, because the full list of repositories and signing keys need to be in overlay - just getting them from a package is not enough during bootstrap. --- src/apk_database.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/apk_database.h') diff --git a/src/apk_database.h b/src/apk_database.h index 3d557bd..74af494 100644 --- a/src/apk_database.h +++ b/src/apk_database.h @@ -38,10 +38,16 @@ struct apk_db_file { char name[]; }; +enum apk_protect_mode { + APK_PROTECT_NONE = 0, + APK_PROTECT_CHANGED, + APK_PROTECT_SYMLINKS_ONLY, + APK_PROTECT_ALL, +}; + struct apk_protected_path { char *relative_pattern; - unsigned protected : 1; - unsigned symlinks_only : 1; + unsigned protect_mode : 4; }; APK_ARRAY(apk_protected_path_array, struct apk_protected_path); @@ -58,8 +64,7 @@ struct apk_db_dir { unsigned short refs; unsigned short namelen; - unsigned protected : 1; - unsigned symlinks_only : 1; + unsigned protect_mode : 4; unsigned has_protected_children : 1; unsigned modified : 1; unsigned recalc_mode : 1; -- cgit v1.2.3-70-g09d2