diff options
Diffstat (limited to 'net-mail/vpopmail/files/vpopmail.diff')
-rw-r--r-- | net-mail/vpopmail/files/vpopmail.diff | 88 |
1 files changed, 0 insertions, 88 deletions
diff --git a/net-mail/vpopmail/files/vpopmail.diff b/net-mail/vpopmail/files/vpopmail.diff deleted file mode 100644 index afa08c4b6354..000000000000 --- a/net-mail/vpopmail/files/vpopmail.diff +++ /dev/null @@ -1,88 +0,0 @@ ---- vpopmail.c Sat May 18 02:25:49 2002 -+++ vb/vpopmail.c Mon Jul 29 15:06:47 2002 -@@ -1012,51 +1012,45 @@ - int buff_size; - { - int i; -- int j; -- int k; -- int found; -- -- for( i=0,j=0,found=0; found==0 && j<buff_size && email[i]!=0; ++i,++j) { -- for(k=0;ATCHARS[k]!=0;++k){ -- if ( email[i] == ATCHARS[k] ) { -- found = 1; -- continue; -- } -- } -- if ( found == 0 ) { -- user[j] = email[i]; -- } -- } -- user[j] = 0; -- lowerit(user); -- -+ int n; -+ int len; -+ char *at = NULL; -+ -+ lowerit(email); -+ -+ len = strlen(ATCHARS); -+ for(i=0;i<len; ++i ) if ((at=strchr(email,ATCHARS[i]))) break; -+ -+ if ( at!=NULL ) { -+ n = at - email + 1; -+ if ( n > buff_size ) n = buff_size; -+ strncpy(user, email, n); -+ user[n-1] = 0; -+ strncpy(domain, ++at, buff_size); -+ domain[buff_size-1] = 0; -+ } else { -+ strncpy(user, email, buff_size); -+ user[buff_size-1] = 0; - domain[0] = 0; -- if (email[i]!=0) { -- for(j=0;j<buff_size&&email[i]!=0&&email[i]!='@';++i,++j) { -- domain[j] = email[i]; -- } -- domain[j] = 0; -- lowerit(domain); -- } -- -- if ( is_username_valid( user ) != 0 ) { -- printf("user invalid %s\n", user); -- return(-1); -- } -+ } - -- if ( is_domain_valid( domain ) != 0 ) { -- printf("domain invalid %s\n", domain); -- return(-1); -- } -+ if ( is_username_valid( user ) != 0 ) { -+ printf("user invalid %s\n", user); -+ return(-1); -+ } - -- /* if the domain is blank put in the default domain -- * if it was configured with --enable-default-domain=something -- */ -- vset_default_domain(domain); -+ if ( is_domain_valid( domain ) != 0 ) { -+ printf("domain invalid %s\n", domain); -+ return(-1); -+ } - -- vget_real_domain(domain, buff_size); -+ /* if the domain is blank put in the default domain -+ * if it was configured with --enable-default-domain=something -+ */ -+ vset_default_domain(domain); -+ vget_real_domain(domain, buff_size); - -- return(0); -+ return(0); - } - - /* |