mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 08:24:42 +01:00
libapparmor: alphasort directory traversals
Directory traversal does not have a guaranteed walk order which can cause ordering problems on profile loads when explicit dependencies are missing. Combined with MR:703 this provides a userspace work around for issue 147. Fixes: https://gitlab.com/apparmor/apparmor/-/issues/147 MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/706 Signed-off-by: John Johansen <john.johansen@canonical.com> Acked-by: Steve Beattie <steve.beattie@canonical.com>
This commit is contained in:
parent
855dbd4ac8
commit
fe477af62a
1 changed files with 1 additions and 1 deletions
|
@ -474,7 +474,7 @@ int _aa_dirat_for_each(int dirfd, const char *name, void *data,
|
|||
return -1;
|
||||
}
|
||||
|
||||
num_dirs = readdirfd(cb_dirfd, &namelist, NULL);
|
||||
num_dirs = readdirfd(cb_dirfd, &namelist, alphasort);
|
||||
if (num_dirs == -1) {
|
||||
PDEBUG("scandirat of directory '%s' failed: %m\n", name);
|
||||
return -1;
|
||||
|
|
Loading…
Add table
Reference in a new issue