From f5b5b4d994ae1b45503ec93fdddcf6568e2aab76 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Tue, 4 Apr 2023 11:58:16 +0200 Subject: [PATCH] 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. --- bacula/src/dird/ua_restore.c | 4 ++++ 1 file changed, 4 insertions(+) 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; -- 2.47.3