diff options
author | Andrew Strong <andrew.david.45@gmail.com> | 2011-06-19 23:13:42 -0500 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2011-06-19 23:13:42 -0500 |
commit | f0fdcd72c110b6f8e00c1abca6f732ec5b39ab66 (patch) | |
tree | 58088d884dc611c82c196ea2bfb46c3b64f0ba2f /network/leafnode/patches | |
parent | 0149d7cf147a6e566a9ba08f65cbe9107658ad6f (diff) | |
download | slackbuilds-f0fdcd72c110b6f8e00c1abca6f732ec5b39ab66.tar.gz |
network/leafnode: Included upstream patch for texpire
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'network/leafnode/patches')
-rw-r--r-- | network/leafnode/patches/applyfilter_plugleak.diff | 37 | ||||
-rw-r--r-- | network/leafnode/patches/sizeof_fix.diff | 12 | ||||
-rw-r--r-- | network/leafnode/patches/texpire_delete.diff | 21 |
3 files changed, 70 insertions, 0 deletions
diff --git a/network/leafnode/patches/applyfilter_plugleak.diff b/network/leafnode/patches/applyfilter_plugleak.diff new file mode 100644 index 0000000000..54274cb998 --- /dev/null +++ b/network/leafnode/patches/applyfilter_plugleak.diff @@ -0,0 +1,37 @@ +--- a/applyfilter.c ++++ b/applyfilter.c +@@ -71,14 +71,12 @@ static int applyfilter(const char *name, struct newsgroup *g, + unsigned long *kept, unsigned long *deleted) + { + static size_t lsize = MAXHEADERSIZE + 1; +- static char *l; ++ char *l; + struct stat st; + int score, fd; + struct utimbuf u; + unsigned long n; + +- l = (char *)critmalloc(lsize, "Space for article"); +- + if (stat(name, &st)) { + ln_log(LNLOG_SNOTICE, LNLOG_CARTICLE, + "cannot stat file \"%s\" in newsgroup %s: %m", +@@ -97,6 +95,8 @@ static int applyfilter(const char *name, struct newsgroup *g, + return 0; + } + ++ l = (char *)critmalloc(lsize, "Space for article"); ++ + if((fd = open(name, O_RDONLY)) >= 0) + { + int ret; +@@ -167,6 +167,9 @@ static int applyfilter(const char *name, struct newsgroup *g, + ln_log(LNLOG_SERR, LNLOG_CARTICLE, + "could not open file \"%s\" in newsgroup %s\n", + name, g->name); ++ ++ free(l); ++ + return 0; + } + diff --git a/network/leafnode/patches/sizeof_fix.diff b/network/leafnode/patches/sizeof_fix.diff new file mode 100644 index 0000000000..a5e519dfb0 --- /dev/null +++ b/network/leafnode/patches/sizeof_fix.diff @@ -0,0 +1,12 @@ +--- a/system.h 2008-12-29 22:24:30.000000000 +1100 ++++ b/system.h 2010-05-26 19:39:22.376358080 +1000 +@@ -20,9 +20,6 @@ + #include <inttypes.h> + #elif HAVE_STDINT_H + #include <stdint.h> +-#elif sizeof(unsigned long) == 4 && sizeof(unsigned char) == 1 +-typedef unsigned long uint32_t; +-typedef unsigned char uint8_t; + #else + #error "I cannot figure how to define uint32_t and uint8_t." + #endif diff --git a/network/leafnode/patches/texpire_delete.diff b/network/leafnode/patches/texpire_delete.diff new file mode 100644 index 0000000000..9347a39e43 --- /dev/null +++ b/network/leafnode/patches/texpire_delete.diff @@ -0,0 +1,21 @@ +# commit f8c3b831ea2af3de9036c3dbebcff27fbfcfeec4 +# Author: Matthias Andree <matthias.andree@gmx.de> +# Date: Fri May 27 01:22:44 2011 +0200 +# +# Bugfix: don't delete articles when texpire -n -C MessID is run. +# +# Found by Paul Brooks. + +--- a/texpire.c ++++ b/texpire.c +@@ -1123,7 +1123,9 @@ main(int argc, char **argv) + while(optind < argc) { + if (verbose) + printf("Trying to remove %s...\n", argv[optind]); +- delete_article(argv[optind], "Remove", "Removed", 1); ++ if (!dryrun) { ++ delete_article(argv[optind], "Remove", "Removed", 1); ++ } + optind++; + } + break; |