kes Fix (hopefully) bug #930 by doing a db_escape_string() on file
and directory names during restore of single file/directories.
kes Add sanity checks to .sql command when string is empty. Hopefully
that will resolve Dirks Director crash.
22Aug07
kes Apply patch submitted by Martin Simmons that corrects a seg fault
in the bsmtp chat subroutine when debug is >= 10.
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@5398
91ce42f0-d328-0410-95d8-
f526ca767f89
}
pm_strcat(rows, "\t");
}
- ua->send_msg("%s", rows.c_str());
+ if (!rows.c_str() || !*rows.c_str()) {
+ ua->send_msg("\t");
+ } else {
+ ua->send_msg("%s", rows.c_str());
+ }
return 0;
}
{
BSOCK *bs = ua->UA_sock;
int maxlen, len;
- POOLMEM *msg;
+ POOLMEM *msg = NULL;
if (bs) {
msg = bs->msg;
- } else {
+ }
+ if (!msg) {
msg = get_pool_memory(PM_EMSG);
}
{
BSOCK *bs = UA_sock;
va_list arg_ptr;
- va_start(arg_ptr, fmt);
+
if (bs && api) bs->signal(BNET_ERROR_MSG);
+ va_start(arg_ptr, fmt);
bmsg(this, fmt, arg_ptr);
va_end(arg_ptr);
}
{
BSOCK *bs = UA_sock;
va_list arg_ptr;
- va_start(arg_ptr, fmt);
+
if (bs && api) bs->signal(BNET_WARNING_MSG);
+ va_start(arg_ptr, fmt);
bmsg(this, fmt, arg_ptr);
va_end(arg_ptr);
}
{
BSOCK *bs = UA_sock;
va_list arg_ptr;
- va_start(arg_ptr, fmt);
+
if (bs && api) bs->signal(BNET_INFO_MSG);
+ va_start(arg_ptr, fmt);
bmsg(this, fmt, arg_ptr);
va_end(arg_ptr);
}
*/
rx->fnl = p - f;
if (rx->fnl > 0) {
- rx->fname = check_pool_memory_size(rx->fname, rx->fnl+1);
- memcpy(rx->fname, f, rx->fnl); /* copy filename */
- rx->fname[rx->fnl] = 0;
+ rx->fname = check_pool_memory_size(rx->fname, 2*(rx->fnl)+1);
+ db_escape_string(rx->fname, f, rx->fnl);
} else {
rx->fname[0] = 0;
rx->fnl = 0;
rx->pnl = f - name;
if (rx->pnl > 0) {
- rx->path = check_pool_memory_size(rx->path, rx->pnl+1);
- memcpy(rx->path, name, rx->pnl);
- rx->path[rx->pnl] = 0;
+ rx->path = check_pool_memory_size(rx->path, 2*(rx->pnl)+1);
+ db_escape_string(rx-path, name, rx->pnl);
} else {
rx->path[0] = 0;
rx->pnl = 0;
va_start(ap, fmt);
vfprintf(sfp, fmt, ap);
+ va_end(ap);
if (debug_level >= 10) {
fprintf(stdout, "%s --> ", my_hostname);
+ va_start(ap, fmt);
vfprintf(stdout, fmt, ap);
+ va_end(ap);
}
- va_end(ap);
fflush(sfp);
if (debug_level >= 10) {
#undef VERSION
#define VERSION "2.3.1"
-#define BDATE "21 August 2007"
-#define LSMDATE "21Aug07"
+#define BDATE "23 August 2007"
+#define LSMDATE "23Aug07"
#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.3
General:
+23Aug07
+kes Fix (hopefully) bug #930 by doing a db_escape_string() on file
+ and directory names during restore of single file/directories.
+kes Add sanity checks to .sql command when string is empty. Hopefully
+ that will resolve Dirks Director crash.
+22Aug07
+kes Apply patch submitted by Martin Simmons that corrects a seg fault
+ in the bsmtp chat subroutine when debug is >= 10.
21Aug07
kes Fix Director crash when running bat SQL queries.
kes Add David's notes on Item 8: Copy pools.