summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-mail/dovecot/files/dovecot-userdb-passwd-fix.patch')
-rw-r--r--net-mail/dovecot/files/dovecot-userdb-passwd-fix.patch18
1 files changed, 18 insertions, 0 deletions
diff --git a/net-mail/dovecot/files/dovecot-userdb-passwd-fix.patch b/net-mail/dovecot/files/dovecot-userdb-passwd-fix.patch
new file mode 100644
index 00000000000..d5bff016394
--- /dev/null
+++ b/net-mail/dovecot/files/dovecot-userdb-passwd-fix.patch
@@ -0,0 +1,18 @@
+diff --git a/src/auth/userdb-passwd.c b/src/auth/userdb-passwd.c
+index 03cbd554ff..699db314ce 100644
+--- a/src/auth/userdb-passwd.c
++++ b/src/auth/userdb-passwd.c
+@@ -172,8 +172,11 @@ static void passwd_iterate_next(struct userdb_iterate_context *_ctx)
+ return;
+ }
+
+- errno = 0;
+- while ((pw = getpwent()) != NULL) {
++ for (;;) {
++ errno = 0;
++ pw = getpwent();
++ if (pw == NULL)
++ break;
+ if (passwd_iterate_want_pw(pw, set)) {
+ _ctx->callback(pw->pw_name, _ctx->context);
+ return;