mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 16:03:02 +01:00
Fixed broken restore via service API
This commit is contained in:
parent
fcc41d428c
commit
2d7379aa3b
@ -665,6 +665,7 @@ int gbak(Firebird::UtilSvc* uSvc)
|
|||||||
// trusted user name parameter missing
|
// trusted user name parameter missing
|
||||||
}
|
}
|
||||||
tdgbl->gbl_sw_tr_user = argv[itr];
|
tdgbl->gbl_sw_tr_user = argv[itr];
|
||||||
|
burp_in_sw_table[IN_SW_BURP_TRUSTED_USER].in_sw_state = 1;
|
||||||
}
|
}
|
||||||
else if (in_sw_tab->in_sw == IN_SW_BURP_ROLE)
|
else if (in_sw_tab->in_sw == IN_SW_BURP_ROLE)
|
||||||
{
|
{
|
||||||
|
@ -600,7 +600,6 @@ int RESTORE_restore (const TEXT* file_name,
|
|||||||
tdgbl->gbl_sw_user,
|
tdgbl->gbl_sw_user,
|
||||||
strlen(tdgbl->gbl_sw_user));
|
strlen(tdgbl->gbl_sw_user));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tdgbl->gbl_sw_password)
|
if (tdgbl->gbl_sw_password)
|
||||||
{
|
{
|
||||||
dpb.insertString(tdgbl->uSvc->isService() ?
|
dpb.insertString(tdgbl->uSvc->isService() ?
|
||||||
@ -608,6 +607,11 @@ int RESTORE_restore (const TEXT* file_name,
|
|||||||
tdgbl->gbl_sw_password,
|
tdgbl->gbl_sw_password,
|
||||||
strlen(tdgbl->gbl_sw_password));
|
strlen(tdgbl->gbl_sw_password));
|
||||||
}
|
}
|
||||||
|
if (tdgbl->gbl_sw_tr_user)
|
||||||
|
{
|
||||||
|
dpb.insertString(isc_dpb_trusted_auth,
|
||||||
|
tdgbl->gbl_sw_tr_user, strlen(tdgbl->gbl_sw_tr_user));
|
||||||
|
}
|
||||||
|
|
||||||
dpb.insertByte(isc_dpb_no_db_triggers, 1);
|
dpb.insertByte(isc_dpb_no_db_triggers, 1);
|
||||||
|
|
||||||
@ -653,6 +657,11 @@ int RESTORE_restore (const TEXT* file_name,
|
|||||||
tdgbl->gbl_sw_password,
|
tdgbl->gbl_sw_password,
|
||||||
strlen(tdgbl->gbl_sw_password));
|
strlen(tdgbl->gbl_sw_password));
|
||||||
}
|
}
|
||||||
|
if (tdgbl->gbl_sw_tr_user)
|
||||||
|
{
|
||||||
|
dpb.insertString(isc_dpb_trusted_auth,
|
||||||
|
tdgbl->gbl_sw_tr_user, strlen(tdgbl->gbl_sw_tr_user));
|
||||||
|
}
|
||||||
|
|
||||||
dpb.insertByte(isc_dpb_set_db_readonly, TRUE);
|
dpb.insertByte(isc_dpb_set_db_readonly, TRUE);
|
||||||
dpb.insertByte(isc_dpb_no_db_triggers, 1);
|
dpb.insertByte(isc_dpb_no_db_triggers, 1);
|
||||||
@ -1008,6 +1017,11 @@ void create_database(BurpGlobals* tdgbl,
|
|||||||
tdgbl->gbl_sw_password,
|
tdgbl->gbl_sw_password,
|
||||||
strlen(tdgbl->gbl_sw_password));
|
strlen(tdgbl->gbl_sw_password));
|
||||||
}
|
}
|
||||||
|
if (tdgbl->gbl_sw_tr_user)
|
||||||
|
{
|
||||||
|
dpb.insertString(isc_dpb_trusted_auth,
|
||||||
|
tdgbl->gbl_sw_tr_user, strlen(tdgbl->gbl_sw_tr_user));
|
||||||
|
}
|
||||||
if (page_buffers)
|
if (page_buffers)
|
||||||
{
|
{
|
||||||
dpb.insertInt(isc_dpb_set_page_buffers, page_buffers);
|
dpb.insertInt(isc_dpb_set_page_buffers, page_buffers);
|
||||||
|
Loading…
Reference in New Issue
Block a user