dovecot-2.0: lib-master: Stop accepting new connections after au...
dovecot at dovecot.org
dovecot at dovecot.org
Tue Nov 2 20:21:09 EET 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/9f179255b796
changeset: 12367:9f179255b796
user: Timo Sirainen <tss at iki.fi>
date: Tue Nov 02 18:21:05 2010 +0000
description:
lib-master: Stop accepting new connections after auth-master gets disconnected.
diffstat:
src/lib-master/master-login-auth.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diffs (33 lines):
diff -r 0b77044fbdd4 -r 9f179255b796 src/lib-master/master-login-auth.c
--- a/src/lib-master/master-login-auth.c Tue Nov 02 18:13:39 2010 +0000
+++ b/src/lib-master/master-login-auth.c Tue Nov 02 18:21:05 2010 +0000
@@ -10,6 +10,7 @@
#include "hash.h"
#include "str.h"
#include "master-interface.h"
+#include "master-service.h"
#include "master-auth.h"
#include "master-login-auth.h"
@@ -282,7 +283,10 @@
case 0:
return;
case -1:
- /* disconnected */
+ /* disconnected. stop accepting new connections, because in
+ default configuration we no longer have permissions to
+ connect back to auth-master */
+ master_service_stop_new_connections(master_service);
master_login_auth_disconnect(auth);
return;
case -2:
@@ -411,6 +415,9 @@
if (auth->fd == -1) {
if (master_login_auth_connect(auth) < 0) {
+ /* we couldn't connect to auth now,
+ so we probably can't in future either. */
+ master_service_stop_new_connections(master_service);
callback(NULL, MASTER_AUTH_ERRMSG_INTERNAL_FAILURE,
context);
return;
More information about the dovecot-cvs
mailing list