[dovecot] Re: inetd/xinetd/tcpserver support

Charlie Brady charlieb-dovecot at e-smith.com
Thu Mar 20 10:48:10 EET 2003


On Thu, 20 Mar 2003, Charlie Brady wrote:

> On 20 Mar 2003, Timo Sirainen wrote:
> 
> > Dovecot did before use such variable, but I changed
> > it later to send the OK before executing imap process. I don't really
> > remember why anymore, but I think there was a good reason :)
> 
> Perhaps the reason is to be found in CVS change logs.
> 
> I'd really appreciate it if you could point out to me where I'd find the 
> code which would make use of the variable.

Found it. Here's the change which broke mailfront compatibility:

revision 1.20
date: 2003/01/27 01:33:40;  author: cras;  state: Exp;  lines: +4 -5
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.


diff -u -r1.19 -r1.20
--- src/imap/main.c     5 Jan 2003 13:09:51 -0000       1.19
+++ src/imap/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 */


--
Charlie





More information about the dovecot mailing list