8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 19:23:03 +01:00

Cleanup - removed unused any more service time only switches trusted_user & trusted_role

This commit is contained in:
alexpeshkoff 2014-06-25 11:20:42 +00:00
parent ac421c2fb7
commit 568861d2d7
19 changed files with 31 additions and 255 deletions

View File

@ -136,8 +136,6 @@ int alice(Firebird::UtilSvc* uSvc)
#ifdef TRUSTED_AUTH
tdgbl->ALICE_data.ua_trusted = false;
#endif
tdgbl->ALICE_data.ua_tr_user = NULL;
tdgbl->ALICE_data.ua_tr_role = false;
// Start by parsing switches
@ -198,24 +196,6 @@ int alice(Firebird::UtilSvc* uSvc)
version = true;
}
/***
if (table->in_sw_value & sw_trusted_svc)
{
uSvc->checkService();
if (--argc <= 0) {
ALICE_error(13); // msg 13: user name required
}
tdgbl->ALICE_data.ua_tr_user = *argv++;
continue;
}
if (table->in_sw_value & sw_trusted_role)
{
uSvc->checkService();
tdgbl->ALICE_data.ua_tr_role = true;
continue;
}
***/
#ifdef TRUSTED_AUTH
if (table->in_sw_value & sw_trusted_auth)
{
@ -472,8 +452,7 @@ int alice(Firebird::UtilSvc* uSvc)
ALICE_exit(FINI_OK, tdgbl);
}
if (!flags || !(flags & ~(sw_user | sw_password | sw_fetch_password |
sw_trusted_auth/* | sw_trusted_svc | sw_trusted_role*/)))
if (!flags || !(flags & ~(sw_user | sw_password | sw_fetch_password | sw_trusted_auth)))
{
if (!help && !uSvc->isService())
{

View File

@ -58,8 +58,6 @@ struct user_action
ULONG ua_switches;
const char* ua_user;
const char* ua_password;
const char* ua_tr_user;
bool ua_tr_role;
#ifdef TRUSTED_AUTH
bool ua_trusted;
#endif

View File

@ -60,8 +60,6 @@ const SINT64 sw_buffers = 0x0000000020000000L;
const SINT64 sw_mode = 0x0000000040000000L;
const SINT64 sw_set_db_dialect = 0x0000000080000000L;
const SINT64 sw_trusted_auth = QUADCONST(0x0000000100000000); // Byte 4, Bit 0
//const SINT64 sw_trusted_svc = QUADCONST(0x0000000200000000);
//const SINT64 sw_trusted_role = QUADCONST(0x0000000400000000);
const SINT64 sw_fetch_password = QUADCONST(0x0000000800000000);
const SINT64 sw_nolinger = QUADCONST(0x0000001000000000);
@ -115,11 +113,9 @@ enum alice_switches
#ifdef TRUSTED_AUTH
IN_SW_ALICE_TRUSTED_AUTH = 44,
#endif
// IN_SW_ALICE_TRUSTED_USER = 45,
// IN_SW_ALICE_TRUSTED_ROLE = 46,
IN_SW_ALICE_HIDDEN_ONLINE = 47,
IN_SW_ALICE_FETCH_PASSWORD = 48,
IN_SW_ALICE_NOLINGER = 49
IN_SW_ALICE_HIDDEN_ONLINE = 45,
IN_SW_ALICE_FETCH_PASSWORD = 46,
IN_SW_ALICE_NOLINGER = 47
};
static const char* const ALICE_SW_ASYNC = "ASYNC";
@ -199,7 +195,7 @@ static const Switches::in_sw_tab_t alice_in_sw_table[] =
sw_list, 0, false, 41, 2, NULL},
// msg 41: \t-prompt\t\tprompt for commit/rollback (-l)
{IN_SW_ALICE_PASSWORD, 0, "PASSWORD", sw_password,
0, (sw_trusted_auth /*| sw_trusted_svc | sw_trusted_role */| sw_fetch_password),
0, (sw_trusted_auth | sw_fetch_password),
false, 42, 2, NULL},
// msg 42: \t-password\tdefault password
#ifdef DEV_BUILD
@ -233,15 +229,11 @@ static const Switches::in_sw_tab_t alice_in_sw_table[] =
0, (sw_user | sw_password), false, 115, 3, NULL},
// msg 115: -trusted use trusted authentication
#endif
/* {IN_SW_ALICE_TRUSTED_USER, 0, TRUSTED_USER_SWITCH, sw_trusted_svc,
0, (sw_trusted_svc | sw_user | sw_password), false, 0, TRUSTED_USER_SWITCH_LEN, NULL},
{IN_SW_ALICE_TRUSTED_ROLE, 0, TRUSTED_ROLE_SWITCH, sw_trusted_role,
sw_trusted_svc, (sw_user | sw_password), false, 0, TRUSTED_ROLE_SWITCH_LEN, NULL}, */
{IN_SW_ALICE_NO_RESERVE, 0, "USE", sw_no_reserve,
0, ~(sw_no_reserve | sw_user | sw_password | sw_nolinger), false, 49, 1, NULL},
// msg 49: \t-use\t\tuse full or reserve space for versions
{IN_SW_ALICE_USER, 0, "USER", sw_user,
0, (sw_trusted_auth /*| sw_trusted_svc | sw_trusted_role*/), false, 50, 4, NULL},
0, sw_trusted_auth, false, 50, 4, NULL},
// msg 50: \t-user\t\tdefault user name
{IN_SW_ALICE_VALIDATE, isc_spb_rpr_validate_db, "VALIDATE", sw_validate,
0, ~(sw_validate | sw_user | sw_password | sw_nolinger), false, 51, 1, NULL},

