|
From: <gi...@ba...> - 2012-10-20 15:51:50
|
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 Community source".
The branch, Branch-5.2 has been updated
via 8e292f03a65c496ef17ec23b91f42c0e1ac5bea6 (commit)
via 1e45b6faa5eaa022fad02e108f256f31332aa728 (commit)
via 40460e5b4668bca9523ebdf68f1acaf7b3e733d5 (commit)
via df305041f6e91db07ce24e1a03652a30d5322855 (commit)
via 0142a3b9e5f4ed7260804319fa1cd922b151b1ce (commit)
via 2d07be2758fa0403e53a7ba2f31e8310a0265686 (commit)
via cfbd7d7a6e5310cc102a71098c42f9c19ef6b5a4 (commit)
via afce04ab2708204c6266fd7c6935114cbb52a93d (commit)
via 5ef7dc3f1902e20a141cbd1c68d87cd3294dd788 (commit)
via 81a08ee4c77a814c4187778da2586deb573a2777 (commit)
via 5fc467337527519e7041d603a5c80718826d005e (commit)
from 8da9b14bbf06de05b8c4b93247c373c1a80cf04f (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 8e292f03a65c496ef17ec23b91f42c0e1ac5bea6
Author: Eric Bollengier <er...@ba...>
Date: Tue Oct 16 09:00:20 2012 +0200
Fix messages segfault
commit 1e45b6faa5eaa022fad02e108f256f31332aa728
Author: Eric Bollengier <er...@ba...>
Date: Tue Sep 25 12:16:17 2012 +0200
Fix #4996 about MaxRunTime canceling the job too early
commit 40460e5b4668bca9523ebdf68f1acaf7b3e733d5
Author: Kern Sibbald <ke...@si...>
Date: Tue Sep 18 12:24:14 2012 +0200
Fix race condition in close_msg that causes seg fault
commit df305041f6e91db07ce24e1a03652a30d5322855
Author: Eric Bollengier <er...@ba...>
Date: Sat Sep 22 09:54:55 2012 +0200
bweb: Set POST_MAX and DISABLE_UPLOADS as advised in CGI module documentation
commit 0142a3b9e5f4ed7260804319fa1cd922b151b1ce
Author: Eric Bollengier <er...@ba...>
Date: Mon Sep 3 11:36:49 2012 +0200
Add ujobid to .bvfs_get_jobids
commit 2d07be2758fa0403e53a7ba2f31e8310a0265686
Author: Eric Bollengier <er...@ba...>
Date: Tue Aug 28 14:15:02 2012 +0200
Do not try to strip RestoreObject during attribute encoding
commit cfbd7d7a6e5310cc102a71098c42f9c19ef6b5a4
Author: Eric Bollengier <er...@ba...>
Date: Tue Aug 28 11:39:12 2012 +0200
Avoid problem when stripping a relative path
commit afce04ab2708204c6266fd7c6935114cbb52a93d
Author: Eric Bollengier <er...@ba...>
Date: Fri Aug 24 14:46:53 2012 +0200
bweb: Display plugin command in the fileset_view page
commit 5ef7dc3f1902e20a141cbd1c68d87cd3294dd788
Author: Eric Bollengier <er...@ba...>
Date: Mon Jul 16 21:51:23 2012 +0200
Fix #4513 about HIDDEN attribute set to parent directory during restore
commit 81a08ee4c77a814c4187778da2586deb573a2777
Author: Marco van Wieringen <mv...@pl...>
Date: Thu Oct 11 13:42:26 2012 +0200
Tweak add some more missing xattr streams for bscan.
commit 5fc467337527519e7041d603a5c80718826d005e
Author: Marco van Wieringen <mv...@pl...>
Date: Thu Oct 11 13:16:39 2012 +0200
Tweak also allow restore of Hurd acl and xattr streams.
-----------------------------------------------------------------------
Summary of changes:
diff --git a/bacula/src/dird/backup.c b/bacula/src/dird/backup.c
index 77a3845..65d5803 100644
--- a/bacula/src/dird/backup.c
+++ b/bacula/src/dird/backup.c
@@ -418,6 +418,10 @@ bool do_backup(JCR *jcr)
goto bail_out;
}
+ /* Declare the job started to start the MaxRunTime check */
+ jcr->setJobStarted();
+
+ /* Send and run the RunBefore */
if (!send_runscripts_commands(jcr)) {
goto bail_out;
}
diff --git a/bacula/src/dird/job.c b/bacula/src/dird/job.c
index dae019b..9865e37 100644
--- a/bacula/src/dird/job.c
+++ b/bacula/src/dird/job.c
@@ -611,7 +611,7 @@ static bool job_check_maxruntime(JCR *jcr)
JOB *job = jcr->job;
utime_t run_time;
- if (job_canceled(jcr) || jcr->JobStatus == JS_Created) {
+ if (job_canceled(jcr) || !jcr->job_started) {
return false;
}
if (jcr->job->MaxRunTime == 0 && job->FullMaxRunTime == 0 &&
diff --git a/bacula/src/dird/migrate.c b/bacula/src/dird/migrate.c
index 5193921..c4738ea 100644
--- a/bacula/src/dird/migrate.c
+++ b/bacula/src/dird/migrate.c
@@ -365,6 +365,8 @@ bool do_migration(JCR *jcr)
}
Dmsg0(150, "Storage daemon connection OK\n");
+ /* Declare the job started to start the MaxRunTime check */
+ jcr->setJobStarted();
/*
* We re-update the job start record so that the start
diff --git a/bacula/src/dird/restore.c b/bacula/src/dird/restore.c
index 0a8945a..eee86be 100644
--- a/bacula/src/dird/restore.c
+++ b/bacula/src/dird/restore.c
@@ -432,6 +432,9 @@ bool restore_bootstrap(JCR *jcr)
goto bail_out;
}
+ /* Declare the job started to start the MaxRunTime check */
+ jcr->setJobStarted();
+
/* Only pass "global" commands to the FD once */
if (first_time) {
first_time = false;
diff --git a/bacula/src/dird/ua_dotcmds.c b/bacula/src/dird/ua_dotcmds.c
index c90052b..d78fa3f 100644
--- a/bacula/src/dird/ua_dotcmds.c
+++ b/bacula/src/dird/ua_dotcmds.c
@@ -523,6 +523,8 @@ static bool dot_bvfs_versions(UAContext *ua, const char *cmd)
* -> returns needed jobids to restore
* .bvfs_get_jobids jobid=1 all
* -> returns needed jobids to restore with all filesets a JobId=1 time
+ * .bvfs_get_jobids ujobid=JobName
+ * -> returns needed jobids to restore
*/
static bool dot_bvfs_get_jobids(UAContext *ua, const char *cmd)
{
@@ -538,6 +540,11 @@ static bool dot_bvfs_get_jobids(UAContext *ua, const char *cmd)
}
memset(&jr, 0, sizeof(JOB_DBR));
+
+ if ((pos = find_arg_with_value(ua, "ujobid")) >= 0) {
+ bstrncpy(jr.Job, ua->argv[pos], sizeof(jr.Job));
+ }
+
if ((pos = find_arg_with_value(ua, "jobid")) >= 0) {
jr.JobId = str_to_int64(ua->argv[pos]);
}
diff --git a/bacula/src/dird/vbackup.c b/bacula/src/dird/vbackup.c
index f24f9d6..2babd36 100644
--- a/bacula/src/dird/vbackup.c
+++ b/bacula/src/dird/vbackup.c
@@ -232,6 +232,9 @@ _("This Job is not an Accurate backup so is not equivalent to a Full backup.\n")
return false;
}
+ /* Declare the job started to start the MaxRunTime check */
+ jcr->setJobStarted();
+
/*
* Start the job prior to starting the message thread below
* to avoid two threads from using the BSOCK structure at
diff --git a/bacula/src/filed/backup.c b/bacula/src/filed/backup.c
index 44d7e29..da9330f 100644
--- a/bacula/src/filed/backup.c
+++ b/bacula/src/filed/backup.c
@@ -1352,7 +1352,7 @@ bool encode_and_send_attributes(JCR *jcr, FF_PKT *ff_pkt, int &data_stream)
* For a directory, link is the same as fname, but with trailing
* slash. For a linked file, link is the link.
*/
- if (ff_pkt->type != FT_DELETED) { /* already stripped */
+ if (!IS_FT_OBJECT(ff_pkt->type) && ff_pkt->type != FT_DELETED) { /* already stripped */
strip_path(ff_pkt);
}
switch (ff_pkt->type) {
@@ -1414,7 +1414,8 @@ bool encode_and_send_attributes(JCR *jcr, FF_PKT *ff_pkt, int &data_stream)
attribsEx, 0, ff_pkt->delta_seq, 0);
break;
}
- if (ff_pkt->type != FT_DELETED) {
+
+ if (!IS_FT_OBJECT(ff_pkt->type) && ff_pkt->type != FT_DELETED) {
unstrip_path(ff_pkt);
}
@@ -1440,8 +1441,10 @@ static bool do_strip(int count, char *in)
while (*in && !IsPathSeparator(*in)) {
out++; in++;
}
- out++; in++;
- numsep++; /* one separator seen */
+ if (*in) { /* Not at the end of the string */
+ out++; in++;
+ numsep++; /* one separator seen */
+ }
for (stripped=0; stripped<count && *in; stripped++) {
while (*in && !IsPathSeparator(*in)) {
in++; /* skip chars */
diff --git a/bacula/src/filed/restore.c b/bacula/src/filed/restore.c
index fc22b37..96edcc8 100644
--- a/bacula/src/filed/restore.c
+++ b/bacula/src/filed/restore.c
@@ -302,11 +302,14 @@ static inline bool pop_delayed_data_streams(JCR *jcr, r_ctx &rctx)
case STREAM_ACL_AIX_AIXC:
case STREAM_ACL_AIX_NFS4:
case STREAM_ACL_FREEBSD_NFS4_ACL:
+ case STREAM_ACL_HURD_DEFAULT_ACL:
+ case STREAM_ACL_HURD_ACCESS_ACL:
if (!do_restore_acl(jcr, rds->stream, rds->content, rds->content_length)) {
goto bail_out;
}
free(rds->content);
break;
+ case STREAM_XATTR_HURD:
case STREAM_XATTR_IRIX:
case STREAM_XATTR_TRU64:
case STREAM_XATTR_AIX:
@@ -892,6 +895,8 @@ void do_restore(JCR *jcr)
case STREAM_ACL_AIX_AIXC:
case STREAM_ACL_AIX_NFS4:
case STREAM_ACL_FREEBSD_NFS4_ACL:
+ case STREAM_ACL_HURD_DEFAULT_ACL:
+ case STREAM_ACL_HURD_ACCESS_ACL:
/*
* Do not restore ACLs when
* a) The current file is not extracted
@@ -920,6 +925,7 @@ void do_restore(JCR *jcr)
}
break;
+ case STREAM_XATTR_HURD:
case STREAM_XATTR_IRIX:
case STREAM_XATTR_TRU64:
case STREAM_XATTR_AIX:
diff --git a/bacula/src/findlib/bfile.c b/bacula/src/findlib/bfile.c
index 0d4c106..e315675 100644
--- a/bacula/src/findlib/bfile.c
+++ b/bacula/src/findlib/bfile.c
@@ -187,6 +187,12 @@ const char *stream_to_ascii(int stream)
return _("AIX Specific NFSv4 ACL attribs");
case STREAM_ACL_FREEBSD_NFS4_ACL:
return _("FreeBSD Specific NFSv4/ZFS ACL attribs");
+ case STREAM_ACL_HURD_DEFAULT_ACL:
+ return _("GNU Hurd Specific Default ACL attribs");
+ case STREAM_ACL_HURD_ACCESS_ACL:
+ return _("GNU Hurd Specific Access ACL attribs");
+ case STREAM_XATTR_HURD:
+ return _("GNU Hurd Specific Extended attribs");
case STREAM_XATTR_IRIX:
return _("IRIX Specific Extended attribs");
case STREAM_XATTR_TRU64:
diff --git a/bacula/src/findlib/mkpath.c b/bacula/src/findlib/mkpath.c
index 884ba10..985fdd8 100644
--- a/bacula/src/findlib/mkpath.c
+++ b/bacula/src/findlib/mkpath.c
@@ -285,6 +285,10 @@ bool makepath(ATTR *attr, const char *apath, mode_t mode, mode_t parent_mode,
/* Now set the proper owner and modes */
#if defined(HAVE_WIN32)
+
+ /* Don't propagate the hidden attribute to parent directories */
+ parent_mode &= ~S_ISVTX;
+
if (path[1] == ':') {
p = &path[3];
} else {
diff --git a/bacula/src/jcr.h b/bacula/src/jcr.h
index a017d1b..0ff93ab 100644
--- a/bacula/src/jcr.h
+++ b/bacula/src/jcr.h
@@ -118,6 +118,7 @@ enum {
)
#define job_waiting(jcr) \
+ (jcr->job_started && \
(jcr->JobStatus == JS_WaitFD || \
jcr->JobStatus == JS_WaitSD || \
jcr->JobStatus == JS_WaitMedia || \
@@ -130,7 +131,7 @@ enum {
jcr->SDJobStatus == JS_WaitMedia || \
jcr->SDJobStatus == JS_WaitMount || \
jcr->SDJobStatus == JS_WaitDevice || \
- jcr->SDJobStatus == JS_WaitMaxJobs)
+ jcr->SDJobStatus == JS_WaitMaxJobs))
@@ -199,6 +200,7 @@ public:
void setJobLevel(int32_t JobLevel) { m_JobLevel = JobLevel; };
void setJobType(int32_t JobType) { m_JobType = JobType; };
void forceJobStatus(int32_t aJobStatus) { JobStatus = aJobStatus; };
+ void setJobStarted();
int32_t getJobType() const { return m_JobType; };
int32_t getJobLevel() const { return m_JobLevel; };
int32_t getJobStatus() const { return JobStatus; };
@@ -253,6 +255,7 @@ public:
time_t end_time; /* job end time */
time_t wait_time_sum; /* cumulative wait time since job start */
time_t wait_time; /* timestamp when job have started to wait */
+ time_t job_started_time; /* Time when the MaxRunTime start to count */
POOLMEM *client_name; /* client name */
POOLMEM *JobIds; /* User entered string of JobIds */
POOLMEM *RestoreBootstrap; /* Bootstrap file to restore */
@@ -276,6 +279,7 @@ public:
bool accurate; /* true if job is accurate */
bool HasBase; /* True if job use base jobs */
bool rerunning; /* rerunning an incomplete job */
+ bool job_started; /* Set when the job is actually started */
void *Python_job; /* Python Job Object */
void *Python_events; /* Python Events Object */
diff --git a/bacula/src/lib/jcr.c b/bacula/src/lib/jcr.c
index d895ba1..53679c4 100644
--- a/bacula/src/lib/jcr.c
+++ b/bacula/src/lib/jcr.c
@@ -892,6 +892,12 @@ bool JCR::sendJobStatus(int newJobStatus)
return true;
}
+void JCR::setJobStarted()
+{
+ JCR *jcr = this;
+ jcr->job_started = true;
+ jcr->job_started_time = time(NULL);
+}
void JCR::setJobStatus(int newJobStatus)
{
diff --git a/bacula/src/lib/message.c b/bacula/src/lib/message.c
index fc7f22a..e2fd3e4 100644
--- a/bacula/src/lib/message.c
+++ b/bacula/src/lib/message.c
@@ -130,7 +130,7 @@ void MSGS::unlock()
void MSGS::wait_not_in_use() /* leaves fides_mutex set */
{
lock();
- while (m_in_use) {
+ while (m_in_use || m_closing) {
unlock();
bmicrosleep(0, 200); /* wait */
lock();
@@ -517,6 +517,11 @@ void close_msg(JCR *jcr)
return;
}
msgs->wait_not_in_use(); /* leaves fides_mutex set */
+ /* Note get_closing() does not lock because we are already locked */
+ if (msgs->get_closing()) {
+ msgs->unlock();
+ return;
+ }
msgs->set_closing();
msgs->unlock();
diff --git a/bacula/src/lib/parse_conf.h b/bacula/src/lib/parse_conf.h
index f075df7..0a83353 100644
--- a/bacula/src/lib/parse_conf.h
+++ b/bacula/src/lib/parse_conf.h
@@ -145,6 +145,7 @@ public:
void clear_in_use() { lock(); m_in_use=false; unlock(); }
void set_in_use() { wait_not_in_use(); m_in_use=true; unlock(); }
void set_closing() { m_closing=true; }
+ bool get_closing() { return m_closing; }
void clear_closing() { lock(); m_closing=false; unlock(); }
bool is_closing() { lock(); bool rtn=m_closing; unlock(); return rtn; }
diff --git a/bacula/src/stored/bscan.c b/bacula/src/stored/bscan.c
index 93b118d..e0f635f 100644
--- a/bacula/src/stored/bscan.c
+++ b/bacula/src/stored/bscan.c
@@ -839,9 +839,13 @@ static bool record_cb(DCR *dcr, DEV_RECORD *rec)
case STREAM_ACL_AIX_AIXC:
case STREAM_ACL_AIX_NFS4:
case STREAM_ACL_FREEBSD_NFS4_ACL:
+ case STREAM_ACL_HURD_DEFAULT_ACL:
+ case STREAM_ACL_HURD_ACCESS_ACL:
/* Ignore Unix ACL attributes */
break;
+ case STREAM_XATTR_HURD:
+ case STREAM_XATTR_IRIX:
case STREAM_XATTR_TRU64:
case STREAM_XATTR_AIX:
case STREAM_XATTR_OPENBSD:
diff --git a/gui/bweb/lib/Bconsole.pm b/gui/bweb/lib/Bconsole.pm
index 6a3c431..dd1b580 100644
--- a/gui/bweb/lib/Bconsole.pm
+++ b/gui/bweb/lib/Bconsole.pm
@@ -376,7 +376,11 @@ sub get_fileset
foreach my $l (split(/\r?\n/, $out)) {
# I /usr/local
- if ($l =~ /^\s+([I|E])\s+(.+)$/) { # include
+ if ($l =~ /^\s+([O|I|E|P])\s+(.+)$/) { # include
+ # if a plugin, add it to the include list
+ if ($1 eq 'P') {
+ push @{$ret->{'I'}}, { file => $2 };
+ }
push @{$ret->{$1}}, { file => $2 };
}
}
diff --git a/gui/bweb/lib/Bweb.pm b/gui/bweb/lib/Bweb.pm
index cffcf81..b1b0990 100644
--- a/gui/bweb/lib/Bweb.pm
+++ b/gui/bweb/lib/Bweb.pm
@@ -231,6 +231,8 @@ use base q/Bweb::Gui/;
=cut
use CGI;
+$CGI::POST_MAX=102400; # Limit post to 100kB
+$CGI::DISABLE_UPLOADS=0; # Allow file uploads
=head1 PACKAGE VARIABLE
hooks/post-receive
--
Bacula Community source
|