Public bug reported: Binary package hint: logrotate
logrotate internally stores threshhold as unsigned int. Thus file rotation cannot be setup to value greater than 4G. Worst thing is that logrotate quietly rounds file size, and it size is specified as 9G, effective size will be 1G. Patch is: === Index: logrotate-3.7.8/logrotate.c =================================================================== --- logrotate-3.7.8.orig/logrotate.c 2010-12-05 00:22:38.000000000 +0300 +++ logrotate-3.7.8/logrotate.c 2010-12-05 00:30:58.000000000 +0300 @@ -1253,7 +1253,7 @@ message(MESS_DEBUG, "\nrotating pattern: %s ", log->pattern); switch (log->criterium) { case ROT_DAYS: - message(MESS_DEBUG, "after %d days ", log->threshhold); + message(MESS_DEBUG, "after %lld days ", (long long) log->threshhold); break; case ROT_WEEKLY: message(MESS_DEBUG, "weekly "); @@ -1265,7 +1265,7 @@ message(MESS_DEBUG, "yearly "); break; case ROT_SIZE: - message(MESS_DEBUG, "%d bytes ", log->threshhold); + message(MESS_DEBUG, "%lld bytes ", (long long) log->threshhold); break; case ROT_FORCE: message(MESS_DEBUG, "forced from command line "); @@ -1286,7 +1286,7 @@ message(MESS_DEBUG, "empty log files are not rotated, "); if (log->minsize) - message(MESS_DEBUG, "only log files >= %d bytes are rotated, ", log->minsize); + message(MESS_DEBUG, "only log files >= %lld bytes are rotated, ", (long long) log->minsize); if (log->logAddress) { message(MESS_DEBUG, "old logs mailed to %s\n", log->logAddress); Index: logrotate-3.7.8/logrotate.h =================================================================== --- logrotate-3.7.8.orig/logrotate.h 2010-12-05 00:21:24.000000000 +0300 +++ logrotate-3.7.8/logrotate.h 2010-12-05 00:22:00.000000000 +0300 @@ -33,8 +33,8 @@ char *oldDir; enum { ROT_DAYS, ROT_WEEKLY, ROT_MONTHLY, ROT_YEARLY, ROT_SIZE, ROT_FORCE } criterium; - unsigned int threshhold; - unsigned int minsize; + off_t threshhold; + off_t minsize; int rotateCount; int rotateAge; int logStart; Index: logrotate-3.7.8/config.c =================================================================== --- logrotate-3.7.8.orig/config.c 2010-12-05 00:31:32.000000000 +0300 +++ logrotate-3.7.8/config.c 2010-12-05 00:32:57.000000000 +0300 @@ -484,7 +484,7 @@ char oldchar, foo; off_t length; int lineNum = 1; - int multiplier; + off_t multiplier; int i, k; char *scriptStart = NULL; char **scriptDest = NULL; @@ -792,7 +792,7 @@ *endtag = oldchar, start = endtag; } else if (!strcmp(start, "size") || !strcmp(start, "minsize")) { - unsigned int size = 0; + off_t size = 0; char *opt = start; *endtag = oldchar, start = endtag; === ** Affects: logrotate (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/685311 Title: Log file size is limited to 4G -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs