Priority:
-- Look at using posix_fadvise(2) for backups -- see bug #751.
- Possibly add the code at findlib/bfile.c:795
-
-/* TCP socket options */
-#define TCP_NODELAY 1 /* Turn off Nagle's algorithm. */
-#define TCP_MAXSEG 2 /* Limit MSS */
-#define TCP_CORK 3 /* Never send partially complete segments */
-#define TCP_KEEPIDLE 4 /* Start keeplives after this period */
-#define TCP_KEEPINTVL 5 /* Interval between keepalives */
-#define TCP_KEEPCNT 6 /* Number of keepalives before death */
-#define TCP_SYNCNT 7 /* Number of SYN retransmits */
-#define TCP_LINGER2 8 /* Life time of orphaned FIN-WAIT-2 state */
-#define TCP_DEFER_ACCEPT 9 /* Wake up listener only when data arrive */
-#define TCP_WINDOW_CLAMP 10 /* Bound advertised window */
-#define TCP_INFO 11 /* Information about this connection. */
-#define TCP_QUICKACK 12 /* Block/reenable quick acks */
-#define TCP_CONGESTION 13 /* Congestion control algorithm */
-
-- Fix bnet_connect() code to set a timer and to use time to
- measure the time.
+- Implement 4th argument to make_catalog_backup that passes hostname.
- the director seg faulted when I omitted the pool directive from a
job resource. I was experimenting and thought it redundant that I had
=== Done
- Why the heck doesn't bacula drop root priviledges before connecting to
the DB?
+- Look at using posix_fadvise(2) for backups -- see bug #751.
+ Possibly add the code at findlib/bfile.c:795
+/* TCP socket options */
+#define TCP_NODELAY 1 /* Turn off Nagle's algorithm. */
+#define TCP_MAXSEG 2 /* Limit MSS */
+#define TCP_CORK 3 /* Never send partially complete segments */
+#define TCP_KEEPIDLE 4 /* Start keeplives after this period */
+#define TCP_KEEPINTVL 5 /* Interval between keepalives */
+#define TCP_KEEPCNT 6 /* Number of keepalives before death */
+#define TCP_SYNCNT 7 /* Number of SYN retransmits */
+#define TCP_LINGER2 8 /* Life time of orphaned FIN-WAIT-2 state */
+#define TCP_DEFER_ACCEPT 9 /* Wake up listener only when data arrive */
+#define TCP_WINDOW_CLAMP 10 /* Bound advertised window */
+#define TCP_INFO 11 /* Information about this connection. */
+#define TCP_QUICKACK 12 /* Block/reenable quick acks */
+#define TCP_CONGESTION 13 /* Congestion control algorithm */
+- Fix bnet_connect() code to set a timer and to use time to
+ measure the time.
.B bacula\-sd
\- Bacula's Storage Daemon
.SH SYNOPSIS
-.B bacula\-fd
+.B bacula\-sd
.RI [ options ]
.br
.SH DESCRIPTION
* Now determine if we are extracting or not.
*/
jcr->num_files_examined++;
- Dmsg1(30, "Outfile=%s\n", attr->ofname);
extract = false;
stat = create_file(jcr, attr, &bfd, jcr->replace);
+ Dmsg2(30, "Outfile=%s create_file stat=%d\n", attr->ofname, stat);
switch (stat) {
case CF_ERROR:
case CF_SKIP:
jcr->unlock();
fileAddr = 0;
print_ls_output(jcr, attr);
+
#ifdef HAVE_DARWIN_OS
/* Only restore the resource fork for regular files */
from_base64(&rsrc_len, attr->attrEx);
bail_out:
set_jcr_job_status(jcr, JS_ErrorTerminated);
-ok_out:
+ok_out:
/* Free Signature & Crypto Data */
if (sig) {
crypto_sign_free(sig);
// eliminate invalid windows filename characters from foreign filenames
char *ch = (char *)attr->ofname;
if (ch[0] != 0 && ch[1] != 0) {
- ch+=2;
+ ch += 2;
while (*ch) {
switch (*ch) {
case ':':
*/
if (exists && attr->type != FT_RAW && attr->type != FT_FIFO) {
/* Get rid of old copy */
+ Dmsg1(400, "unlink %s\n", attr->ofname);
if (unlink(attr->ofname) == -1) {
berrno be;
Qmsg(jcr, M_ERROR, 0, _("File %s already exists and could not be replaced. ERR=%s.\n"),
attr->ofname[pnl] = 0; /* terminate path */
if (!path_already_seen(jcr, attr->ofname, pnl)) {
- Dmsg1(100, "Make path %s\n", attr->ofname);
+ Dmsg1(400, "Make path %s\n", attr->ofname);
/*
* If we need to make the directory, ensure that it is with
* execute bit set (i.e. parent_mode), and preserve what already
case FT_FIFO: /* Bacula fifo to save data */
case FT_SPEC:
if (S_ISFIFO(attr->statp.st_mode)) {
- Dmsg1(200, "Restore fifo: %s\n", attr->ofname);
+ Dmsg1(400, "Restore fifo: %s\n", attr->ofname);
if (mkfifo(attr->ofname, attr->statp.st_mode) != 0 && errno != EEXIST) {
berrno be;
Qmsg2(jcr, M_ERROR, 0, _("Cannot make fifo %s: ERR=%s\n"),
} else if (S_ISSOCK(attr->statp.st_mode)) {
Dmsg1(200, "Skipping restore of socket: %s\n", attr->ofname);
} else {
- Dmsg1(200, "Restore node: %s\n", attr->ofname);
+ Dmsg1(400, "Restore node: %s\n", attr->ofname);
if (mknod(attr->ofname, attr->statp.st_mode, attr->statp.st_rdev) != 0 && errno != EEXIST) {
berrno be;
Qmsg2(jcr, M_ERROR, 0, _("Cannot make node %s: ERR=%s\n"),
return CF_ERROR;
}
}
+ /*
+ * Here we are going to attempt to restore to a FIFO, which
+ * means that the FIFO must already exist, AND there must
+ * be some process already attempting to read from the
+ * FIFO, so we open it write-only.
+ */
if (attr->type == FT_RAW || attr->type == FT_FIFO) {
btimer_t *tid;
- Dmsg1(200, "FT_RAW|FT_FIFO %s\n", attr->ofname);
+ Dmsg1(400, "FT_RAW|FT_FIFO %s\n", attr->ofname);
mode = O_WRONLY | O_BINARY;
/* Timeout open() in 60 seconds */
if (attr->type == FT_FIFO) {
- Dmsg0(200, "Set FIFO timer\n");
+ Dmsg0(400, "Set FIFO timer\n");
tid = start_thread_timer(pthread_self(), 60);
} else {
tid = NULL;
if (is_bopen(bfd)) {
Qmsg1(jcr, M_ERROR, 0, _("bpkt already open fid=%d\n"), bfd->fid);
}
- Dmsg2(200, "open %s mode=0x%x\n", attr->ofname, mode);
+ Dmsg2(400, "open %s mode=0x%x\n", attr->ofname, mode);
if ((bopen(bfd, attr->ofname, mode, 0)) < 0) {
berrno be;
be.set_errno(bfd->berrno);
Qmsg2(jcr, M_ERROR, 0, _("Could not open %s: ERR=%s\n"),
attr->ofname, be.strerror());
+ Dmsg2(400, "Could not open %s: ERR=%s\n", attr->ofname, be.strerror());
stop_thread_timer(tid);
return CF_ERROR;
}
stop_thread_timer(tid);
return CF_EXTRACT;
}
- Dmsg1(200, "FT_SPEC %s\n", attr->ofname);
+ Dmsg1(400, "FT_SPEC %s\n", attr->ofname);
return CF_CREATED;
case FT_LNK:
int pm_strcat(POOLMEM **pm, const char *str)
{
int pmlen = strlen(*pm);
- int len = strlen(str) + 1;
+ int len;
+ if (!str) str = "";
+
+ len = strlen(str) + 1;
*pm = check_pool_memory_size(*pm, pmlen + len);
memcpy(*pm+pmlen, str, len);
return pmlen + len - 1;
int pm_strcat(POOLMEM *&pm, const char *str)
{
int pmlen = strlen(pm);
- int len = strlen(str) + 1;
+ int len;
+
+ if (!str) str = "";
+ len = strlen(str) + 1;
pm = check_pool_memory_size(pm, pmlen + len);
memcpy(pm+pmlen, str, len);
return pmlen + len - 1;
int pm_strcat(POOL_MEM &pm, const char *str)
{
int pmlen = strlen(pm.c_str());
- int len = strlen(str) + 1;
+ int len;
+
+ if (!str) str = "";
+ len = strlen(str) + 1;
pm.check_size(pmlen + len);
memcpy(pm.c_str()+pmlen, str, len);
return pmlen + len - 1;
*/
int pm_strcpy(POOLMEM **pm, const char *str)
{
- int len = strlen(str) + 1;
+ int len;
+ if (!str) str = "";
+
+ len = strlen(str) + 1;
*pm = check_pool_memory_size(*pm, len);
memcpy(*pm, str, len);
return len - 1;
int pm_strcpy(POOLMEM *&pm, const char *str)
{
- int len = strlen(str) + 1;
+ int len;
+
+ if (!str) str = "";
+ len = strlen(str) + 1;
pm = check_pool_memory_size(pm, len);
memcpy(pm, str, len);
return len - 1;
int pm_strcpy(POOL_MEM &pm, const char *str)
{
- int len = strlen(str) + 1;
+ int len;
+
+ if (!str) str = "";
+
+ len = strlen(str) + 1;
pm.check_size(len);
memcpy(pm.c_str(), str, len);
return len - 1;
int POOL_MEM::strcat(const char *str)
{
int pmlen = strlen(mem);
- int len = strlen(str) + 1;
+ int len;
+
+ if (!str) str = "";
+ len = strlen(str) + 1;
check_size(pmlen + len);
memcpy(mem+pmlen, str, len);
return pmlen + len - 1;
int POOL_MEM::strcpy(const char *str)
{
- int len = strlen(str) + 1;
+ int len;
+
+ if (!str) str = "";
+
+ len = strlen(str) + 1;
check_size(len);
memcpy(mem, str, len);
return len - 1;
#undef VERSION
#define VERSION "2.1.8"
-#define BDATE "22 April 2007"
-#define LSMDATE "22Apr07"
+#define BDATE "24 April 2007"
+#define LSMDATE "24Apr07"
#define PROG_COPYRIGHT "Copyright (C) %d-2007 Free Software Foundation Europe e.V.\n"
#define BYEAR "2007" /* year for copyright messages in progs */
Technical notes on version 2.1
General:
+24Apr07
+kes Make pm_strxxx() routines handle input of NULL pointer. This
+ is to protect from NULL pointers returned from SQL databases.
+kes Correct typo in bacula-sd manpage as pointed out by John Goerzen.
+kes Add more debug to FIFO code -- fix fifo regression test.
23Apr07
kes Implement posix_fadvise in FD, and for reading spool files in SD.
kes Add thread timer to bnet_connect() to break from OS if wait time