--- ../qmail-1.03-patch20010101-orig/auth_pop.c Mon Jan 8 23:24:03 2001 +++ auth_pop.c Mon Jan 8 23:36:12 2001 @@ -15,7 +15,12 @@ #ifdef AUTOHOMEDIRMAKE #include "qldap-mdm.h" #endif +#include +#include +int child; +int wstat; +char *opensmtp = "/usr/local/bin/pop3-record"; unsigned int auth_port; void auth_init(int argc, char **argv, stralloc *login, stralloc *authdata) @@ -126,7 +131,19 @@ auth_error(); } - /* first set the group id */ + if (!env_put2("AUTHUSER",login)) { + qldap_errno = ERRNO; + auth_error(); + } + + switch(child = fork()) { + case -1: _exit(111); break; + case 0: execl(opensmtp, opensmtp, 0); _exit(111); break; + } + waitpid(child, &wstat, 0); + if (!WIFEXITED(wstat)) _exit(111); + + /* first set the group id */ if (prot_gid(gid) == -1) { qldap_errno = AUTH_ERROR; auth_error();