]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
Fix #10033 Add extra Client and FileSet ACL checks to the estimate command
authorEric Bollengier <eric@baculasystems.com>
Tue, 4 Apr 2023 13:23:25 +0000 (15:23 +0200)
committerEric Bollengier <eric@baculasystems.com>
Tue, 2 May 2023 07:07:18 +0000 (09:07 +0200)
bacula/src/dird/ua_cmds.c

index 617a57779df5680c8b6f2b49b64a578d5b5a5337..224341a4a5d061ad221bf4da37fdafcf9eb6790b 100644 (file)
@@ -1512,9 +1512,17 @@ static int estimate_cmd(UAContext *ua, const char *cmd)
    jcr->job = job;
    if (!client) {
       client = job->client;
+      if (client && !acl_access_client_ok(ua, client->name(), JT_BACKUP)) {
+         ua->error_msg(_("No authorization for Job's Client\n"));
+         return 1;
+      }
    }
    if (!fileset) {
       fileset = job->fileset;
+      if (fileset && !acl_access_ok(ua, FileSet_ACL, fileset->name())) {
+         ua->error_msg(_("No authorization for Job's Fileset\n"));
+         return 1;
+      }
    }
    jcr->client = client;
    jcr->fileset = fileset;