execute: sort directory entries when loading credentials recursively
authorLennart Poettering <lennart@poettering.net>
Wed, 13 Apr 2022 21:03:22 +0000 (23:03 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 22 Apr 2022 09:32:47 +0000 (11:32 +0200)
commit9883cbb203b1648cc8c49038a03dd7fe30a24761
tree88862344a6429e8bed739f8d4c47f7fcdb25addd
parent5bec447afb9e0a72e28be5e3f7f03b370b486fc9
execute: sort directory entries when loading credentials recursively

Given that the recusive credential loading allows two ways to load the
same credentials, it's important to define a clear order so that it is
always the same one that wins.

i.e. if you use LoadCredential=foobar:/tmp/xyz and there are two files
/tmp/xyz/abc/cde and /tmp/xyz/abc_cde these would both result in a
credential foobar_abc_cde being set, hence it is important to make clear
which one shall win, and that it is always the same one.
src/core/execute.c