diff options
author | Timo Teräs <timo.teras@iki.fi> | 2012-02-23 15:05:06 +0200 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2012-02-23 15:05:06 +0200 |
commit | ba3ee3f86396f05123f732da7c7879c8ed016c9d (patch) | |
tree | 4523614e903b40915c699a6ca6c3644dd0650618 /src/io.c | |
parent | a1d16c5d5d0cb86773346cda85b93c44ef876218 (diff) | |
download | aports-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.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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); |