[dovecot-cvs] dovecot/src/deliver auth-client.c, 1.3, 1.4 deliver.c, 1.30, 1.31

tss at dovecot.org tss at dovecot.org
Fri Oct 13 13:44:24 UTC 2006


Update of /var/lib/cvs/dovecot/src/deliver
In directory talvi:/tmp/cvs-serv10986

Modified Files:
	auth-client.c deliver.c 
Log Message:
Don't require home directory to be given. If debug is enabled, log what we
get from dovecot-auth.



Index: auth-client.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/deliver/auth-client.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- auth-client.c	16 Jun 2006 18:37:06 -0000	1.3
+++ auth-client.c	13 Oct 2006 12:44:22 -0000	1.4
@@ -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;

Index: deliver.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/deliver/deliver.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- deliver.c	9 Oct 2006 17:26:01 -0000	1.30
+++ deliver.c	13 Oct 2006 12:44:22 -0000	1.31
@@ -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;



More information about the dovecot-cvs mailing list