From: Kern Sibbald Date: Sat, 4 Dec 2004 18:05:30 +0000 (+0000) Subject: First cut conversion using html2latex; add .tex files X-Git-Tag: Release-1.38.0~722 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=218791fb3793a1c66ec4fba7c81ce5dc531cfd9b;p=bacula%2Fbacula First cut conversion using html2latex; add .tex files git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1742 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/kernstodo b/bacula/kernstodo index 29e7a2db57..43d822dae0 100644 --- a/bacula/kernstodo +++ b/bacula/kernstodo @@ -40,6 +40,8 @@ Regression tests: 1.37 Possibilities: +- Document security problems with the same password for everyone in + rpm and Win32 releases. - Browse generations of files. - Add offline command to Bacula console. - I've seen an error when my catalog's File table fills up. I diff --git a/bacula/src/dird/dird_conf.h b/bacula/src/dird/dird_conf.h index f3467da7e4..c33913d24d 100644 --- a/bacula/src/dird/dird_conf.h +++ b/bacula/src/dird/dird_conf.h @@ -244,7 +244,7 @@ struct JOB { }; #undef MAX_FOPTS -#define MAX_FOPTS 30 +#define MAX_FOPTS 32 /* File options structure */ struct FOPTS { diff --git a/bacula/src/dird/inc_conf.c b/bacula/src/dird/inc_conf.c index 16cb3b50b2..23c514e32c 100644 --- a/bacula/src/dird/inc_conf.c +++ b/bacula/src/dird/inc_conf.c @@ -92,6 +92,7 @@ static RES_ITEM options_items[] = { {"aclsupport", store_opts, NULL, 0, 0, 0}, {"reader", store_reader, NULL, 0, 0, 0}, {"writer", store_writer, NULL, 0, 0, 0}, + {"ignorecase", store_opts, NULL, 0, 0, 0}, {NULL, NULL, NULL, 0, 0, 0} }; @@ -114,7 +115,8 @@ enum { INC_KW_MTIMEONLY, INC_KW_KEEPATIME, INC_KW_EXCLUDE, - INC_KW_ACL + INC_KW_ACL, + INC_KW_IGNORECASE }; /* @@ -137,6 +139,7 @@ static struct s_kw FS_option_kw[] = { {"keepatime", INC_KW_KEEPATIME}, {"exclude", INC_KW_EXCLUDE}, {"aclsupport", INC_KW_ACL}, + {"ignorecase", INC_KW_IGNORECASE}, {NULL, 0} }; @@ -192,6 +195,8 @@ static struct s_fs_opt FS_options[] = { {"no", INC_KW_EXCLUDE, "0"}, {"yes", INC_KW_ACL, "A"}, {"no", INC_KW_ACL, "0"}, + {"yes", INC_KW_IGNORECASE, "i"}, + {"no", INC_KW_IGNORECASE, "0"}, {NULL, 0, 0} }; diff --git a/bacula/src/dird/ua_tree.c b/bacula/src/dird/ua_tree.c index 517ccf767d..024938b2a9 100644 --- a/bacula/src/dird/ua_tree.c +++ b/bacula/src/dird/ua_tree.c @@ -31,7 +31,11 @@ #include "bacula.h" #include "dird.h" +#ifdef HAVE_FNMATCH #include +#else +#include "lib/fnmatch.h" +#endif #include "findlib/find.h" diff --git a/bacula/src/filed/job.c b/bacula/src/filed/job.c index 2ecc32735c..623f665bf5 100644 --- a/bacula/src/filed/job.c +++ b/bacula/src/filed/job.c @@ -738,7 +738,11 @@ static void add_fileset(JCR *jcr, const char *item) int rc; char prbuf[500]; preg = (regex_t *)malloc(sizeof(regex_t)); - rc = regcomp(preg, item, REG_EXTENDED); + if (current_opts->flags & FO_IGNORECASE) { + rc = regcomp(preg, item, REG_EXTENDED|REG_ICASE); + } else { + rc = regcomp(preg, item, REG_EXTENDED); + } if (rc != 0) { regerror(rc, preg, prbuf, sizeof(prbuf)); regfree(preg); @@ -864,6 +868,9 @@ static void set_options(findFOPTS *fo, const char *opts) case 'H': /* no hard link handling */ fo->flags |= FO_NO_HARDLINK; break; + case 'i': + fo->flags |= FO_IGNORECASE; + break; case 'M': /* MD5 */ fo->flags |= FO_MD5; break; diff --git a/bacula/src/findlib/find.c b/bacula/src/findlib/find.c index cd120f49fd..4beaad3b90 100644 --- a/bacula/src/findlib/find.c +++ b/bacula/src/findlib/find.c @@ -165,6 +165,7 @@ find_files(JCR *jcr, FF_PKT *ff, int callback(FF_PKT *ff_pkt, void *hpkt), void static bool accept_file(FF_PKT *ff) { int i, j, k; + int ic; findFILESET *fileset = ff->fileset; findINCEXE *incexe = fileset->incexe; @@ -174,8 +175,9 @@ static bool accept_file(FF_PKT *ff) ff->GZIP_level = fo->GZIP_level; ff->reader = fo->reader; ff->writer = fo->writer; + ic = (ff->flags & FO_IGNORECASE) ? FNM_CASEFOLD : 0; for (k=0; kwild.size(); k++) { - if (fnmatch((char *)fo->wild.get(k), ff->fname, fnmode) == 0) { + if (fnmatch((char *)fo->wild.get(k), ff->fname, fnmode|ic) == 0) { if (ff->flags & FO_EXCLUDE) { Dmsg2(100, "Exclude wild: %s file=%s\n", (char *)fo->wild.get(k), ff->fname); @@ -202,15 +204,18 @@ static bool accept_file(FF_PKT *ff) findINCEXE *incexe = (findINCEXE *)fileset->exclude_list.get(i); for (j=0; jopts_list.size(); j++) { findFOPTS *fo = (findFOPTS *)incexe->opts_list.get(j); + ic = (fo->flags & FO_IGNORECASE) ? FNM_CASEFOLD : 0; for (k=0; kwild.size(); k++) { - if (fnmatch((char *)fo->wild.get(k), ff->fname, fnmode) == 0) { + if (fnmatch((char *)fo->wild.get(k), ff->fname, fnmode|ic) == 0) { Dmsg1(100, "Reject wild1: %s\n", ff->fname); return false; /* reject file */ } } } + ic = (incexe->current_opts != NULL && incexe->current_opts->flags & FO_IGNORE + ? FNM_CASEFOLD : 0; for (j=0; jname_list.size(); j++) { - if (fnmatch((char *)incexe->name_list.get(j), ff->fname, fnmode) == 0) { + if (fnmatch((char *)incexe->name_list.get(j), ff->fname, fnmode|ic) == 0) { Dmsg1(100, "Reject wild2: %s\n", ff->fname); return false; /* reject file */ } diff --git a/bacula/src/findlib/find.h b/bacula/src/findlib/find.h index c4d2efa8cb..4a3cf4fd75 100755 --- a/bacula/src/findlib/find.h +++ b/bacula/src/findlib/find.h @@ -92,6 +92,8 @@ enum { #define FO_EXCLUDE (1<<13) /* Exclude file */ #define FO_ACL (1<<14) /* Backup ACLs */ #define FO_NO_HARDLINK (1<<15) /* don't handle hard links */ +#define FO_IGNORECASE (1<<16) /* Ignore file name case */ + struct s_included_file { struct s_included_file *next; diff --git a/bacula/src/stored/match_bsr.c b/bacula/src/stored/match_bsr.c index 89da956f0b..75faad0cbc 100755 --- a/bacula/src/stored/match_bsr.c +++ b/bacula/src/stored/match_bsr.c @@ -29,7 +29,11 @@ #include "bacula.h" #include "stored.h" +#ifdef HAVE_FNMATCH #include +#else +#include "lib/fnmatch.h" +#endif /* Forward references */ static int match_volume(BSR *bsr, BSR_VOLUME *volume, VOLUME_LABEL *volrec, bool done);