View File

@ -347,19 +347,6 @@ static void buildDpb(Firebird::ClumpletWriter& dpb, const SINT64 switches)
tdgbl->ALICE_data.ua_password, strlen(tdgbl->ALICE_data.ua_password));
}
if (tdgbl->ALICE_data.ua_tr_user)
{
tdgbl->uSvc->checkService();
dpb.insertString(isc_dpb_trusted_auth,
tdgbl->ALICE_data.ua_tr_user, strlen(tdgbl->ALICE_data.ua_tr_user));
}
if (tdgbl->ALICE_data.ua_tr_role)
{
tdgbl->uSvc->checkService();
dpb.insertString(isc_dpb_trusted_role, ADMIN_ROLE, strlen(ADMIN_ROLE));
}
#ifdef TRUSTED_AUTH
if (tdgbl->ALICE_data.ua_trusted)
{

View File

@ -196,18 +196,6 @@ bool TDR_attach_database(ISC_STATUS* status_vector, tdr* trans, const TEXT* path
dpb.insertString(tdgbl->uSvc->isService() ? isc_dpb_password_enc : isc_dpb_password,
tdgbl->ALICE_data.ua_password, strlen(tdgbl->ALICE_data.ua_password));
}
if (tdgbl->ALICE_data.ua_tr_user)
{
tdgbl->uSvc->checkService();
dpb.insertString(isc_dpb_trusted_auth,
tdgbl->ALICE_data.ua_tr_user,
strlen(reinterpret_cast<const char*>(tdgbl->ALICE_data.ua_tr_user)));
}
if (tdgbl->ALICE_data.ua_tr_role)
{
tdgbl->uSvc->checkService();
dpb.insertString(isc_dpb_trusted_role, ADMIN_ROLE, strlen(ADMIN_ROLE));
}
trans->tdr_db_handle = 0;

View File

@ -691,17 +691,6 @@ int gbak(Firebird::UtilSvc* uSvc)
}
tdgbl->setupSkipData(argv[itr]);
break;
/***
case IN_SW_BURP_TRUSTED_USER:
uSvc->checkService();
if (++itr >= argc)
{
BURP_error(188, true);
// trusted user name parameter missing
}
tdgbl->gbl_sw_tr_user = argv[itr];
break;
***/
case IN_SW_BURP_ROLE:
if (++itr >= argc)
{
@ -1039,26 +1028,6 @@ int gbak(Firebird::UtilSvc* uSvc)
}
break;
/***
case IN_SW_BURP_TRUSTED_USER:
uSvc->checkService();
if (!authBlock)
{
dpb.deleteWithTag(isc_dpb_trusted_auth);
dpb.insertString(isc_dpb_trusted_auth, tdgbl->gbl_sw_tr_user, strlen(tdgbl->gbl_sw_tr_user));
}
break;
case IN_SW_BURP_TRUSTED_ROLE:
uSvc->checkService();
if (!authBlock)
{
dpb.deleteWithTag(isc_dpb_trusted_role);
dpb.insertString(isc_dpb_trusted_role, ADMIN_ROLE, strlen(ADMIN_ROLE));
}
break;
***/
#ifdef TRUSTED_AUTH
case IN_SW_BURP_TRUSTED_AUTH:
if (!dpb.find(isc_dpb_trusted_auth))

