audit: get right protection mask for base directories in the lists
Use the paths' protection mask where available instead of the parent paths'. ref #1241cute-signatures
parent
dde96976d3
commit
5aa6998459
10
src/audit.c
10
src/audit.c
|
@ -167,15 +167,23 @@ static int audit_directory_tree_item(void *ctx, int dirfd, const char *name)
|
||||||
int recurse = TRUE;
|
int recurse = TRUE;
|
||||||
|
|
||||||
child = apk_db_dir_query(db, bfull);
|
child = apk_db_dir_query(db, bfull);
|
||||||
|
if (child != NULL) {
|
||||||
|
if (actx->mode == MODE_BACKUP) {
|
||||||
|
if (!child->has_protected_children)
|
||||||
|
recurse = FALSE;
|
||||||
|
if (!child->protected)
|
||||||
|
goto recurse_check;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
if (actx->mode == MODE_BACKUP) {
|
if (actx->mode == MODE_BACKUP) {
|
||||||
if (!dbd->has_protected_children)
|
if (!dbd->has_protected_children)
|
||||||
recurse = FALSE;
|
recurse = FALSE;
|
||||||
if (!dbd->protected)
|
if (!dbd->protected)
|
||||||
goto recurse_check;
|
goto recurse_check;
|
||||||
} else {
|
} else {
|
||||||
if (child == NULL)
|
|
||||||
recurse = FALSE;
|
recurse = FALSE;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
reason = audit_directory(actx, db, child, &fi);
|
reason = audit_directory(actx, db, child, &fi);
|
||||||
if (reason < 0)
|
if (reason < 0)
|
||||||
|
|
Loading…
Reference in New Issue