]> git.sur5r.net Git - bacula/bacula/commitdiff
kes Set catalog backup database and user name from values specified on
authorKern Sibbald <kern@sibbald.com>
Sun, 10 Feb 2008 11:08:29 +0000 (11:08 +0000)
committerKern Sibbald <kern@sibbald.com>
Sun, 10 Feb 2008 11:08:29 +0000 (11:08 +0000)
     the ./configure line.

git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/branches/Branch-2.2@6391 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/dird/bacula-dir.conf.in
bacula/src/filed/backup.c
bacula/technotes-2.1

index 45b8fc0e55869d5229649274df7bbd8d58700573..f2e72d6652964f19b93f60dc63f0ee5df97140c1 100644 (file)
@@ -61,7 +61,11 @@ Job {
   FileSet="Catalog"
   Schedule = "WeeklyCycleAfterBackup"
   # This creates an ASCII copy of the catalog
-  RunBeforeJob = "@scriptdir@/make_catalog_backup bacula bacula"
+  # WARNING!!! Passing the password via the command line is insecure.
+  # see comments in make_catalog_backup for details.
+  # Arguments to make_catalog_backup are:
+  #  make_catalog_backup <database-name> <user-name> <password> <host>
+  RunBeforeJob = "@scriptdir@/make_catalog_backup @db_name@ @db_user@"
   # This deletes the copy of the catalog
   RunAfterJob  = "@scriptdir@/delete_catalog_backup"
   Write Bootstrap = "@working_dir@/BackupCatalog.bsr"
index db9193e7161661cc22ff8e24035f96bf2bae9758..d61c89bb02f804fdec67a18b7b147be6ba97868c 100644 (file)
@@ -1146,20 +1146,21 @@ static void strip_path(FF_PKT *ff_pkt)
    /* 
     * Strip path.  If it doesn't succeed put it back.  If
     *  it does, and there is a different link string,
-    *  attempt to strip the link. If it fails, but them
+    *  attempt to strip the link. If it fails, back them
     *  both back.
+    * Don't strip symlinks.
     * I.e. if either stripping fails don't strip anything.
     */
    if (do_strip(ff_pkt->strip_path, ff_pkt->fname)) {
-      if (ff_pkt->fname != ff_pkt->link) {
+      if (ff_pkt->type != FT_LNK && ff_pkt->fname != ff_pkt->link) {
          pm_strcpy(ff_pkt->link_save, ff_pkt->link);
          if (!do_strip(ff_pkt->strip_path, ff_pkt->link)) {
-            strcpy(ff_pkt->link, ff_pkt->link_save);
-            strcpy(ff_pkt->fname, ff_pkt->fname_save);
+            pm_strcpy(ff_pkt->link, ff_pkt->link_save);
+            pm_strcpy(ff_pkt->fname, ff_pkt->fname_save);
          }
       }
    } else {
-      strcpy(ff_pkt->fname, ff_pkt->fname_save);
+      pm_strcpy(ff_pkt->fname, ff_pkt->fname_save);
    } 
    Dmsg2(200, "fname=%s stripped=%s\n", ff_pkt->fname_save, ff_pkt->fname);
 }
@@ -1169,8 +1170,8 @@ static void unstrip_path(FF_PKT *ff_pkt)
    if (!(ff_pkt->flags & FO_STRIPPATH) || ff_pkt->strip_path <= 0) {
       return;
    }
-   strcpy(ff_pkt->fname, ff_pkt->fname_save);
-   if (ff_pkt->fname != ff_pkt->link) {
-      strcpy(ff_pkt->link, ff_pkt->link_save);
+   pm_strcpy(ff_pkt->fname, ff_pkt->fname_save);
+   if (ff_pkt->type != FT_LNK && ff_pkt->fname != ff_pkt->link) {
+      pm_strcpy(ff_pkt->link, ff_pkt->link_save);
    }
 }
index af7833827688d687255bbb1fd510cadc956f12f3..cf8e532080a8583f6a764f7076cc26bf493325d8 100644 (file)
@@ -2,6 +2,8 @@
 
 General:
 10Feb08
+kes  Set catalog backup database and user name from values specified on 
+     the ./configure line.
 ebl  Apply patch to corrent bug #1031, about wrong pool source information
      in job report.