From 4d97504f3bd84c31e8f517074619be71edee04f2 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sat, 9 Jun 2012 12:35:02 +0200 Subject: [PATCH] Apply patch from bug 1876 to permit dot commands in a runscript --- bacula/src/dird/job.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bacula/src/dird/job.c b/bacula/src/dird/job.c index 768b6cf1cf..f769d20881 100644 --- a/bacula/src/dird/job.c +++ b/bacula/src/dird/job.c @@ -1458,12 +1458,16 @@ bool run_console_command(JCR *jcr, const char *cmd) bool ok; JCR *ljcr = new_control_jcr("-RunScript-", JT_CONSOLE); ua = new_ua_context(ljcr); - /* run from runscript and check if commands are autorized */ + /* run from runscript and check if commands are authorized */ ua->runscript = true; Mmsg(ua->cmd, "%s", cmd); Dmsg1(100, "Console command: %s\n", ua->cmd); parse_ua_args(ua); - ok= do_a_command(ua); + if (ua->argc > 0 && ua->argk[0][0] == '.') { + ok = do_a_dot_command(ua); + } else { + ok = do_a_command(ua); + } free_ua_context(ua); free_jcr(ljcr); return ok; -- 2.39.5