View File

@ -953,7 +953,6 @@ public:
const SCHAR* gbl_sw_sql_role;
const SCHAR* gbl_sw_user;
const SCHAR* gbl_sw_password;
const SCHAR* gbl_sw_tr_user;
SLONG gbl_sw_skip_count;
SLONG gbl_sw_page_buffers;
burp_fil* gbl_sw_files;

View File

@ -83,8 +83,6 @@ const int IN_SW_BURP_NOD = 39; // do not run database triggers
#ifdef TRUSTED_AUTH
const int IN_SW_BURP_TRUSTED_AUTH = 40; // force trusted auth
#endif
//const int IN_SW_BURP_TRUSTED_USER = 41; // trusted user name to use on attach
//const int IN_SW_BURP_TRUSTED_ROLE = 42; // use trusted role on attach
const int IN_SW_BURP_FIX_FSS_DATA = 43; // fix unicode_fss data
const int IN_SW_BURP_FIX_FSS_METADATA = 44; // fix unicode_fss metadata
@ -173,8 +171,6 @@ static const Switches::in_sw_tab_t reference_burp_in_sw_table[] =
{IN_SW_BURP_TRUSTED_AUTH, 0, "TRUSTED", 0, 0, 0, false, 295, 3, NULL, boGeneral},
// msg 295: @1TRU(STED) use trusted authentication
#endif
// {IN_SW_BURP_TRUSTED_USER, 0, TRUSTED_USER_SWITCH, 0, 0, 0, false, 0, TRUSTED_USER_SWITCH_LEN, NULL, boGeneral},
// {IN_SW_BURP_TRUSTED_ROLE, 0, TRUSTED_ROLE_SWITCH, 0, 0, 0, false, 0, TRUSTED_ROLE_SWITCH_LEN, NULL, boGeneral},
/*
{IN_SW_BURP_U, 0, "UNPROTECTED", 0, 0, 0, false, 0, 5, NULL, boGeneral},
*/

View File

