From ba3ee3f86396f05123f732da7c7879c8ed016c9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= Date: Thu, 23 Feb 2012 15:05:06 +0200 Subject: audit, db: add etc/apk/protected_files.d and new audit features fixes #607. audit is now mostly rewritten for the new functionality. And has new features like --check-permissions, --recursive and --packages. $ROOT/etc/apk/protected_files.d/*.list can now contain additional protected paths, one path per line: +etc @etc/init.d -tmp + will include the directory as protected configuration directory. @ considers the directory protected, but will backup only symlinks. - removes any protection lbu should be modified to put include and exclude paths in etc/apk/protected_files.d/lbu.list. Additionally, some packages might provide their own listings. E.g. ssh might want to provide ssh.list with something like: +root/.ssh +home/*/.ssh --- src/io.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/io.c') diff --git a/src/io.c b/src/io.c index 71ccfda15d..0ae46f0da9 100644 --- a/src/io.c +++ b/src/io.c @@ -560,8 +560,11 @@ int apk_dir_foreach_file(int dirfd, apk_dir_file_cb cb, void *ctx) rewinddir(dir); while ((de = readdir(dir)) != NULL) { - if (de->d_name[0] == '.') - continue; + if (de->d_name[0] == '.') { + if (de->d_name[1] == 0 || + (de->d_name[1] == '.' && de->d_name[2] == 0)) + continue; + } cb(ctx, dirfd, de->d_name); } closedir(dir); -- cgit v1.2.3