Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions src/jrd/nbak.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include "lck.h"
#include "cch.h"
#include "lck.h"
#include "jrd_proto.h"
#include "pag_proto.h"
#include "err_proto.h"
#include "cch_proto.h"
Expand Down Expand Up @@ -223,6 +224,14 @@ void BackupManager::generateFilename()
void BackupManager::openDelta(thread_db* tdbb)
{
fb_assert(!diff_file);

// Verify difference file path against DatabaseAccess entry of firebird.conf
if (!JRD_verify_database_access(diff_name))
{
ERR_post(Arg::Gds(isc_conf_access_denied) << Arg::Str("difference file") <<
Arg::Str(diff_name));
}

diff_file = PIO_open(tdbb, diff_name, diff_name);
}

Expand Down Expand Up @@ -276,6 +285,14 @@ void BackupManager::beginBackup(thread_db* tdbb)
{
// Create file
NBAK_TRACE(("Creating difference file %s", diff_name.c_str()));

// Verify difference file path against DatabaseAccess entry of firebird.conf
if (!JRD_verify_database_access(diff_name))
{
ERR_post(Arg::Gds(isc_conf_access_denied) << Arg::Str("difference file") <<
Arg::Str(diff_name));
}

diff_file = PIO_create(tdbb, diff_name, true, false);
}
catch (const Firebird::Exception&)
Expand Down