diff options
author | Timo Teras <timo.teras@iki.fi> | 2009-07-30 10:42:20 +0300 |
---|---|---|
committer | Timo Teras <timo.teras@iki.fi> | 2009-07-30 10:42:20 +0300 |
commit | 5b48b855600aa316e3c9385e998c68ad757794a2 (patch) | |
tree | 05a0c84623a1360a513aa13f4e6192e969ea5060 /src/audit.c | |
parent | 60c668f1dccc77800548ec54587724ee9e61f4e3 (diff) | |
download | apk-tools-5b48b855600aa316e3c9385e998c68ad757794a2.tar.gz apk-tools-5b48b855600aa316e3c9385e998c68ad757794a2.tar.bz2 apk-tools-5b48b855600aa316e3c9385e998c68ad757794a2.tar.xz apk-tools-5b48b855600aa316e3c9385e998c68ad757794a2.zip |
audit: protection mask for "symlinks only"
and use it for /etc/init.d by default. fixes #99.
Diffstat (limited to 'src/audit.c')
-rw-r--r-- | src/audit.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/audit.c b/src/audit.c index fe72c88..31965df 100644 --- a/src/audit.c +++ b/src/audit.c @@ -56,6 +56,11 @@ static int audit_directory(apk_hash_item item, void *ctx) if (apk_file_get_info(tmp, APK_CHECKSUM_NONE, &fi) < 0) continue; + if (!(actx->type & AUDIT_SYSTEM) && + (dbd->flags & APK_DBDIRF_SYMLINKS_ONLY) && + !S_ISLNK(fi.mode)) + continue; + if (S_ISDIR(fi.mode)) { if (apk_db_dir_query(db, APK_BLOB_STR(tmp)) != NULL) continue; |