From e4bd35378c31c600d9871b89af53081a4008cf26 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sun, 1 Oct 2006 16:54:59 +0000 Subject: [PATCH] kes Require a messages command acl to be able to receive messages in a console. kes Add console, system, and scan job types in util.c. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@3526 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/console2.gladep | 3 +++ bacula/src/dird/ua_server.c | 16 +++++++++------- bacula/src/lib/util.c | 9 +++++++++ bacula/src/version.h | 4 ++-- bacula/technotes-1.39 | 4 ++++ 5 files changed, 27 insertions(+), 9 deletions(-) diff --git a/bacula/src/console2.gladep b/bacula/src/console2.gladep index 8e701cb6f4..c5760fba98 100644 --- a/bacula/src/console2.gladep +++ b/bacula/src/console2.gladep @@ -5,4 +5,7 @@ console gnome-console gnome2-console + FALSE + FALSE + FALSE diff --git a/bacula/src/dird/ua_server.c b/bacula/src/dird/ua_server.c index 689b2056f7..d2ec8ccdb6 100644 --- a/bacula/src/dird/ua_server.c +++ b/bacula/src/dird/ua_server.c @@ -132,13 +132,15 @@ static void *handle_UA_client_request(void *arg) do_a_command(ua, ua->cmd); } if (!ua->quit) { - if (ua->auto_display_messages) { - pm_strcpy(ua->cmd, "messages"); - qmessagescmd(ua, ua->cmd); - ua->user_notified_msg_pending = FALSE; - } else if (!ua->gui && !ua->user_notified_msg_pending && console_msg_pending) { - bsendmsg(ua, _("You have messages.\n")); - ua->user_notified_msg_pending = TRUE; + if (acl_access_ok(ua, Command_ACL, "messages", 8)) { + if (ua->auto_display_messages) { + pm_strcpy(ua->cmd, "messages"); + qmessagescmd(ua, ua->cmd); + ua->user_notified_msg_pending = FALSE; + } else if (!ua->gui && !ua->user_notified_msg_pending && console_msg_pending) { + bsendmsg(ua, _("You have messages.\n")); + ua->user_notified_msg_pending = TRUE; + } } bnet_sig(ua->UA_sock, BNET_EOD); /* send end of command */ } diff --git a/bacula/src/lib/util.c b/bacula/src/lib/util.c index f991483202..b6c76a0822 100644 --- a/bacula/src/lib/util.c +++ b/bacula/src/lib/util.c @@ -287,6 +287,15 @@ const char *job_type_to_str(int type) case JT_COPY: str = _("Copy"); break; + case JT_CONSOLE: + str = _("Console"); + break; + case JT_SYSTEM: + str = _("System or Console"); + break; + case JT_SCAN: + str = _("Scan"); + break; default: str = _("Unknown Type"); break; diff --git a/bacula/src/version.h b/bacula/src/version.h index 3d184f472f..7f696ad2d0 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -4,8 +4,8 @@ #undef VERSION #define VERSION "1.39.23" -#define BDATE "28 September 2006" -#define LSMDATE "28Sep06" +#define BDATE "o1 October 2006" +#define LSMDATE "01Oct06" #define BYEAR "2006" /* year for copyright messages in progs */ /* Debug flags */ diff --git a/bacula/technotes-1.39 b/bacula/technotes-1.39 index 7c7228fcc4..1886fb467b 100644 --- a/bacula/technotes-1.39 +++ b/bacula/technotes-1.39 @@ -1,6 +1,10 @@ Technical notes on version 1.39 General: +01Sep06 +kes Require a messages command acl to be able to receive messages + in a console. +kes Add console, system, and scan job types in util.c. 28Sep06 kes Print the Volume purged message only for real jobs to keep from cluttering up the daemon messages. -- 2.39.5