[dovecot-cvs] dovecot/src/deliver auth-client.c, 1.1.2.3, 1.1.2.4 deliver.c, 1.20.2.13, 1.20.2.14

tss at dovecot.org tss at dovecot.org
Fri Oct 13 15:30:11 UTC 2006


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

Modified Files:
      Tag: branch_1_0
	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.1.2.3
retrieving revision 1.1.2.4
diff -u -d -r1.1.2.3 -r1.1.2.4
--- auth-client.c	16 Jun 2006 18:37:05 -0000	1.1.2.3
+++ auth-client.c	13 Oct 2006 14:30:09 -0000	1.1.2.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.20.2.13
retrieving revision 1.20.2.14
diff -u -d -r1.20.2.13 -r1.20.2.14
--- deliver.c	9 Oct 2006 17:26:00 -0000	1.20.2.13
+++ deliver.c	13 Oct 2006 14:30:09 -0000	1.20.2.14
@@ -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