From: Tom C. <tom...@us...> - 2004-06-26 01:39:11
|
Update of /cvsroot/vpopmail/vpopmail In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11896 Modified Files: ChangeLog README.ldap README.mysql README.pgsql vpgsql.c vuserinfo.c Log Message: bring forward patches from 5.4.3 to 5.4.5 Index: README.mysql =================================================================== RCS file: /cvsroot/vpopmail/vpopmail/README.mysql,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- README.mysql 30 Mar 2004 22:52:47 -0000 1.10 +++ README.mysql 26 Jun 2004 01:38:47 -0000 1.11 @@ -110,10 +110,10 @@ Download and unpack the source cd /usr/local/src - wget http://osdn.dl.sourceforge.net/sourceforge/vpopmail/vpopmail-5.4.3.tar.gz - tar xzf vpopmail-5.4.3.tar.gz - chown -R root.root vpopmail-5.4.3 - cd vpopmail-5.4.3 + wget http://telia.dl.sourceforge.net/sourceforge/vpopmail/vpopmail-5.4.4.tar.gz + tar xzf vpopmail-5.4.4.tar.gz + chown -R root.root vpopmail-5.4.4 + cd vpopmail-5.4.4 Setup the MySQL support in the vpopmail sources Index: ChangeLog =================================================================== RCS file: /cvsroot/vpopmail/vpopmail/ChangeLog,v retrieving revision 1.138 retrieving revision 1.139 diff -u -d -r1.138 -r1.139 --- ChangeLog 22 Jun 2004 20:40:21 -0000 1.138 +++ ChangeLog 26 Jun 2004 01:38:47 -0000 1.139 @@ -177,6 +177,47 @@ - Multiple fixes to vpgsql.c related to freeing PGresults and attempting to access NULL PGresults when reporting errors. +5.4.5 - released 25-Jun-04 + + fernando (at) telemacro (dot) com (dot) br + - Patch for vpgsql.c fixes bug with Postgres and roaming users + (POP before SMTP). [895501] + + Françoi Wautier + - Fix method used to open database in vauth_open_update of + vmysql.c. [967994, 946983] + + Pit Palme + - Show 'delete' as valid option to vdelivermail in docs. [951245] + + rstml + - Hide error message during POP3 auth with Postgres. [915485] + + Tom Collins + - Fix `vuserinfo -l` output, based on Bill Shupp's patch + (moved code to a single function call). [961742] + +5.4.4 - released 26-May-04 + + Tom Collins + - Link math lib when compiling for MySQL. + - Create ~vpopmail and ~vpopmail/etc in configure script. [930939] + Note that any code creating files in ~vpopmail should probably + be moved from configure and into Makefile (under make install). + - Use MAX_PW_DIR when checking max size of domain's directory. + + Ken Jones + - vdelivermail.c: wait on pid for qmail-inject to finish + before continuing in deliver_mail function. [from 5.5.1] + + Michael Bowe + - Minor documentation tweaks + - Fix for : If roaming users were enabled, and auth module was not + SQL based, and user's IP address was not available (eg being + called from Courier-IMAP with authdaemon enabled), then + open_smtp.tmp.pid files would be created for each auth + but never removed. + 5.4.3 - released 11-Mar-04 Tom Collins Index: vuserinfo.c =================================================================== RCS file: /cvsroot/vpopmail/vpopmail/vuserinfo.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- vuserinfo.c 22 May 2004 12:28:21 -0000 1.9 +++ vuserinfo.c 26 Jun 2004 01:38:47 -0000 1.10 @@ -243,12 +243,36 @@ } } -void display_user(struct vqpasswd *mypw, char *domain) +void display_lastlogin (struct vqpasswd *pw, char *domain) { #ifdef ENABLE_AUTH_LOGGING time_t mytime; char *authip; + + /* There should be a new function that retrieves both + * auth time and IP in a single call (and single DB lookup) + * to reduce overhead. + */ + mytime = vget_lastauth(pw, domain); + authip = vget_lastauthip(pw,domain); + if ( mytime == 0 || authip == 0 || + strcmp(authip, NULL_REMOTE_IP) == 0 ) { + if ( mytime != 0 ) { + printf("account created: %s", asctime(localtime(&mytime))); + } + printf("last auth: Never logged in\n"); + } else { + printf("last auth: %s", asctime(localtime(&mytime))); + if ( authip != NULL ) { + printf("last auth ip: %s\n", authip); + } + } + #endif +} + +void display_user(struct vqpasswd *mypw, char *domain) +{ char maildir[MAX_BUFF]; if ( DisplayAll ) { @@ -294,24 +318,7 @@ } else { printf("usage: %s\n", mypw->pw_shell); } - -#ifdef ENABLE_AUTH_LOGGING - mytime = vget_lastauth(mypw, domain); - authip = vget_lastauthip(mypw,domain); - if ( mytime == 0 || authip == 0 || - strcmp(authip, NULL_REMOTE_IP) == 0 ) { - if ( mytime != 0 ) { - printf("account created: %s", asctime(localtime(&mytime))); - } - printf("last auth: Never logged in\n"); - } else { - printf("last auth: %s", asctime(localtime(&mytime))); - if ( authip != NULL ) { - printf("last auth ip: %s\n", authip); - } - } - -#endif + display_lastlogin (mypw, domain); } else { if ( DisplayName ) printf("%s\n", mypw->pw_name); if ( DisplayPasswd ) printf("%s\n", mypw->pw_passwd); @@ -333,11 +340,6 @@ } } -#ifdef ENABLE_AUTH_LOGGING - if ( DisplayLastAuth ) { - mytime = vget_lastauth(mypw, domain); - printf("%s\n", asctime(localtime(&mytime))); - } -#endif + if ( DisplayLastAuth ) display_lastlogin (mypw, domain); } } Index: README.ldap =================================================================== RCS file: /cvsroot/vpopmail/vpopmail/README.ldap,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- README.ldap 30 Mar 2004 22:52:47 -0000 1.7 +++ README.ldap 26 Jun 2004 01:38:47 -0000 1.8 @@ -74,10 +74,10 @@ Download and unpack the source cd /usr/local/src - wget http://osdn.dl.sourceforge.net/sourceforge/vpopmail/vpopmail-5.4.3.tar.gz - tar xzf vpopmail-5.4.3.tar.gz - chown -R root.root vpopmail-5.4.3 - cd vpopmail-5.4.3 + wget http://telia.dl.sourceforge.net/sourceforge/vpopmail/vpopmail-5.4.4.tar.gz + tar xzf vpopmail-5.4.4.tar.gz + chown -R root.root vpopmail-5.4.4 + cd vpopmail-5.4.4 Setup the LDAP support in the vpopmail sources Index: vpgsql.c =================================================================== RCS file: /cvsroot/vpopmail/vpopmail/vpgsql.c,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- vpgsql.c 22 May 2004 12:28:21 -0000 1.27 +++ vpgsql.c 26 Jun 2004 01:38:47 -0000 1.28 @@ -288,9 +288,11 @@ ); pgres=PQexec(pgc, SqlBufRead); if ( ! pgres || PQresultStatus(pgres)!=PGRES_TUPLES_OK) { +#ifdef DEBUG fprintf(stderr, "vauth_getpw: failed select: %s : %s\n", SqlBufRead, PQerrorMessage(pgc)); +#endif if( pgres ) PQclear(pgres); return NULL; } @@ -664,7 +666,7 @@ pgres=PQexec(pgc, SqlBufUpdate); } - if(!pgres || PQresultStatus(pgres)!= PGRES_COMMAND_OK ) { + if(pgres && PQresultStatus(pgres) == PGRES_COMMAND_OK ) { /* need to return non-zero value if value inserted */ if( pgres ) PQclear(pgres); return 1; Index: README.pgsql =================================================================== RCS file: /cvsroot/vpopmail/vpopmail/README.pgsql,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- README.pgsql 30 Mar 2004 22:50:19 -0000 1.10 +++ README.pgsql 26 Jun 2004 01:38:47 -0000 1.11 @@ -105,10 +105,10 @@ Download and unpack the source cd /usr/local/src - wget http://osdn.dl.sourceforge.net/sourceforge/vpopmail/vpopmail-5.4.3.tar.gz - tar xzf vpopmail-5.4.3.tar.gz - chown -R root.root vpopmail-5.4.3 - cd vpopmail-5.4.3 + wget http://telia.dl.sourceforge.net/sourceforge/vpopmail/vpopmail-5.4.4.tar.gz + tar xzf vpopmail-5.4.4.tar.gz + chown -R root.root vpopmail-5.4.4 + cd vpopmail-5.4.4 Create the a vpopmail database in PostgreSQL |