summaryrefslogtreecommitdiff
path: root/src/apk_database.h
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2012-07-16 14:44:15 +0300
committerTimo Teräs <timo.teras@iki.fi>2012-07-16 14:44:15 +0300
commitea5b08d1d574ae90ad6347a4d2f0a69bb656c7af (patch)
treeaf262b5e75472a38ff9f618afa71220ac8349698 /src/apk_database.h
parent5aa69984595c8f63899a39cbeae8c86913bfb2d2 (diff)
downloadapk-tools-ea5b08d1d574ae90ad6347a4d2f0a69bb656c7af.tar.gz
apk-tools-ea5b08d1d574ae90ad6347a4d2f0a69bb656c7af.tar.bz2
apk-tools-ea5b08d1d574ae90ad6347a4d2f0a69bb656c7af.tar.xz
apk-tools-ea5b08d1d574ae90ad6347a4d2f0a69bb656c7af.zip
audit: fix protection mask of non-db directories
If a directory has protection mask, but does not exist in db, we do not handle it right unless we calculate the protection mask by hand, or create temporary db dir entry for it. For simplicity create always the db dir entry -- depending on audit type we likely need to create it anyway. This commit also caches the db dir entry in the audit tree context to avoid duplicate lookups. ref #1241.
Diffstat (limited to 'src/apk_database.h')
-rw-r--r--src/apk_database.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/apk_database.h b/src/apk_database.h
index 7b1d20d..235030c 100644
--- a/src/apk_database.h
+++ b/src/apk_database.h
@@ -173,6 +173,8 @@ struct apk_name *apk_db_get_name(struct apk_database *db, apk_blob_t name);
struct apk_name *apk_db_query_name(struct apk_database *db, apk_blob_t name);
int apk_db_get_tag_id(struct apk_database *db, apk_blob_t tag);
+struct apk_db_dir *apk_db_dir_ref(struct apk_db_dir *dir);
+void apk_db_dir_unref(struct apk_database *db, struct apk_db_dir *dir, int allow_rmdir);
struct apk_db_dir *apk_db_dir_get(struct apk_database *db, apk_blob_t name);
struct apk_db_dir *apk_db_dir_query(struct apk_database *db, apk_blob_t name);
struct apk_db_file *apk_db_file_query(struct apk_database *db,