[dovecot-cvs] dovecot/src/imap main.c,1.19,1.20

cras at procontrol.fi cras at procontrol.fi
Mon Jan 27 03:33:42 EET 2003


Update of /home/cvs/dovecot/src/imap
In directory danu:/tmp/cvs-serv22317/src/imap

Modified Files:
	main.c 
Log Message:
We have now separate "userdb" and "passdb". They aren't tied to each others
in any way, so it's possible to use whatever user database with whatever
password database.

Added "static" userdb, which uses same uid/gid for everyone and generates
home directory from given template. This could be useful with PAM, although
insecure since everyone uses same uid.

Not too well tested, and userdb/passdb API still needs to be changed to
asynchronous for sql/ldap/etc lookups.



Index: main.c
===================================================================
RCS file: /home/cvs/dovecot/src/imap/main.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- main.c	5 Jan 2003 13:09:51 -0000	1.19
+++ main.c	27 Jan 2003 01:33:40 -0000	1.20
@@ -12,7 +12,7 @@
 #include <syslog.h>
 
 #define IS_STANDALONE() \
-        (getenv("LOGIN_TAG") == NULL)
+        (getenv("LOGGED_IN") == NULL)
 
 struct ioloop *ioloop;
 static char log_prefix[128]; /* syslog() needs this to be permanent */
@@ -104,9 +104,6 @@
 		client_send_line(client, t_strconcat(
 			"* PREAUTH [CAPABILITY "CAPABILITY_STRING"] "
 			"Logged in as ", getenv("USER"), NULL));
-	} else {
-		client_send_line(client, t_strconcat(getenv("LOGIN_TAG"),
-						     " OK Logged in.", NULL));
 	}
 }
 
@@ -125,8 +122,10 @@
 int main(int argc __attr_unused__, char *argv[], char *envp[])
 {
 #ifdef DEBUG
-	if (getenv("LOGIN_TAG") != NULL)
+	if (getenv("LOGGED_IN") != NULL) {
 		fd_debug_verify_leaks(3, 1024);
+		putenv("DISABLE_ALARMHUP=1"); /* annoying when debugging */
+	}
 #endif
 	/* NOTE: we start rooted, so keep the code minimal until
 	   restrict_access_by_env() is called */




More information about the dovecot-cvs mailing list