dovecot-1.2: Added missing changes to userdb checkpassword.
dovecot at dovecot.org
dovecot at dovecot.org
Wed Oct 22 20:24:55 EEST 2008
details: http://hg.dovecot.org/dovecot-1.2/rev/4497c58eaca8
changeset: 8314:4497c58eaca8
user: Timo Sirainen <tss at iki.fi>
date: Wed Oct 22 20:24:50 2008 +0300
description:
Added missing changes to userdb checkpassword.
diffstat:
3 files changed, 12 insertions(+), 4 deletions(-)
dovecot-example.conf | 9 ++++++++-
src/auth/checkpassword-reply.c | 5 +++--
src/auth/userdb-checkpassword.c | 2 +-
diffs (58 lines):
diff -r 284dea506006 -r 4497c58eaca8 dovecot-example.conf
--- a/dovecot-example.conf Wed Oct 22 01:47:16 2008 +0300
+++ b/dovecot-example.conf Wed Oct 22 20:24:50 2008 +0300
@@ -898,7 +898,7 @@ auth default {
# checkpassword executable authentication
# NOTE: You will probably want to use "userdb prefetch" with this.
- # <doc/wiki/PasswordDatabase.CheckPassword.txt>
+ # <doc/wiki/AuthDatabase.CheckPassword.txt>
#passdb checkpassword {
# Path for checkpassword binary
#args =
@@ -948,6 +948,13 @@ auth default {
#userdb passwd-file {
# [username_format=<format>] <Path for passwd-file>
#args =
+ #}
+
+ # checkpassword executable user database lookup
+ # <doc/wiki/AuthDatabase.CheckPassword.txt>
+ #userdb checkpassword {
+ # Path for checkpassword binary
+ #args =
#}
# static settings generated from template <doc/wiki/UserDatabase.Static.txt>
diff -r 284dea506006 -r 4497c58eaca8 src/auth/checkpassword-reply.c
--- a/src/auth/checkpassword-reply.c Wed Oct 22 01:47:16 2008 +0300
+++ b/src/auth/checkpassword-reply.c Wed Oct 22 20:24:50 2008 +0300
@@ -10,7 +10,7 @@ int main(void)
int main(void)
{
string_t *str;
- const char *user, *home;
+ const char *user, *home, *authorized;
const char *extra_env, *key, *value, *const *tmp;
bool uid_found = FALSE, gid_found = FALSE;
@@ -58,5 +58,6 @@ int main(void)
i_error("checkpassword: write_full() failed: %m");
exit(111);
}
- return 0;
+ authorized = getenv("AUTHORIZED");
+ return authorized != NULL && strcmp(authorized, "2") == 0 ? 2 : 0;
}
diff -r 284dea506006 -r 4497c58eaca8 src/auth/userdb-checkpassword.c
--- a/src/auth/userdb-checkpassword.c Wed Oct 22 01:47:16 2008 +0300
+++ b/src/auth/userdb-checkpassword.c Wed Oct 22 20:24:50 2008 +0300
@@ -118,7 +118,7 @@ checkpassword_lookup_child(struct auth_r
ignored by setting AUTHORIZED. This needs a
special checkpassword program which knows how to
handle this. */
- env_put("AUTHORIZED=YES");
+ env_put("AUTHORIZED=1");
checkpassword_setup_env(request);
/* very simple argument splitting. */
cmd = t_strconcat(module->checkpassword_path, " ",
More information about the dovecot-cvs
mailing list