diff -urN -x .svn ../../vendor/vpopmail/vpopmail.c ./vpopmail.c --- ../../vendor/vpopmail/vpopmail.c Wed Oct 4 13:19:16 2006 +++ ./vpopmail.c Wed Oct 4 15:44:20 2006 @@ -560,6 +560,8 @@ if (entry.realdomain == NULL) continue; /* remove trailing '-' from entry.domain */ + if (entry.realdomain <= entry.domain + 2 || + *(entry.realdomain-2) != '-') continue; *(entry.realdomain-2) = '\0'; if ((p = strtok (NULL, ":")) == NULL) continue; @@ -1229,6 +1231,7 @@ for(i=0;tmpbuf1[i]!=0;++i) { if (tmpbuf1[i]=='\n') { tmpbuf1[i]=0; + break; } } @@ -1239,6 +1242,7 @@ if( 0 == strcmp(tmpbuf1,aliases[i])) { doit=0; // fprintf( stderr, " *** DELETE ***\n"); + break; } } if( doit ) { @@ -1381,7 +1385,7 @@ execl(QMAILNEWU,"qmail-newu", NULL); exit(127); } else { - wait(&pid); + waitpid(pid,&pid,0); } return(0); } @@ -1633,7 +1637,8 @@ // If users/assign - need to delete last character if( 1 == file_type ) { - domain[--i] = 0; + if (i > 0) + domain[--i] = 0; } else { domain[i] = 0; } @@ -1679,9 +1684,7 @@ i=i+2; // Clean out the domain variable - for(j=0;j