dovecot-2.1: login: If user is disabled or password expired, say...
dovecot at dovecot.org
dovecot at dovecot.org
Wed May 16 16:15:45 EEST 2012
details: http://hg.dovecot.org/dovecot-2.1/rev/ca0fef559d43
changeset: 14530:ca0fef559d43
user: Timo Sirainen <tss at iki.fi>
date: Wed May 16 16:14:31 2012 +0300
description:
login: If user is disabled or password expired, say it in logout reason.
diffstat:
src/login-common/client-common-auth.c | 4 ++++
src/login-common/client-common.c | 4 ++++
src/login-common/client-common.h | 2 ++
3 files changed, 10 insertions(+), 0 deletions(-)
diffs (40 lines):
diff -r d6f06ce44b0b -r ca0fef559d43 src/login-common/client-common-auth.c
--- a/src/login-common/client-common-auth.c Wed May 16 16:14:01 2012 +0300
+++ b/src/login-common/client-common-auth.c Wed May 16 16:14:31 2012 +0300
@@ -82,6 +82,10 @@
reply_r->temp = TRUE;
else if (strcmp(key, "authz") == 0)
reply_r->authz_failure = TRUE;
+ else if (strcmp(key, "user_disabled") == 0)
+ client->auth_user_disabled = TRUE;
+ else if (strcmp(key, "pass_expired") == 0)
+ client->auth_pass_expired = TRUE;
else if (strcmp(key, "reason") == 0)
reply_r->reason = value;
else if (strcmp(key, "host") == 0)
diff -r d6f06ce44b0b -r ca0fef559d43 src/login-common/client-common.c
--- a/src/login-common/client-common.c Wed May 16 16:14:01 2012 +0300
+++ b/src/login-common/client-common.c Wed May 16 16:14:31 2012 +0300
@@ -645,6 +645,10 @@
return t_strdup_printf("(internal failure, %u succesful auths)",
client->auth_successes);
}
+ if (client->auth_user_disabled)
+ return "(user disabled)";
+ if (client->auth_pass_expired)
+ return "(password expired)";
return t_strdup_printf("(auth failed, %u attempts in %u secs)",
client->auth_attempts, auth_secs);
}
diff -r d6f06ce44b0b -r ca0fef559d43 src/login-common/client-common.h
--- a/src/login-common/client-common.h Wed May 16 16:14:01 2012 +0300
+++ b/src/login-common/client-common.h Wed May 16 16:14:31 2012 +0300
@@ -139,6 +139,8 @@
unsigned int auth_process_comm_fail:1;
unsigned int proxy_auth_failed:1;
unsigned int auth_waiting:1;
+ unsigned int auth_user_disabled:1;
+ unsigned int auth_pass_expired:1;
/* ... */
};
More information about the dovecot-cvs
mailing list