@ -623,10 +623,6 @@ void add_access_dpb(BurpGlobals* tdgbl, Firebird::ClumpletWriter& dpb)
dpb.insertString(tdgbl->uSvc->isService() ? isc_dpb_password_enc : isc_dpb_password,
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);
}
@ -902,10 +898,6 @@ void create_database(BurpGlobals* tdgbl, const TEXT* file_name)
dpb.insertString(tdgbl->uSvc->isService() ? isc_dpb_password_enc : isc_dpb_password,
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)
{
dpb.insertInt(isc_dpb_set_page_buffers, page_buffers);

View File

@ -423,12 +423,7 @@ const int DDL_TRIGGER_DROP_MAPPING = 47;
// is specified by the client application
#define USERNAME_SWITCH "USER"
#define PASSWORD_SWITCH "PASSWORD"
/***
#define TRUSTED_USER_SWITCH "TRUSTED_SVC"
#define TRUSTED_USER_SWITCH_LEN (sizeof(TRUSTED_USER_SWITCH) - 1)
#define TRUSTED_ROLE_SWITCH "TRUSTED_ROLE"
#define TRUSTED_ROLE_SWITCH_LEN (sizeof(TRUSTED_ROLE_SWITCH) - 1)
***/
const TraNumber MAX_TRA_NUMBER = ~TraNumber(0);
#endif // JRD_CONSTANTS_H

View File

@ -282,18 +282,6 @@ void Service::getOptions(ClumpletReader& spb)
case isc_spb_command_line:
spb.getString(svc_command_line);
/***
{
// HACK: this does not care about the words on allowed places.
string cLine = svc_command_line;
cLine.upper();
if (cLine.find(TRUSTED_USER_SWITCH) != string::npos ||
cLine.find(TRUSTED_ROLE_SWITCH) != string::npos)
{
(Arg::Gds(isc_bad_spb_form) << Arg::Gds(isc_no_trusted_spb)).raise();
}
}
***/
break;
case isc_spb_expected_db:
@ -2823,18 +2811,6 @@ bool Service::process_switches(ClumpletReader& spb, string& switches)
{
string s;
spb.getString(s);
/***
// HACK: this does not care about the words on allowed places.
string cLine = s;
cLine.upper();
if (cLine.find(TRUSTED_USER_SWITCH) != string::npos ||
cLine.find(TRUSTED_ROLE_SWITCH) != string::npos)
{
(Arg::Gds(isc_bad_spb_form) << Arg::Gds(isc_no_trusted_spb)).raise();
}
***/
switches += s;
switches += ' ';
}

View File

@ -2526,9 +2526,9 @@ static THREAD_ENTRY_DECLARE sweep_database(THREAD_ENTRY_PARAM database)
Firebird::ClumpletWriter dpb(Firebird::ClumpletReader::Tagged, MAX_DPB_SIZE, isc_dpb_version1);
dpb.insertByte(isc_dpb_sweep, isc_dpb_records);
// use trusted authentication to attach database
// use embedded authentication to attach database
const char* szAuthenticator = "sweeper";
dpb.insertString(isc_dpb_trusted_auth, szAuthenticator, strlen(szAuthenticator));
dpb.insertString(isc_dpb_user_name, szAuthenticator, strlen(szAuthenticator));
ISC_STATUS_ARRAY status_vector = {0};
isc_db_handle db_handle = 0;

View File

@ -356,29 +356,6 @@ void fbtrace(UtilSvc* uSvc, TraceSvcIntf* traceSvc)
adminRole = true;
break;
/***
case IN_SW_TRACE_TRUSTED_USER:
if (!uSvc->isService())
usage(uSvc, isc_trace_switch_svc_only, sw->in_sw_name);
if (!user.empty())
usage(uSvc, isc_trace_switch_once, sw->in_sw_name);
argv++;
if (argv < end && *argv)
user = *argv;
else
usage(uSvc, isc_trace_param_val_miss, sw->in_sw_name);
break;
case IN_SW_TRACE_TRUSTED_ROLE:
if (!uSvc->isService())
usage(uSvc, isc_trace_switch_svc_only, sw->in_sw_name);
adminRole = true;
break;
***/
case IN_SW_TRACE_SERVICE_NAME:
if (uSvc->isService())
continue;

View File

@ -36,12 +36,10 @@ const int IN_SW_TRACE_NAME = 7;
const int IN_SW_TRACE_ID = 8;
const int IN_SW_TRACE_USERNAME = 9;
const int IN_SW_TRACE_PASSWORD = 10;
const int IN_SW_TRACE_TRUSTED_USER = 11;
const int IN_SW_TRACE_TRUSTED_ROLE = 12;
const int IN_SW_TRACE_SERVICE_NAME = 13;
const int IN_SW_TRACE_FETCH_PWD = 14;
const int IN_SW_TRACE_TRUSTED_AUTH = 15;
const int IN_SW_TRACE_VERSION = 16;
const int IN_SW_TRACE_SERVICE_NAME = 11;
const int IN_SW_TRACE_FETCH_PWD = 12;
const int IN_SW_TRACE_TRUSTED_AUTH = 13;
const int IN_SW_TRACE_VERSION = 14;
// list of possible actions (services) for use with trace services
@ -73,8 +71,6 @@ static const struct Switches::in_sw_tab_t trace_auth_in_sw_table [] =
{IN_SW_TRACE_PASSWORD, 0, PASSWORD_SWITCH, 0, 0, 0, false, 0, 1, NULL},
{IN_SW_TRACE_SERVICE_NAME, 0, "SERVICE", 0, 0, 0, false, 0, 2, NULL},
{IN_SW_TRACE_TRUSTED_AUTH, 0, "TRUSTED", 0, 0, 0, false, 0, 1, NULL},
// {IN_SW_TRACE_TRUSTED_USER, 0, TRUSTED_USER_SWITCH, 0, 0, 0, false, 0, TRUSTED_USER_SWITCH_LEN, NULL},
// {IN_SW_TRACE_TRUSTED_ROLE, 0, TRUSTED_ROLE_SWITCH, 0, 0, 0, false, 0, TRUSTED_ROLE_SWITCH_LEN, NULL},
{IN_SW_TRACE_USERNAME, 0, USERNAME_SWITCH, 0, 0, 0, false, 0, 1, NULL},
{0, 0, NULL, 0, 0, 0, false, 0, 0, NULL} // End of List
};

