From: Eric Bollengier Date: Tue, 4 Apr 2023 09:58:16 +0000 (+0200) Subject: Restrict the use of local files during the restore file selection process when using... X-Git-Tag: Release-13.0.3~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f5b5b4d994ae1b45503ec93fdddcf6568e2aab76;p=thirdparty%2Fbacula.git Restrict the use of local files during the restore file selection process when using a Restricted Console In different restore menus, it is possible to fill a list of files to restore from a local file. It is now not authorized from Restricted Console. --- diff --git a/bacula/src/dird/ua_restore.c b/bacula/src/dird/ua_restore.c index 4c8b03aab..379f7f213 100644 --- a/bacula/src/dird/ua_restore.c +++ b/bacula/src/dird/ua_restore.c @@ -1256,6 +1256,10 @@ static void insert_one_file_or_dir(UAContext *ua, RESTORE_CTX *rx, char *date, b switch (*p) { case '<': + if (ua->cons) { /* Do not open local files from a restricted console */ + ua->error_msg(_("Operation not allowed for restricted console\n")); + break; + } p++; if ((ffd = bfopen(p, "rb")) == NULL) { berrno be;