Re: [systemd-devel] Preferred way to recurse over a directory?

2021-09-15 Thread Luca Boccassi
On Wed, 2021-09-15 at 10:43 +0200, Lennart Poettering wrote: > On Di, 14.09.21 23:26, Albert Brox (alb...@exypno.tech) wrote: > > > I'm working on PR #20239 loadcred-dir and wondering what the preferred way > > to recurse over a directory is. > > > > I was told recursively calling the

Re: [systemd-devel] Preferred way to recurse over a directory?

2021-09-15 Thread Lennart Poettering
On Di, 14.09.21 23:26, Albert Brox (alb...@exypno.tech) wrote: > I'm working on PR #20239 loadcred-dir and wondering what the preferred way > to recurse over a directory is. > > I was told recursively calling the `load_credential` function is too racy so > I'm led to ftw/nftw. However I see in

[systemd-devel] Preferred way to recurse over a directory?

2021-09-14 Thread Albert Brox
I'm working on PR #20239 loadcred-dir and wondering what the preferred way to recurse over a directory is. I was told recursively calling the `load_credential` function is too racy so I'm led to ftw/nftw. However I see in the TODO file, "Get rid of nftw(). We should refuse to use such useless