Postfix 2.0 patch 18 fixes two problems introduced with Patch 17: - A change in the line reading routines caused unexpected results with lines ending in EOF. This change is undone. - A portability problem with the test command ("test -e" is not supported on older systems, while "test -f" does the job). Prereq: "2.0.17" diff -cr /tmp/postfix-2.0.17/src/global/mail_version.h ./src/global/mail_version.h *** /tmp/postfix-2.0.17/src/global/mail_version.h Mon Jan 19 17:27:52 2004 --- ./src/global/mail_version.h Thu Jan 22 08:41:53 2004 *************** *** 20,29 **** * Patches change the patchlevel and the release date. Snapshots change the * release date only, unless they include the same bugfix as a patch release. */ ! #define MAIL_RELEASE_DATE "20040119" #define VAR_MAIL_VERSION "mail_version" ! #define DEF_MAIL_VERSION "2.0.17" extern char *var_mail_version; /* --- 20,29 ---- * Patches change the patchlevel and the release date. Snapshots change the * release date only, unless they include the same bugfix as a patch release. */ ! #define MAIL_RELEASE_DATE "20040122" #define VAR_MAIL_VERSION "mail_version" ! #define DEF_MAIL_VERSION "2.0.18" extern char *var_mail_version; /* diff -cr /tmp/postfix-2.0.17/HISTORY ./HISTORY *** /tmp/postfix-2.0.17/HISTORY Tue Jan 20 10:10:59 2004 --- ./HISTORY Thu Jan 22 09:44:40 2004 *************** *** 7956,7961 **** --- 7956,7970 ---- not report really serious trouble with the destination. Files: *qmgr/qmgr_deliver.c. + 20040122 + + UNDO the 20040104 change (vstring_get() etc. return + VSTREAM_EOF when they terminate prematurely, instead of + returning the last character stored, to avoid mis-leading + warnings). File: global/vstring_vstream.c. + + Portability: test -e is not portable. File: conf/postfix-script. + Open problems: Doc: mention the proxy_interfaces parameter everywhere the diff -cr /tmp/postfix-2.0.17/conf/postfix-script ./conf/postfix-script *** /tmp/postfix-2.0.17/conf/postfix-script Tue Jan 20 10:08:50 2004 --- ./conf/postfix-script Thu Jan 22 09:44:06 2004 *************** *** 200,206 **** do test -d $dir && find $dir -type f -print | while read path do ! test -e /$path && { cmp -s $path /$path || $WARN $queue_directory/$path and /$path differ } --- 200,206 ---- do test -d $dir && find $dir -type f -print | while read path do ! test -f /$path && { cmp -s $path /$path || $WARN $queue_directory/$path and /$path differ } diff -cr /tmp/postfix-2.0.17/src/util/vstring_vstream.c ./src/util/vstring_vstream.c *** /tmp/postfix-2.0.17/src/util/vstring_vstream.c Sun Jan 4 17:26:27 2004 --- ./src/util/vstring_vstream.c Thu Jan 22 08:44:05 2004 *************** *** 95,101 **** break; } VSTRING_TERMINATE(vp); ! return (c == VSTREAM_EOF ? c : VSTRING_GET_RESULT(vp)); } /* vstring_get_nonl - read line from file, strip newline */ --- 95,101 ---- break; } VSTRING_TERMINATE(vp); ! return (VSTRING_GET_RESULT(vp)); } /* vstring_get_nonl - read line from file, strip newline */ *************** *** 108,114 **** while ((c = VSTREAM_GETC(fp)) != VSTREAM_EOF && c != '\n') VSTRING_ADDCH(vp, c); VSTRING_TERMINATE(vp); ! return (c == '\n' || c == VSTREAM_EOF ? c : VSTRING_GET_RESULT(vp)); } /* vstring_get_null - read null-terminated string from file */ --- 108,114 ---- while ((c = VSTREAM_GETC(fp)) != VSTREAM_EOF && c != '\n') VSTRING_ADDCH(vp, c); VSTRING_TERMINATE(vp); ! return (c == '\n' ? c : VSTRING_GET_RESULT(vp)); } /* vstring_get_null - read null-terminated string from file */ *************** *** 121,127 **** while ((c = VSTREAM_GETC(fp)) != VSTREAM_EOF && c != 0) VSTRING_ADDCH(vp, c); VSTRING_TERMINATE(vp); ! return (c == 0 || c == VSTREAM_EOF ? c : VSTRING_GET_RESULT(vp)); } /* vstring_get_bound - read line from file, keep newline, up to bound */ --- 121,127 ---- while ((c = VSTREAM_GETC(fp)) != VSTREAM_EOF && c != 0) VSTRING_ADDCH(vp, c); VSTRING_TERMINATE(vp); ! return (c == 0 ? c : VSTRING_GET_RESULT(vp)); } /* vstring_get_bound - read line from file, keep newline, up to bound */ *************** *** 140,146 **** break; } VSTRING_TERMINATE(vp); ! return (c == VSTREAM_EOF ? c : VSTRING_GET_RESULT(vp)); } /* vstring_get_nonl_bound - read line from file, strip newline, up to bound */ --- 140,146 ---- break; } VSTRING_TERMINATE(vp); ! return (VSTRING_GET_RESULT(vp)); } /* vstring_get_nonl_bound - read line from file, strip newline, up to bound */ *************** *** 156,162 **** while (bound-- > 0 && (c = VSTREAM_GETC(fp)) != VSTREAM_EOF && c != '\n') VSTRING_ADDCH(vp, c); VSTRING_TERMINATE(vp); ! return (c == '\n' || c == VSTREAM_EOF ? c : VSTRING_GET_RESULT(vp)); } /* vstring_get_null_bound - read null-terminated string from file */ --- 156,162 ---- while (bound-- > 0 && (c = VSTREAM_GETC(fp)) != VSTREAM_EOF && c != '\n') VSTRING_ADDCH(vp, c); VSTRING_TERMINATE(vp); ! return (c == '\n' ? c : VSTRING_GET_RESULT(vp)); } /* vstring_get_null_bound - read null-terminated string from file */ *************** *** 172,178 **** while (bound-- > 0 && (c = VSTREAM_GETC(fp)) != VSTREAM_EOF && c != 0) VSTRING_ADDCH(vp, c); VSTRING_TERMINATE(vp); ! return (c == 0 || c == VSTREAM_EOF ? c : VSTRING_GET_RESULT(vp)); } #ifdef TEST --- 172,178 ---- while (bound-- > 0 && (c = VSTREAM_GETC(fp)) != VSTREAM_EOF && c != 0) VSTRING_ADDCH(vp, c); VSTRING_TERMINATE(vp); ! return (c == 0 ? c : VSTRING_GET_RESULT(vp)); } #ifdef TEST