]> git.sur5r.net Git - bacula/bacula/commitdiff
Add ACL check for client in estimate command
authorKern Sibbald <kern@sibbald.com>
Wed, 29 Jul 2009 19:48:16 +0000 (19:48 +0000)
committerKern Sibbald <kern@sibbald.com>
Wed, 29 Jul 2009 19:48:16 +0000 (19:48 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@9120 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/dird/ua_cmds.c

index 6fb958a0749869392f7663c1457cd34660f97ab6..112f7da0cdcfaa6fdd200ad01db4e2981a5fe4fe 100644 (file)
@@ -1150,6 +1150,10 @@ static int estimate_cmd(UAContext *ua, const char *cmd)
                ua->error_msg(_("Client \"%s\" not found.\n"), ua->argv[i]);
                return 1;
             }
+            if (!acl_access_ok(ua, Client_ACL, client->name())) {
+               ua->error_msg(_("No authorization for Client \"%s\"\n"), client->name());
+               return 1;
+            }
             continue;
          } else {
             ua->error_msg(_("Client name missing.\n"));
@@ -1293,7 +1297,7 @@ static int estimate_cmd(UAContext *ua, const char *cmd)
     * If the job is in accurate mode, we send the list of
     * all files to FD.
     */
-   Dmsg1(40, "estimate accurate=%i\n", jcr->accurate);
+   Dmsg1(40, "estimate accurate=%d\n", jcr->accurate);
    if (!send_accurate_current_files(jcr)) {
       goto bail_out;
    }