From: Alain Spineux Date: Fri, 16 Feb 2024 11:44:00 +0000 (+0100) Subject: Fix #10752 storage option on the restore command line not working X-Git-Tag: Release-15.0.2~38 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7d7db011786be0c09f61c0f7a26c8311b71f8e8e;p=thirdparty%2Fbacula.git Fix #10752 storage option on the restore command line not working - restore **storage=File** is ignored --- diff --git a/bacula/src/dird/ua_restore.c b/bacula/src/dird/ua_restore.c index b1f8dc239..866ff4a75 100644 --- a/bacula/src/dird/ua_restore.c +++ b/bacula/src/dird/ua_restore.c @@ -208,6 +208,18 @@ int restore_cmd(UAContext *ua, const char *cmd) goto bail_out; } rx.job_group = ua->argv[i]; + } else if (strcasecmp(ua->argk[i], "storage") == 0) { + STORE *store; + LockRes(); + foreach_res(store, R_STORAGE) { + if (strcasecmp(ua->argv[i], store->name()) == 0 && + store->is_enabled() && + acl_access_ok(ua, Storage_ACL, store->name())) { + rx.store = store; + break; + } + } + UnlockRes(); } }