From 72f990b62c10a86b8b92999d4069dbc8563cf2bb Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sun, 27 May 2007 19:30:39 +0000 Subject: [PATCH] kes Add < > around %r in from field on mail command of bacula-dir.conf.in so that bsmtp will create a correct email address (mailbox only). kes Modify 'memory' command so that the buffers are listed as 'In use' to avoid confusion with Orphaned buffers. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4921 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/kernstodo | 1 + bacula/src/dird/bacula-dir.conf.in | 6 +++--- bacula/src/dird/dird.c | 2 +- bacula/src/dird/ua_cmds.c | 2 +- bacula/src/lib/smartall.c | 9 +++++---- bacula/src/lib/smartall.h | 2 +- bacula/technotes-2.1 | 4 ++++ 7 files changed, 16 insertions(+), 10 deletions(-) diff --git a/bacula/kernstodo b/bacula/kernstodo index 9cbb4e5a70..f9b5869ee0 100644 --- a/bacula/kernstodo +++ b/bacula/kernstodo @@ -50,6 +50,7 @@ Professional Needs: - SD to SD - Modules for Databases, Exchange, ... - Novell NSS backup http://www.novell.com/coolsolutions/tools/18952.html +- Compliance norms that compare restored code hash code. Priority: diff --git a/bacula/src/dird/bacula-dir.conf.in b/bacula/src/dird/bacula-dir.conf.in index e4abd5bee4..7190fbd356 100644 --- a/bacula/src/dird/bacula-dir.conf.in +++ b/bacula/src/dird/bacula-dir.conf.in @@ -246,8 +246,8 @@ Messages { # tell (most) people that its coming from an automated source. # - mailcommand = "@sbindir@/bsmtp -h @smtp_host@ -f \"\(Bacula\) %r\" -s \"Bacula: %t %e of %c %l\" %r" - operatorcommand = "@sbindir@/bsmtp -h @smtp_host@ -f \"\(Bacula\) %r\" -s \"Bacula: Intervention needed for %j\" %r" + mailcommand = "@sbindir@/bsmtp -h @smtp_host@ -f \"\(Bacula\) \<%r\>\" -s \"Bacula: %t %e of %c %l\" %r" + operatorcommand = "@sbindir@/bsmtp -h @smtp_host@ -f \"\(Bacula\) \<%r\>\" -s \"Bacula: Intervention needed for %j\" %r" mail = @job_email@ = all, !skipped operator = @job_email@ = mount console = all, !skipped, !saved @@ -264,7 +264,7 @@ Messages { # Message delivery for daemon messages (no job). Messages { Name = Daemon - mailcommand = "@sbindir@/bsmtp -h @smtp_host@ -f \"\(Bacula\) %r\" -s \"Bacula daemon message\" %r" + mailcommand = "@sbindir@/bsmtp -h @smtp_host@ -f \"\(Bacula\) \<%r\>\" -s \"Bacula daemon message\" %r" mail = @job_email@ = all, !skipped console = all, !skipped, !saved append = "@working_dir@/log" = all, !skipped diff --git a/bacula/src/dird/dird.c b/bacula/src/dird/dird.c index 10e8c96f95..4f668fc107 100644 --- a/bacula/src/dird/dird.c +++ b/bacula/src/dird/dird.c @@ -504,7 +504,7 @@ void reload_config(int sig) set_working_directory(director->working_directory); FDConnectTimeout = director->FDConnectTimeout; SDConnectTimeout = director->SDConnectTimeout; - Dmsg0(0, "Director's configuration file reread.\n"); + Dmsg0(10, "Director's configuration file reread.\n"); /* Now release saved resources, if no jobs using the resources */ if (njobs == 0) { diff --git a/bacula/src/dird/ua_cmds.c b/bacula/src/dird/ua_cmds.c index fa983bb370..91a96a72e7 100644 --- a/bacula/src/dird/ua_cmds.c +++ b/bacula/src/dird/ua_cmds.c @@ -1405,7 +1405,7 @@ static int delete_pool(UAContext *ua) int memory_cmd(UAContext *ua, const char *cmd) { list_dir_status_header(ua); - sm_dump(false); + sm_dump(false, true); return 1; } diff --git a/bacula/src/lib/smartall.c b/bacula/src/lib/smartall.c index 11ca3dd656..8101067eac 100644 --- a/bacula/src/lib/smartall.c +++ b/bacula/src/lib/smartall.c @@ -365,7 +365,7 @@ void actuallyfree(void *cp) * N.B. DO NOT USE any Bacula print routines (Dmsg, Jmsg, Emsg, ...) * as they have all been shut down at this point. */ -void sm_dump(bool bufdump) +void sm_dump(bool bufdump, bool in_use) { struct abufhead *ap; @@ -381,7 +381,7 @@ void sm_dump(bool bufdump) fprintf(stderr, _( "\nOrphaned buffers exist. Dump terminated following\n" " discovery of bad links in chain of orphaned buffers.\n" - " Buffer address with bad links: %lx\n"), (long) ap); + " Buffer address with bad links: %p\n"), ap); break; } @@ -391,7 +391,8 @@ void sm_dump(bool bufdump) char *cp = ((char *)ap) + HEAD_SIZE; bsnprintf(errmsg, sizeof(errmsg), - _("Orphaned buffer: %s %6u bytes buf=%p allocated at %s:%d\n"), + _("%s buffer: %s %6u bytes buf=%p allocated at %s:%d\n"), + in_use?"In use":"Orphaned", my_name, memsize, cp, ap->abfname, ap->ablineno ); fprintf(stderr, "%s", errmsg); @@ -468,7 +469,7 @@ int sm_check_rtn(const char *fname, int lineno, bool bufdump) fprintf(stderr, _(" discovery of data overrun.\n")); } - fprintf(stderr, _(" Buffer address: %lx\n"), (long) ap); + fprintf(stderr, _(" Buffer address: %p\n"), ap); if (ap->abfname != NULL) { unsigned memsize = ap->ablen - (HEAD_SIZE + 1); diff --git a/bacula/src/lib/smartall.h b/bacula/src/lib/smartall.h index 5875db28c0..b178663b05 100644 --- a/bacula/src/lib/smartall.h +++ b/bacula/src/lib/smartall.h @@ -52,7 +52,7 @@ extern void *sm_malloc(const char *fname, int lineno, unsigned int nbytes), *actuallyrealloc(void *ptr, unsigned int size); extern void sm_free(const char *fname, int lineno, void *fp); extern void actuallyfree(void *cp), - sm_dump(bool bufdump), sm_static(int mode); + sm_dump(bool bufdump, bool in_use=false), sm_static(int mode); extern void sm_new_owner(const char *fname, int lineno, char *buf); #ifdef SMCHECK diff --git a/bacula/technotes-2.1 b/bacula/technotes-2.1 index 0fa1fab0c2..64f75bbb85 100644 --- a/bacula/technotes-2.1 +++ b/bacula/technotes-2.1 @@ -2,6 +2,10 @@ General: 27May07 +kes Add < > around %r in from field on mail command of bacula-dir.conf.in + so that bsmtp will create a correct email address (mailbox only). +kes Modify 'memory' command so that the buffers are listed as 'In use' + to avoid confusion with Orphaned buffers. kes I reworked the OpenSSL include/lib flags to be handled in the standard Bacula way, which should fix bug #863 concerning non-standard OpenSSL libraries. -- 2.39.5