diff options
author | Peter Pentchev <roam@FreeBSD.org> | 2007-12-25 06:00:00 +0000 |
---|---|---|
committer | Peter Pentchev <roam@FreeBSD.org> | 2007-12-25 06:00:00 +0000 |
commit | df8f43848da2ae178086307933faadbd40ade716 (patch) | |
tree | cfed3b29eda7b4f19deeb29ee4bb469e5d237479 /mail/vpopmail/files/patch-vutil.c | |
parent | - Update to 0.06 (diff) |
Update the vpopmail port to version 5.4.26 with a lot of changes and fixes:
- add the WITH_SPAMFOLDER knob from Alex Dupre's PR;
- fix lots of bugs in the new vlist code;
- fix a couple of bugs in MySQL's "valias -n" implementation;
- actually implement "valias -n" for PostgreSQL;
- fix a couple of directory descriptor leaks and other buglets.
PR: 117321 (the WITH_SPAMFOLDER knob)
Submitted by: ale
Notes
Notes:
svn path=/head/; revision=204487
Diffstat (limited to 'mail/vpopmail/files/patch-vutil.c')
-rw-r--r-- | mail/vpopmail/files/patch-vutil.c | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/mail/vpopmail/files/patch-vutil.c b/mail/vpopmail/files/patch-vutil.c new file mode 100644 index 000000000000..327e507c3d61 --- /dev/null +++ b/mail/vpopmail/files/patch-vutil.c @@ -0,0 +1,49 @@ +diff -urN -x .svn ../../vendor/vpopmail/vutil.c ./vutil.c +--- ../../vendor/vpopmail/vutil.c 2007-12-25 05:03:25.000000000 +0200 ++++ ./vutil.c 2007-12-25 07:31:16.000000000 +0200 +@@ -76,13 +76,7 @@ + */ + + int file_exists (char *filename) { +- FILE *fs; +- if( (fs=fopen(filename, "r")) !=NULL ) { +- fclose(fs); +- return 1; +- } else { +- return 0; +- } ++ return(access(filename, R_OK) == 0); + } + + ////////////////////////////////////////////////////////////////////// +@@ -100,24 +94,15 @@ + { + FILE *fs = NULL; + char FileName[MAX_BUFF]; +- int result = 0; + char TmpBuf2[MAX_BUFF]; + + snprintf( FileName, MAX_BUFF, "%s/.qmail-%s", path, Name ); +- if ( (fs=fopen(FileName,"r"))==NULL) { +-// printf( " Unable to open list file: %s\n", Name ); +- } +- +- else { +- fgets( TmpBuf2, sizeof(TmpBuf2), fs); +- if ( strstr( TmpBuf2, "ezmlm-reject") != 0 || +- strstr( TmpBuf2, "ezmlm-send") != 0 ) { +- result = 1; +- } +- fclose(fs); +- } +- +- return result; ++ if ( (fs=fopen(FileName,"r"))==NULL) ++ return(0); ++ fgets( TmpBuf2, sizeof(TmpBuf2), fs); ++ fclose(fs); ++ return ( strstr( TmpBuf2, "ezmlm-reject") != 0 || ++ strstr( TmpBuf2, "ezmlm-send") != 0 ); + } + + |