diff options
author | Timo Teras <timo.teras@iki.fi> | 2009-08-06 08:57:50 +0300 |
---|---|---|
committer | Timo Teras <timo.teras@iki.fi> | 2009-08-06 08:57:50 +0300 |
commit | 7419771b02e84a91a71b12869a40208fd2e8b773 (patch) | |
tree | 75da5776f9a3bb1f51a1cf23e4c6ac4566480ada /src/audit.c | |
parent | 2cfca5b6ed658433419f9b581b3ba30f34c973c4 (diff) | |
download | apk-tools-7419771b02e84a91a71b12869a40208fd2e8b773.tar.gz apk-tools-7419771b02e84a91a71b12869a40208fd2e8b773.tar.bz2 apk-tools-7419771b02e84a91a71b12869a40208fd2e8b773.tar.xz apk-tools-7419771b02e84a91a71b12869a40208fd2e8b773.zip |
audit: fix --backup
Diffstat (limited to 'src/audit.c')
-rw-r--r-- | src/audit.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/audit.c b/src/audit.c index d61b321..e47f182 100644 --- a/src/audit.c +++ b/src/audit.c @@ -51,6 +51,9 @@ static int audit_directory(apk_hash_item item, void *ctx) char tmp[PATH_MAX], reason; DIR *dir; + if (!(dbd->flags & APK_DBDIRF_PROTECTED)) + return 0; + dir = fdopendir(openat(db->root_fd, dbd->name, O_RDONLY)); if (dir == NULL) return 0; @@ -97,7 +100,7 @@ static int audit_directory(apk_hash_item item, void *ctx) static int audit_backup(struct apk_database *db) { - return apk_hash_foreach(&db->installed.dirs, audit_directory, &db); + return apk_hash_foreach(&db->installed.dirs, audit_directory, db); } static int audit_system(struct apk_database *db) |