Patches for vpopmail-4.10.15

2001-06-05 Thread Antonio Dias

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.hWed 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.cTue 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.cFri 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



Patch for vuserinfo 4.9.10

2001-04-15 Thread Antonio Dias


I received some emails telling me that the patch I sent last night is not
applying clearly. The correct difference file is available at:

http://storm.sst.com.br/vpopmail-4.9.10-fix.diff

Sorry for the incovenience and thanks for all that reported it to me.

--
Best regards,
Antonio Dias




Re: vuserinfo 4.9.10 is broken

2001-04-15 Thread Antonio Dias

On Sun, 15 Apr 2001, Bill Shupp wrote:
 While you're at it, you might want to update the patch to include the new
 option:

 printf(" -D (display all fields for entire domain)\n");

 in void usage().  Right now it's only mentioned in the ChangeLog.

Done. The updated diff is at

http://storm.sst.com.br/vpopmail-4.9.10-fix.diff

-- 
Antonio Dias




vuserinfo 4.9.10 is broken

2001-04-14 Thread Antonio Dias
if ( mypw-pw_gid  NO_PASSWD_CHNG )
-   printf("password can not be changed by user\n");
-   if ( mypw-pw_gid  NO_POP )
-   printf("pop access closed\n");
-   if ( mypw-pw_gid  NO_WEBMAIL )
-   printf("webmail access closed\n");
-   if ( mypw-pw_gid  NO_IMAP )
-   printf("imap access closed\n");
-   if ( mypw-pw_gid  BOUNCE_MAIL )
-   printf("mail will be bounced back to sender\n");
-   if ( mypw-pw_gid  NO_RELAY )
-   printf("user not allowed to relay mail\n");
-   if ( mypw-pw_gid  NO_DIALUP )
-   printf("no dialup flag has been set\n");
-   if ( mypw-pw_gid  V_USER0 )
-   printf("user flag 0 is set\n");
-   if ( mypw-pw_gid  V_USER1 )
-   printf("user flag 1 is set\n");
-   if ( mypw-pw_gid  V_USER2 )
-   printf("user flag 2 is set\n");
-   if ( mypw-pw_gid  V_USER3 )
-   printf("user flag 3 is set\n");
-
-}
-if ( DisplayComment || DisplayAll ) printf("gecos:  %s\n", mypw-pw_gecos);
-if ( DisplayDir || DisplayAll ) printf("dir:|%s|\n", mypw-pw_dir);
-if ( DisplayQuota   || DisplayAll ) printf("quota:  %s\n", mypw-pw_shell);
+   if ( DisplayName|| DisplayAll ) printf("name:   %s\n", mypw-pw_name);
+   if ( DisplayPasswd  || DisplayAll ) printf("passwd: %s\n", mypw-pw_passwd);
+   if ( DisplayUid || DisplayAll ) printf("uid:%d\n", mypw-pw_uid);
+
+   if ( DisplayGid || DisplayAll ) {
+   printf("gid:%d\n", mypw-pw_gid);
+
+   if ( mypw-pw_gid == 0 )
+   printf("all services available\n");
+   if ( mypw-pw_gid  NO_PASSWD_CHNG )
+   printf("password can not be changed by user\n");
+   if ( mypw-pw_gid  NO_POP )
+   printf("pop access closed\n");
+   if ( mypw-pw_gid  NO_WEBMAIL )
+   printf("webmail access closed\n");
+   if ( mypw-pw_gid  NO_IMAP )
+   printf("imap access closed\n");
+   if ( mypw-pw_gid  BOUNCE_MAIL )
+   printf("mail will be bounced back to sender\n");
+   if ( mypw-pw_gid  NO_RELAY )
+   printf("user not allowed to relay mail\n");
+   if ( mypw-pw_gid  NO_DIALUP )
+   printf("no dialup flag has been set\n");
+   if ( mypw-pw_gid  V_USER0 )
+   printf("user flag 0 is set\n");
+   if ( mypw-pw_gid  V_USER1 )
+   printf("user flag 1 is set\n");
+   if ( mypw-pw_gid  V_USER2 )
+   printf("user flag 2 is set\n");
+   if ( mypw-pw_gid  V_USER3 )
+   printf("user flag 3 is set\n");
+
+   }
+
+   if ( DisplayComment || DisplayAll ) printf("gecos:  %s\n", mypw-pw_gecos);
+   if ( DisplayDir || DisplayAll ) printf("dir:|%s|\n", mypw-pw_dir);
+   if ( DisplayQuota   || DisplayAll ) printf("quota:  %s\n", mypw-pw_shell);

 }

-- 
Antonio Dias