]> git.sur5r.net Git - bacula/bacula/commitdiff
First cut conversion using html2latex; add .tex files
authorKern Sibbald <kern@sibbald.com>
Sat, 4 Dec 2004 18:05:30 +0000 (18:05 +0000)
committerKern Sibbald <kern@sibbald.com>
Sat, 4 Dec 2004 18:05:30 +0000 (18:05 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1742 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/kernstodo
bacula/src/dird/dird_conf.h
bacula/src/dird/inc_conf.c
bacula/src/dird/ua_tree.c
bacula/src/filed/job.c
bacula/src/findlib/find.c
bacula/src/findlib/find.h
bacula/src/stored/match_bsr.c

index 29e7a2db570234eee1e16c53a1206e9233d2eb2d..43d822dae0ab5bc64469270f725c75c2ecc9eb8c 100644 (file)
@@ -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
index f3467da7e40cb67d5b6bf9ca9e5f1b7070d734df..c33913d24d138cedfd9457969b8579ce26a81e1f 100644 (file)
@@ -244,7 +244,7 @@ struct JOB {
 };
 
 #undef  MAX_FOPTS
-#define MAX_FOPTS 30
+#define MAX_FOPTS 32
 
 /* File options structure */
 struct FOPTS {
index 16cb3b50b2bb8f1a91230e9fab510ea8c20de6fc..23c514e32c4b78e92c75978899486e7faf805643 100644 (file)
@@ -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}
 };
 
index 517ccf767de24f101c88a127e9cabedd09211dc9..024938b2a9e57f452ed31aade7b9065cdb3f729d 100644 (file)
 
 #include "bacula.h"
 #include "dird.h"
+#ifdef HAVE_FNMATCH
 #include <fnmatch.h>
+#else
+#include "lib/fnmatch.h"
+#endif
 #include "findlib/find.h"
 
 
index 2ecc32735cf61505b4c958a4ac00f5abd44a622e..623f665bf5527a5e5e3d323141a755eaa142087c 100644 (file)
@@ -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;
index cd120f49fd2af89b8da5047eacd2d69656e7d8c7..4beaad3b9024b871765b433bdd250d06a18d2ee2 100644 (file)
@@ -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; k<fo->wild.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; j<incexe->opts_list.size(); j++) {
         findFOPTS *fo = (findFOPTS *)incexe->opts_list.get(j);
+        ic = (fo->flags & FO_IGNORECASE) ? FNM_CASEFOLD : 0;
         for (k=0; k<fo->wild.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; j<incexe->name_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 */
         }
index c4d2efa8cb8cba158b67cb5ceae4806a9cebb4d7..4a3cf4fd754d63bbf619cc6366f997a4510eebad 100755 (executable)
@@ -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;
index 89da956f0b7d76444c2561b380d3c7292b2cfb93..75faad0cbcc7a4affe5b4a5e1633b5ab6c2fdd60 100755 (executable)
 
 #include "bacula.h"
 #include "stored.h"
+#ifdef HAVE_FNMATCH
 #include <fnmatch.h>
+#else
+#include "lib/fnmatch.h"
+#endif
 
 /* Forward references */
 static int match_volume(BSR *bsr, BSR_VOLUME *volume, VOLUME_LABEL *volrec, bool done);