From 5b48b855600aa316e3c9385e998c68ad757794a2 Mon Sep 17 00:00:00 2001 From: Timo Teras Date: Thu, 30 Jul 2009 10:42:20 +0300 Subject: audit: protection mask for "symlinks only" and use it for /etc/init.d by default. fixes #99. --- src/audit.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/audit.c') 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; -- cgit v1.2.3