View File

@ -53,15 +53,13 @@ const int IN_SW_GSEC_DBA_PASSWORD = 18; // Database Admin. Password
const int IN_SW_GSEC_SQL_ROLE_NAME = 19; // SQL Role to assume
const int IN_SW_GSEC_AMBIG = 20; // ambiguous switch
//const int IN_SW_GSEC_USERNAME = 21; // placeholder for the username
//const int IN_SW_GSEC_DBA_TRUSTED_USER = 22; // Database Admin. Trusted User name
//const int IN_SW_GSEC_DBA_TRUSTED_ROLE = 23; // use trusted role for auth
#ifdef TRUSTED_AUTH
const int IN_SW_GSEC_TRUSTED_AUTH = 24; // Use trusted authentication
const int IN_SW_GSEC_TRUSTED_AUTH = 22; // Use trusted authentication
#endif
const int IN_SW_GSEC_FETCH_PASSWORD = 25; // Fetch Password (Database Admin.)
const int IN_SW_GSEC_MAPPING = 26; // Change auto admin mapping
const int IN_SW_GSEC_ADMIN = 27; // Grant/revoke RDB$ADMIN in security database
const int IN_SW_GSEC_DIS_ADM = 28; // display user(s) with admin info
const int IN_SW_GSEC_FETCH_PASSWORD = 23; // Fetch Password (Database Admin.)
const int IN_SW_GSEC_MAPPING = 24; // Change auto admin mapping
const int IN_SW_GSEC_ADMIN = 25; // Grant/revoke RDB$ADMIN in security database
const int IN_SW_GSEC_DIS_ADM = 26; // display user(s) with admin info
static const struct Switches::in_sw_tab_t gsec_in_sw_table [] =
{
@ -86,10 +84,6 @@ static const struct Switches::in_sw_tab_t gsec_in_sw_table [] =
{IN_SW_GSEC_DBA_PASSWORD, 0, "PASSWORD", 0, 0, 0, false, 0, 2, NULL}, // Database Admin. Password
{IN_SW_GSEC_FETCH_PASSWORD, 0, "FETCH_PASSWORD", 0, 0, 0, false, 0, 2, NULL}, // Fetch Database Admin. Password
{IN_SW_GSEC_SQL_ROLE_NAME, isc_spb_sql_role_name, "ROLE", 0, 0, 0, false, 0, 2, NULL}, // SQL Role to assume
/* {IN_SW_GSEC_DBA_TRUSTED_USER, 0, TRUSTED_USER_SWITCH, 0, 0, 0, false, 0,
TRUSTED_USER_SWITCH_LEN, NULL}, // Database Admin. Trusted User name
{IN_SW_GSEC_DBA_TRUSTED_ROLE, 0, TRUSTED_ROLE_SWITCH, 0, 0, 0, false, 0,
TRUSTED_ROLE_SWITCH_LEN, NULL}, // Use trusted role for auth */
#ifdef TRUSTED_AUTH
{IN_SW_GSEC_TRUSTED_AUTH, 0, "TRUSTED", 0, 0, 0, false, 0, 1, NULL}, // Database Admin. Trusted User name
#endif

View File

@ -362,7 +362,6 @@ int gstat(Firebird::UtilSvc* uSvc)
// TEXT tr_buff[128], *tr_user = tr_buff;
// MOVE_CLEAR(tr_buff, sizeof(tr_buff));
// bool trusted_role = false;
#ifdef TRUSTED_AUTH
bool trusted_auth = false;
@ -455,18 +454,6 @@ int gstat(Firebird::UtilSvc* uSvc)
}
}
break;
/***
case IN_SW_DBA_TRUSTED_USER:
uSvc->checkService();
if (argv < end)
fb_utils::copy_terminate(tr_user, *argv++, sizeof(tr_buff));
break;
case IN_SW_DBA_TRUSTED_ROLE:
uSvc->checkService();
trusted_role = true;
break;
***/
#ifdef TRUSTED_AUTH
case IN_SW_DBA_TRUSTEDAUTH:
trusted_auth = true;
@ -752,16 +739,6 @@ int gstat(Firebird::UtilSvc* uSvc)
password, strlen(password));
}
/***
if (*tr_user)
{
uSvc->checkService();
dpb.insertString(isc_dpb_trusted_auth, tr_user, strlen(tr_user));
if (trusted_role)
dpb.insertString(isc_dpb_trusted_role, ADMIN_ROLE, strlen(ADMIN_ROLE));
}
***/
#ifdef TRUSTED_AUTH
if (trusted_auth)
dpb.insertTag(isc_dpb_trusted_auth);

