[prev in list] [next in list] [prev in thread] [next in thread] 

List:       bacula-commits
Subject:    [Bacula-commits] git: Bacula branch, Branch-5.0,
From:       "Kern Sibbald" <kerns () users ! sourceforge ! net>
Date:       2011-02-05 11:30:19
Message-ID: E1PlgLO-0000Ob-MI () sfp-scmshell-4 ! v30 ! ch3 ! sourceforge ! com
[Download RAW message or body]

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Bacula".

The branch, Branch-5.0 has been updated
       via  f756fa544f54ff65bda69657a1a61daa44206347 (commit)
       via  2a60b678a25a596018c7fba7250de408ae5dead4 (commit)
       via  1a34f8346c9f3dbb1e02c70994b6bffa96ce3774 (commit)
      from  5bad1eeb132895297e02096e33ddb0d3e6b6899f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit f756fa544f54ff65bda69657a1a61daa44206347
Author: Eric Bollengier <eric@eb.homelinux.org>
Date:   Sat Feb 5 12:01:07 2011 +0100

    Tweak select_media_dbr()

commit 2a60b678a25a596018c7fba7250de408ae5dead4
Author: Eric Bollengier <eric@eb.homelinux.org>
Date:   Sat Feb 5 10:55:45 2011 +0100

    Check if volume name is valid in select_media_dbr()

commit 1a34f8346c9f3dbb1e02c70994b6bffa96ce3774
Author: Eric Bollengier <eric@eb.homelinux.org>
Date:   Thu Feb 3 10:05:59 2011 +0100

    Fix #1674 about rpmbuild failed for bacula-mtx.spec

-----------------------------------------------------------------------

Summary of changes:
diff --git a/bacula/platforms/rpm/bacula-mtx.spec b/bacula/platforms/rpm/bacula-mtx.spec
index 64ab00d..12238ee 100644
--- a/bacula/platforms/rpm/bacula-mtx.spec
+++ b/bacula/platforms/rpm/bacula-mtx.spec
@@ -7,7 +7,7 @@
 # basic defines for every build
 %define _release           1
 %define _version           5.0.3
-%define depkgs_version     18Feb09
+%define depkgs_version     15May10
 %define _packager D. Scott Barninger <barninger@fairfieldcomputers.com>
 
 %define manpage_ext gz
diff --git a/bacula/src/dird/ua_select.c b/bacula/src/dird/ua_select.c
index 1ff4f27..f4a5115 100644
--- a/bacula/src/dird/ua_select.c
+++ b/bacula/src/dird/ua_select.c
@@ -580,37 +580,53 @@ int select_pool_and_media_dbr(UAContext *ua, POOL_DBR *pr, MEDIA_DBR *mr)
 int select_media_dbr(UAContext *ua, MEDIA_DBR *mr)
 {
    int i;
+   int ret = 0;
+   POOLMEM *err = get_pool_memory(PM_FNAME);
+   *err=0;
 
    memset(mr, 0, sizeof(MEDIA_DBR));
 
    i = find_arg_with_value(ua, "volume");
    if (i >= 0) {
-      bstrncpy(mr->VolumeName, ua->argv[i], sizeof(mr->VolumeName));
+      if (is_name_valid(ua->argv[i], &err)) {
+         bstrncpy(mr->VolumeName, ua->argv[i], sizeof(mr->VolumeName));
+      } else {
+         goto bail_out;
+      }
    }
    if (mr->VolumeName[0] == 0) {
       POOL_DBR pr;
       memset(&pr, 0, sizeof(pr));
       /* Get the pool from pool=<pool-name> */
       if (!get_pool_dbr(ua, &pr)) {
-         return 0;
+         goto bail_out;
       }
       mr->PoolId = pr.PoolId;
       db_list_media_records(ua->jcr, ua->db, mr, prtit, ua, HORZ_LIST);
       if (!get_cmd(ua, _("Enter *MediaId or Volume name: "))) {
-         return 0;
+         goto bail_out;
       }
       if (ua->cmd[0] == '*' && is_a_number(ua->cmd+1)) {
          mr->MediaId = str_to_int64(ua->cmd+1);
-      } else {
+      } else if (is_name_valid(ua->cmd, &err)) {
          bstrncpy(mr->VolumeName, ua->cmd, sizeof(mr->VolumeName));
+      } else {
+         goto bail_out;
       }
    }
 
    if (!db_get_media_record(ua->jcr, ua->db, mr)) {
-      ua->error_msg("%s", db_strerror(ua->db));
-      return 0;
+      pm_strcpy(err, db_strerror(ua->db));
+      goto bail_out;
    }
-   return 1;
+   ret = 1;
+
+bail_out:
+   if (!ret && *err) {
+      ua->error_msg("%s", err);
+   }
+   free_pool_memory(err);
+   return ret;
 }
 
 


hooks/post-receive
-- 
Bacula

------------------------------------------------------------------------------
The modern datacenter depends on network connectivity to access resources
and provide services. The best practices for maximizing a physical server's
connectivity to a physical network are well understood - see how these
rules translate into the virtual world? 
http://p.sf.net/sfu/oracle-sfdevnlfb
_______________________________________________
Bacula-commits mailing list
Bacula-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-commits
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic