2 This patch should correct a seg fault in the FD that occurs
3 at the end of a job when the job uses old style include/excludes.
4 Apply the patch to version 1.36.1 with:
7 patch -p0 <1.36.1-fileset.patch
12 Index: src/findlib/match.c
13 ===================================================================
14 RCS file: /cvsroot/bacula/bacula/src/findlib/match.c,v
15 retrieving revision 1.21
16 diff -u -r1.21 match.c
17 --- src/findlib/match.c 21 Dec 2004 16:18:37 -0000 1.21
18 +++ src/findlib/match.c 24 Dec 2004 10:17:29 -0000
23 - Copyright (C) 2001-2004 Kern Sibbald and John Walker
24 + Copyright (C) 2001-2004 Kern Sibbald
26 This program is free software; you can redistribute it and/or
27 modify it under the terms of the GNU General Public License as
32 + ff->included_files_list = NULL;
34 for (exc=ff->excluded_files_list; exc; ) {
39 + ff->excluded_files_list = NULL;
41 for (exc=ff->excluded_paths_list; exc; ) {
47 + ff->excluded_paths_list = NULL;
53 for (rp=fname; *rp && *rp != ' '; rp++) {
55 - case 'a': /* alway replace */
56 - case '0': /* no option */
57 + case 'a': /* alway replace */
58 + case '0': /* no option */
62 inc->options |= FO_MULTIFS;
64 - case 'h': /* no recursion */
65 + case 'h': /* no recursion */
66 inc->options |= FO_NO_RECURSION;
70 inc->options |= FO_MD5;
74 inc->options |= FO_NOREPLACE;
76 - case 'p': /* use portable data format */
77 + case 'p': /* use portable data format */
78 inc->options |= FO_PORTABLE;
80 - case 'r': /* read fifo */
81 + case 'r': /* read fifo */
82 inc->options |= FO_READFIFO;
86 inc->options |= FO_SHA1;
90 inc->options |= FO_SPARSE;
94 inc->options |= FO_MTIMEONLY;
98 inc->options |= FO_KEEPATIME;
100 - case 'V': /* verify options */
101 + case 'V': /* verify options */
102 /* Copy Verify Options */
103 - for (j=0; *rp && *rp != ':'; rp++) {
104 + for (j=0; *rp && *rp != ':'; rp++) {
105 inc->VerifyOpts[j] = *rp;
106 if (j < (int)sizeof(inc->VerifyOpts) - 1) {
108 @@ -154,19 +156,19 @@
110 inc->VerifyOpts[j] = 0;
114 inc->options |= FO_IF_NEWER;
118 inc->options |= FO_ACL;
120 - case 'Z': /* gzip compression */
121 + case 'Z': /* gzip compression */
122 inc->options |= FO_GZIP;
123 - inc->level = *++rp - '0';
124 - Dmsg1(200, "Compression level=%d\n", inc->level);
125 + inc->level = *++rp - '0';
126 + Dmsg1(200, "Compression level=%d\n", inc->level);
129 - Emsg1(M_ERROR, 0, "Unknown include/exclude option: %c\n", *rp);
130 + Emsg1(M_ERROR, 0, "Unknown include/exclude option: %c\n", *rp);
135 /* Convert any \'s into /'s */
136 for (p=inc->fname; *p; p++) {
144 /* Convert any \'s into /'s */
145 for (char *p=exc->fname; *p; p++) {
154 for ( ; exc; exc=exc->next ) {
155 if (fnmatch(exc->fname, file, fnmode|FNM_PATHNAME) == 0) {
156 - Dmsg2(900, "Match exc pat=%s: file=%s:\n", exc->fname, file);
157 + Dmsg2(900, "Match exc pat=%s: file=%s:\n", exc->fname, file);
160 Dmsg2(900, "No match exc pat=%s: file=%s:\n", exc->fname, file);