Last minute critical patches

This commit is contained in:
Simone Caronni 2012-09-13 09:58:24 +02:00
parent c8ac0a0ab5
commit 40e02d4ff4
3 changed files with 71 additions and 1 deletions

View File

@ -0,0 +1,33 @@
From de1d36e02d149dc1ae76504d4db1a640fd39d0dc Mon Sep 17 00:00:00 2001
From: Marco van Wieringen <mvw@planets.elm.net>
Date: Thu, 13 Sep 2012 07:43:32 +0200
Subject: [PATCH] Fix bug #1932 director crash.
---
bacula/src/lib/bsys.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/bacula/src/lib/bsys.c b/bacula/src/lib/bsys.c
index 003585a..f9bd1d2 100644
--- a/bacula/src/lib/bsys.c
+++ b/bacula/src/lib/bsys.c
@@ -53,7 +53,7 @@ static pthread_cond_t timer = PTHREAD_COND_INITIALIZER;
int safer_unlink(const char *pathname, const char *regx)
{
int rc;
- regex_t preg1, pexc1;
+ regex_t preg1;
char prbuf[500];
const int nmatch = 30;
regmatch_t pmatch[nmatch];
@@ -83,7 +83,6 @@ int safer_unlink(const char *pathname, const char *regx)
rtn = EROFS;
}
regfree(&preg1);
- regfree(&pexc1);
return rtn;
}
--
1.7.7

View File

@ -0,0 +1,30 @@
From 78e58ff112266e983d099be37a6ec73dfd4e5a21 Mon Sep 17 00:00:00 2001
From: Eric Bollengier <eric@baculasystems.com>
Date: Thu, 13 Sep 2012 06:49:44 +0000
Subject: Fix accurate option in the estimate command
---
diff --git a/bacula/src/dird/ua_cmds.c b/bacula/src/dird/ua_cmds.c
index 603990e..d42bc7f 100644
--- a/bacula/src/dird/ua_cmds.c
+++ b/bacula/src/dird/ua_cmds.c
@@ -1144,9 +1144,14 @@ static int estimate_cmd(UAContext *ua, const char *cmd)
}
}
if (strcasecmp(ua->argk[i], NT_("accurate")) == 0) {
- if (!is_yesno(ua->argv[i], &accurate)) {
- ua->error_msg(_("Invalid value for accurate. "
- "It must be yes or no.\n"));
+ if (ua->argv[i]) {
+ if (!is_yesno(ua->argv[i], &accurate)) {
+ ua->error_msg(_("Invalid value for accurate. "
+ "It must be yes or no.\n"));
+ }
+ continue;
+ } else {
+ ua->error_msg(_("Accurate value missing.\n"));
}
}
}
--
cgit v0.8.3.4

View File

@ -3,7 +3,7 @@
Name: bacula
Version: 5.2.11
Release: 2%{?dist}
Release: 3%{?dist}
Summary: Cross platform network backup for Linux, Unix, Mac and Windows
# See LICENSE for details
License: AGPLv3 with exceptions
@ -32,6 +32,8 @@ Patch1: bacula-5.0.2-openssl.patch
Patch2: bacula-5.2.2-queryfile.patch
Patch3: bacula-5.0.3-sqlite-priv.patch
Patch4: bacula-5.2.11-bat-build.patch
Patch5: bacula-5.2.11-fix-dir-crash.patch
Patch6: bacula-5.2.11-fix-estimate.patch
BuildRequires: desktop-file-utils
BuildRequires: perl
@ -288,6 +290,8 @@ Provides check_bacula support for Nagios.
%patch2 -p1 -b .queryfile
%patch3 -p0 -b .priv
%patch4 -p1 -b .bat-build
%patch5 -p2 -b .fix-dir-crash
%patch6 -p2 -b .fix-estimate
# Remove execution permissions from files we're packaging as docs later on
find updatedb -type f | xargs chmod -x
@ -878,6 +882,9 @@ fi
%changelog
* Thu Sep 13 2012 Simone Caronni <negativo17@gmail.com> - 5.2.11-3
- Introduce last minute critical patches.
* Thu Sep 13 2012 Simone Caronni <negativo17@gmail.com> - 5.2.11-2
- Do not remove user on common subpackage uninstall.