From: Eric Bollengier Date: Tue, 4 Apr 2023 13:23:25 +0000 (+0200) Subject: Fix #10033 Add extra Client and FileSet ACL checks to the estimate command X-Git-Tag: Release-13.0.3~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d51ad91d9269f50f2aac319ac7204033a347320a;p=thirdparty%2Fbacula.git Fix #10033 Add extra Client and FileSet ACL checks to the estimate command --- diff --git a/bacula/src/dird/ua_cmds.c b/bacula/src/dird/ua_cmds.c index 617a57779..224341a4a 100644 --- a/bacula/src/dird/ua_cmds.c +++ b/bacula/src/dird/ua_cmds.c @@ -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;