aboutsummaryrefslogtreecommitdiffstats
path: root/src/io.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2012-02-23 15:05:06 +0200
committerTimo Teräs <timo.teras@iki.fi>2012-02-23 15:05:06 +0200
commitba3ee3f86396f05123f732da7c7879c8ed016c9d (patch)
tree4523614e903b40915c699a6ca6c3644dd0650618 /src/io.c
parenta1d16c5d5d0cb86773346cda85b93c44ef876218 (diff)
downloadaports-ba3ee3f86396f05123f732da7c7879c8ed016c9d.tar.bz2
aports-ba3ee3f86396f05123f732da7c7879c8ed016c9d.tar.xz
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
Diffstat (limited to 'src/io.c')
-rw-r--r--src/io.c7
1 files changed, 5 insertions, 2 deletions
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);