Hi,

On Tue, Jul 9, 2024 at 3:35 PM Russ Allbery <r...@debian.org> wrote:
>
> Andreas Hasenack <andr...@canonical.com> writes:
>
> > Heimdal's ktb5.conf manpage (with the patches applied):
>
> >        Files and directories may be included by absolute path.
> > Including a directory causes all files in the directory to be included
> > as if each file had been included sep‐
> >        arately, but only files whose names consist of alphanumeric,
> > hyphen, and underscore are included, though they may also end in
> > '.conf'.
>
> > Heimdal doesn't mention ordering, so it's readdir() ordering, whatever that 
> > is:
>
> > +    if ((d = opendir(dname)) == NULL)
> > +        return errno;
> > +
> > +    while ((entry = readdir(d)) != NULL) {
> > (...)
>
> readdir ordering is probably bad.  I think that's essentially random on a
> lot of file systems, and I'm not sure it's even guaranteed to be stable.
> Is there any chance we could get that fixed in Heimdal before we start to
> rely on it?

I filed https://github.com/heimdal/heimdal/issues/1252 showing the problem

In heimdal, listing the directory and processing each file is done in
one function, there is no prior list of files to be ordered. MIT
kerberos creates a list first (maybe it doesn't support nesting, so
it's easier to create a list first).

Reply via email to