doveadm user '*' vs sssd: enumeration works only once

Heiko Schlittermann hs at schlittermann.de
Thu Feb 25 11:36:21 EET 2021


Heiko Schlittermann <hs at schlittermann.de> (Do 25 Feb 2021 10:08:05 CET):
> 
>         doveadm user *
> 
> returns the full user list only once. A 2nd invocation of the same command
> within a small timeframe returns a subset of the local users only (the

The following Perl script can reproduce the behaviour:

    #!/usr/bin/perl
    use strict;
    use warnings;
    use feature 'say';

    sub count {
            my $n;
            setpwent() or die("setpwent");
            $n++ while getpwent();
    #	endpwent();
            return $n;
    }

    say count();
    say count();

If I miss the endpwent(), the first count retuns 400+ users, but the
second one only about 30 (which matches the lines I've in the
/etc/passwd file).

If I use the endpwent(), I always get 400+ users.

Su, I suspect, the unfortunate behaviour is on the dovecot side (in the
auth processes)

What do you think?

    Best regards from Dresden/Germany
    Viele Grüße aus Dresden
    Heiko Schlittermann
--
 SCHLITTERMANN.de ---------------------------- internet & unix support -
 Heiko Schlittermann, Dipl.-Ing. (TU) - {fon,fax}: +49.351.802998{1,3} -
 gnupg encrypted messages are welcome --------------- key ID: F69376CE -
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <https://dovecot.org/pipermail/dovecot/attachments/20210225/4af5faf2/attachment.sig>


More information about the dovecot mailing list