Ken,
Here is a patch to fix some compilation problems found in vpopmail
4.10.15.
--
Antonio Dias
diff -urN vpopmail-4.10.15.orig/vauth.h vpopmail-4.10.15/vauth.h
--- vpopmail-4.10.15.orig/vauth.h Tue Jun 5 13:05:05 2001
+++ vpopmail-4.10.15/vauth.h Wed Jun 6 02:18:47 2001
@@ -54,7 +54,7 @@
void vclose();
void vclose1();
-int vset_lastauth( char *user, char *domain, char *remoteip);
+int vset_lastauth(char *user, char *dir, char *domain, char *remoteip);
time_t vget_lastauth( struct vqpasswd *pw, char *domain);
/* these routines are used to admin ip aliased domains */
diff -urN vpopmail-4.10.15.orig/vcdb.c vpopmail-4.10.15/vcdb.c
--- vpopmail-4.10.15.orig/vcdb.c Tue Jun 5 13:06:38 2001
+++ vpopmail-4.10.15/vcdb.c Wed Jun 6 02:19:30 2001
@@ -404,7 +404,7 @@
fclose(fs3);
#ifdef ENABLE_AUTH_LOGGING
- vset_lastauth(user, domain, NULL_REMOTE_IP);
+ vset_lastauth(user, dir, domain, NULL_REMOTE_IP);
#endif
return(0);
@@ -939,7 +939,7 @@
vpw = vauth_getpw( user, domain );
tmpbuf = malloc(MAX_BUFF);
- sprintf(tmpbuf, "%s/lastauth", pw->pw_dir);
+ sprintf(tmpbuf, "%s/lastauth", vpw->pw_dir);
if ( (fs = fopen(tmpbuf,"w+")) == NULL ) {
free(tmpbuf);
return(-1);
@@ -947,9 +947,8 @@
fprintf(fs, "%s", remoteip);
fclose(fs);
free(tmpbuf);
-#else
- return(0);
#endif
+ return(0);
}
time_t vget_lastauth( struct vqpasswd *pw, char *domain)
diff -urN vpopmail-4.10.15.orig/vchkpw.c vpopmail-4.10.15/vchkpw.c
--- vpopmail-4.10.15.orig/vchkpw.c Sun Jun 3 13:00:49 2001
+++ vpopmail-4.10.15/vchkpw.c Wed Jun 6 02:21:58 2001
@@ -338,7 +338,7 @@
* update the authentication time on the account
*/
#ifdef ENABLE_AUTH_LOGGING
- vset_lastauth(vpw,TheDomain,IpAddr);
+ vset_lastauth(TheUser,vpw->pw_dir,TheDomain,IpAddr);
#endif
#ifdef POP_AUTH_OPEN_RELAY
diff -urN vpopmail-4.10.15.orig/vdeloldusers.c vpopmail-4.10.15/vdeloldusers.c
--- vpopmail-4.10.15.orig/vdeloldusers.c Fri Jun 1 09:38:24 2001
+++ vpopmail-4.10.15/vdeloldusers.c Wed Jun 6 02:24:45 2001
@@ -55,7 +55,6 @@
static MYSQL mysql;
static MYSQL_RES *res = NULL;
static MYSQL_ROW row;
-#endif
void usage();
void get_options(int argc,char **argv);
@@ -143,4 +142,11 @@
exit(-1);
}
}
+#else
+int main()
+{
+ printf("mysql was not enabled, reconfigure with --enable-mysql=y\n");
+ exit(-1);
+}
+#endif
#endif