View File

@ -44,14 +44,12 @@ const int IN_SW_DBA_PASSWORD = 9; // password
const int IN_SW_DBA_RECORD = 10; // analyze record versions
const int IN_SW_DBA_RELATION = 11; // analyze specific relations
const int IN_SW_DBA_NOCREATION = 12; // don't print creation date
const int IN_SW_DBA_TRUSTED_USER = 13; // trusted user name
const int IN_SW_DBA_TRUSTED_ROLE = 14; // use predefined trusted role
#ifdef TRUSTED_AUTH
const int IN_SW_DBA_TRUSTEDAUTH = 15; // trusted user name
const int IN_SW_DBA_TRUSTEDAUTH = 13; // trusted user name
#endif
const int IN_SW_DBA_FETCH_PASS = 16; // fetch password from file
const int IN_SW_DBA_ENCRYPTION = 17; // analyze pages encryption
const int IN_SW_DBA_HELP = 18; // show help
const int IN_SW_DBA_FETCH_PASS = 14; // fetch password from file
const int IN_SW_DBA_ENCRYPTION = 15; // analyze pages encryption
const int IN_SW_DBA_HELP = 16; // show help
const static struct Switches::in_sw_tab_t dba_in_sw_table[] =
{
@ -69,8 +67,6 @@ const static struct Switches::in_sw_tab_t dba_in_sw_table[] =
{IN_SW_DBA_RELATION, isc_spb_sts_table, "TABLE", 0,0,0, false, 35, 1, NULL}, // msg 35: -t tablename
// special switch to avoid including creation date, only for tests (no message)
{IN_SW_DBA_NOCREATION, isc_spb_sts_nocreation, "NOCREATION", 0,0,0, false, 0, 1, NULL}, // msg (ignored) -n suppress creation date
// {IN_SW_DBA_TRUSTED_USER, 0, TRUSTED_USER_SWITCH, 0,0,0, false, 0, TRUSTED_USER_SWITCH_LEN, NULL}, // msg 0 - ignored
// {IN_SW_DBA_TRUSTED_ROLE, 0, TRUSTED_ROLE_SWITCH, 0,0,0, false, 0, TRUSTED_ROLE_SWITCH_LEN, NULL}, // msg 0 - ignored
#ifdef TRUSTED_AUTH
{IN_SW_DBA_TRUSTEDAUTH, 0, "TRUSTED", 0,0,0, false, 36, 2, NULL}, // msg 36: -tr use trusted authentication
#endif

View File

@ -273,11 +273,10 @@ class NBackup
{
public:
NBackup(UtilSvc* _uSvc, const PathName& _database, const string& _username,
const string& _password, bool _run_db_triggers/*, const string& _trustedUser,
bool _trustedRole*/, bool _direct_io, const string& _deco)
const string& _password, bool _run_db_triggers, bool _direct_io, const string& _deco)
: uSvc(_uSvc), newdb(0), trans(0), database(_database),
username(_username), password(_password), /*trustedUser(_trustedUser),*/
run_db_triggers(_run_db_triggers), /*trustedRole(_trustedRole), */direct_io(_direct_io),
username(_username), password(_password),
run_db_triggers(_run_db_triggers), direct_io(_direct_io),
dbase(0), backup(0), decompress(_deco), childId(0), db_size_pages(0),
m_odsNumber(0), m_silent(false), m_printed(false)
{
@ -327,8 +326,8 @@ private:
isc_tr_handle trans; // transaction handle
PathName database;
string username, password/*, trustedUser*/;
bool run_db_triggers, /*trustedRole, */direct_io;
string username, password;
bool run_db_triggers, direct_io;
PathName dbname; // Database file name
PathName bakname;
@ -770,20 +769,6 @@ void NBackup::attach_database()
if (password.hasData())
dpb.insertString(isc_dpb_password, password);
/***
if (trustedUser.hasData())
{
uSvc->checkService();
dpb.insertString(isc_dpb_trusted_auth, trustedUser);
}
if (trustedRole)
{
uSvc->checkService();
dpb.insertString(isc_dpb_trusted_role, ADMIN_ROLE, strlen(ADMIN_ROLE));
}
***/
}
if (!run_db_triggers)
@ -1591,8 +1576,6 @@ void nbackup(UtilSvc* uSvc)
NBackup::BackupFiles backup_files;
int level;
bool print_size = false, version = false;
// string trustedUser;
// bool trustedRole = false;
string onOff;
const Switches switches(nbackup_action_in_sw_table, FB_NELEM(nbackup_action_in_sw_table),
@ -1615,20 +1598,6 @@ void nbackup(UtilSvc* uSvc)
switch (rc->in_sw)
{
/***
case IN_SW_NBK_TRUSTED_USER:
uSvc->checkService();
if (++itr >= argc)
missingParameterForSwitch(uSvc, argv[itr - 1]);
trustedUser = argv[itr];
break;
case IN_SW_NBK_TRUSTED_ROLE:
uSvc->checkService();
trustedRole = true;
break;
***/
case IN_SW_NBK_USER_NAME:
if (++itr >= argc)
missingParameterForSwitch(uSvc, argv[itr - 1]);
@ -1798,7 +1767,7 @@ void nbackup(UtilSvc* uSvc)
usage(uSvc, isc_nbackup_size_with_lock);
}
NBackup nbk(uSvc, database, username, password, run_db_triggers, /*trustedUser, trustedRole, */direct_io, decompress);
NBackup nbk(uSvc, database, username, password, run_db_triggers, direct_io, decompress);
try
{
switch (op)

View File

@ -44,11 +44,9 @@ const int IN_SW_NBK_PASSWORD = 8;
const int IN_SW_NBK_SIZE = 9;
const int IN_SW_NBK_FETCH = 10;
const int IN_SW_NBK_VERSION = 11;
const int IN_SW_NBK_TRUSTED_USER = 12;
const int IN_SW_NBK_TRUSTED_ROLE = 13;
const int IN_SW_NBK_HELP = 14;
const int IN_SW_NBK_DIRECT = 15;
const int IN_SW_NBK_DECOMPRESS = 16;
const int IN_SW_NBK_HELP = 12;
const int IN_SW_NBK_DIRECT = 13;
const int IN_SW_NBK_DECOMPRESS = 14;
static const struct Switches::in_sw_tab_t nbackup_in_sw_table [] =
@ -77,8 +75,6 @@ static const struct Switches::in_sw_tab_t nbackup_action_in_sw_table [] =
{IN_SW_NBK_PASSWORD, 0, "PASSWORD", 0, 0, 0, false, 14, 1, NULL, nboGeneral},
{IN_SW_NBK_FETCH, 0, "FETCH_PASSWORD", 0, 0, 0, false, 15, 2, NULL, nboGeneral},
{IN_SW_NBK_VERSION, 0, "Z", 0, 0, 0, false, 18, 1, NULL, nboGeneral},
// {IN_SW_NBK_TRUSTED_USER, 0, TRUSTED_USER_SWITCH, 0, 0, 0, false, 0, TRUSTED_USER_SWITCH_LEN, NULL, nboGeneral},
// {IN_SW_NBK_TRUSTED_ROLE, 0, TRUSTED_ROLE_SWITCH, 0, 0, 0, false, 0, TRUSTED_ROLE_SWITCH_LEN, NULL, nboGeneral},
{IN_SW_NBK_HELP, 0, "?", 0, 0, 0, false, 0, 1, NULL, 0},
{IN_SW_NBK_0, 0, NULL, 0, 0, 0, false, 0, 0, NULL, 0} // End of List
};