diff options
author | miwi <miwi@FreeBSD.org> | 2008-08-16 03:19:35 +0800 |
---|---|---|
committer | miwi <miwi@FreeBSD.org> | 2008-08-16 03:19:35 +0800 |
commit | 3172b0d80ecc3d526692ba15e97c4f2a3003f2a5 (patch) | |
tree | 33873a4b6042ae9ae7ac1d706545d78d7acf7a2e /sysutils/logrotate | |
parent | 96828c4b26d9227be90c08336f1e46067285c083 (diff) | |
download | freebsd-ports-gnome-3172b0d80ecc3d526692ba15e97c4f2a3003f2a5.tar.gz freebsd-ports-gnome-3172b0d80ecc3d526692ba15e97c4f2a3003f2a5.tar.zst freebsd-ports-gnome-3172b0d80ecc3d526692ba15e97c4f2a3003f2a5.zip |
- Olddir options fix
logrotate's path-type options (eg. compress, olddir,
just to name a few) fail because FreeBSD's libc
implements mbtrowc(3) differently, and returns -2 on
empty string. Linux version, however, returns 0.
A simple zero-length check added to path check function,
which hides this.
PR: 126337
Submitted by: Balazs NAGY <js@iksz.hu> (maintainer)
Diffstat (limited to 'sysutils/logrotate')
-rw-r--r-- | sysutils/logrotate/Makefile | 1 | ||||
-rw-r--r-- | sysutils/logrotate/files/patch-aa | 21 |
2 files changed, 16 insertions, 6 deletions
diff --git a/sysutils/logrotate/Makefile b/sysutils/logrotate/Makefile index 82f5d1cafdd3..0b2ae4dae7f6 100644 --- a/sysutils/logrotate/Makefile +++ b/sysutils/logrotate/Makefile @@ -7,6 +7,7 @@ PORTNAME= logrotate PORTVERSION= 3.7.7 +PORTREVISION= 1 CATEGORIES= sysutils MASTER_SITES= https://fedorahosted.org/releases/l/o/logrotate/ DISTNAME= ${PORTNAME}-${PORTVERSION} diff --git a/sysutils/logrotate/files/patch-aa b/sysutils/logrotate/files/patch-aa index fd9dfbe3891a..fb7868c1070e 100644 --- a/sysutils/logrotate/files/patch-aa +++ b/sysutils/logrotate/files/patch-aa @@ -1,6 +1,6 @@ -diff -ruN logrotate-3.7.7-orig/config.c logrotate-3.7.7/config.c ---- logrotate-3.7.7-orig/config.c Fri May 9 07:28:59 2008 -+++ logrotate-3.7.7/config.c Sun Jun 22 22:10:25 2008 +diff -u logrotate-3.7.7-orig/config.c logrotate-3.7.7/config.c +--- logrotate-3.7.7-orig/config.c 2008-08-07 15:10:36.000000000 +0200 ++++ logrotate-3.7.7/config.c 2008-08-07 15:11:54.000000000 +0200 @@ -1,5 +1,4 @@ #include <sys/queue.h> -#include <alloca.h> @@ -15,9 +15,18 @@ diff -ruN logrotate-3.7.7-orig/config.c logrotate-3.7.7/config.c #include "basenames.h" #include "log.h" -diff -ruN logrotate-3.7.7-orig/logrotate.c logrotate-3.7.7/logrotate.c ---- logrotate-3.7.7-orig/logrotate.c Wed May 14 10:31:35 2008 -+++ logrotate-3.7.7/logrotate.c Sun Jun 22 22:10:25 2008 +@@ -93,7 +93,7 @@ + + chptr = start; + +- while( (len = mbrtowc(&pwc, chptr, strlen(chptr), NULL)) != 0 ) { ++ while( (len = strlen(chptr)) != 0 && (len = mbrtowc(&pwc, chptr, len, NULL)) != 0 ) { + if( len == (size_t)(-1) || len == (size_t)(-2) || !iswprint(pwc) || iswblank(pwc) ) { + message(MESS_ERROR, "%s:%d bad %s path %s\n", + configFile, lineNum, key, start); +diff -u logrotate-3.7.7-orig/logrotate.c logrotate-3.7.7/logrotate.c +--- logrotate-3.7.7-orig/logrotate.c 2008-08-07 15:10:36.000000000 +0200 ++++ logrotate-3.7.7/logrotate.c 2008-08-07 15:10:43.000000000 +0200 @@ -1,5 +1,4 @@ #include <sys/queue.h> -#include <alloca.h> |