From: Kern Sibbald Date: Sat, 9 Jun 2012 10:35:02 +0000 (+0200) Subject: Apply patch from bug 1876 to permit dot commands in a runscript X-Git-Tag: Release-7.0.0~195 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=243818fd2bd9a33c7f830abd8b61b781b98bfc45;p=bacula%2Fbacula Apply patch from bug 1876 to permit dot commands in a runscript --- 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;