Mercurial > dovecot > original-hg > dovecot-1.2
changeset 4652:3da6580bb0ed HEAD
Don't require home directory to be given. If debug is enabled, log what we
get from dovecot-auth.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Fri, 13 Oct 2006 15:44:22 +0300 |
parents | 2fe8f6a0bc5b |
children | f189a1724f55 |
files | src/deliver/auth-client.c src/deliver/deliver.c |
diffstat | 2 files changed, 6 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/src/deliver/auth-client.c Thu Oct 12 12:13:36 2006 +0300 +++ b/src/deliver/auth-client.c Fri Oct 13 15:44:22 2006 +0300 @@ -49,8 +49,12 @@ uid_t uid = 0; gid_t gid = 0; int home_found = FALSE; + bool debug = getenv("DEBUG") != NULL; for (tmp = t_strsplit(args, "\t"); *tmp != NULL; tmp++) { + if (debug) + i_info("auth input: %s", *tmp); + if (strncmp(*tmp, "uid=", 4) == 0) { uid = strtoul(*tmp + 4, NULL, 10); @@ -90,13 +94,6 @@ } } - if (!home_found) { - /* we must have a home directory */ - i_error("userdb(%s) didn't return a home directory", - conn->user); - return_value = EX_TEMPFAIL; - return; - } if (uid == 0) { i_error("userdb(%s) didn't return uid", conn->user); return_value = EX_TEMPFAIL;
--- a/src/deliver/deliver.c Thu Oct 12 12:13:36 2006 +0300 +++ b/src/deliver/deliver.c Fri Oct 13 15:44:22 2006 +0300 @@ -264,7 +264,8 @@ tab[2].value = strchr(user, '@'); if (tab[2].value != NULL) tab[2].value++; tab[3].value = "DELIVER"; - tab[4].value = home; + tab[4].value = home != NULL ? home : + "/HOME_DIRECTORY_USED_BUT_NOT_GIVEN_BY_USERDB"; tab[5].value = NULL; tab[6].value = NULL; tab[7].value = my_pid;