mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 18:43:02 +01:00
Misc
This commit is contained in:
parent
00e0197683
commit
a5ff7ca091
@ -21,12 +21,12 @@ Document date: 2008-11-30
|
||||
|
||||
All utilities have new switch
|
||||
-fetch_password
|
||||
which may be abbreviated according with ulitity rules.
|
||||
which may be abbreviated according with utility rules.
|
||||
The exception is QLI, where -F should be used.
|
||||
|
||||
Switch has required parameter - name of file with password. I.e.:
|
||||
isql -user sysdba -fet passfile server:employee
|
||||
will load password form file "passfile", using it's first line
|
||||
will load password form file "passfile", using its first line
|
||||
as password.
|
||||
|
||||
One can specify "stdin" as file name to make password be read
|
||||
|
@ -91,7 +91,7 @@ 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
|
||||
|
||||
const int IN_SW_BURP_FETCHPASS = 45; // fetch default password to use on attach from file
|
||||
const int IN_SW_BURP_FETCHPASS = 45; // fetch default password from file to use on attach
|
||||
|
||||
/**************************************************************************/
|
||||
// used 0BCDEFGILMNOPRSTUVYZ available AHJQWX
|
||||
|
@ -688,7 +688,7 @@ namespace {
|
||||
class FileClose
|
||||
{
|
||||
public:
|
||||
static void clear(FILE *f)
|
||||
static void clear(FILE* f)
|
||||
{
|
||||
if (f && f != stdin) {
|
||||
fclose(f);
|
||||
|
@ -84,7 +84,7 @@ enum in_sw_values
|
||||
#ifdef TRUSTED_AUTH
|
||||
IN_SW_GDEF_TRUSTED, // trusted auth
|
||||
#endif
|
||||
IN_SW_GDEF_FETCH_PASS, // fetch password from file
|
||||
IN_SW_GDEF_FETCH_PASS // fetch password from file
|
||||
};
|
||||
|
||||
static const in_sw_tab_t gdef_in_sw_table[] =
|
||||
@ -293,10 +293,9 @@ int CLIB_ROUTINE main( int argc, char* argv[])
|
||||
|
||||
case IN_SW_GDEF_FETCH_PASS:
|
||||
if (argc > 1) {
|
||||
if (fb_utils::fetchPassword(*++argv, dudleyGlob.DDL_default_password)
|
||||
!= fb_utils::FETCH_PASS_OK)
|
||||
if (fb_utils::fetchPassword(*++argv, dudleyGlob.DDL_default_password) != fb_utils::FETCH_PASS_OK)
|
||||
{
|
||||
DDL_msg_put(345); /* msg 4: gdef: Error fetching passwird from file */
|
||||
DDL_msg_put(345); // msg 4: gdef: Error fetching password from file
|
||||
DDL_exit(FINI_ERROR);
|
||||
}
|
||||
argc--;
|
||||
|
@ -1915,10 +1915,9 @@ static bool get_switches(int argc,
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (fb_utils::fetchPassword(*++argv, gpreGlob.default_password) !=
|
||||
fb_utils::FETCH_PASS_OK)
|
||||
if (fb_utils::fetchPassword(*++argv, gpreGlob.default_password) != fb_utils::FETCH_PASS_OK)
|
||||
{
|
||||
fprintf(stderr, "--fetch_password : error loading password from file\n ");
|
||||
fprintf(stderr, "-fetch_password: error loading password from file\n ");
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -159,7 +159,7 @@ private:
|
||||
void release_vector() throw();
|
||||
};
|
||||
|
||||
// use this class if exception can be handled
|
||||
// use this class if exception can be handled
|
||||
class system_error : public status_exception
|
||||
{
|
||||
private:
|
||||
|
@ -6838,7 +6838,7 @@ static processing_state parse_arg(int argc,
|
||||
|
||||
case SWITCH_FETCHPASS:
|
||||
{
|
||||
const char* pass = 0;
|
||||
const char* pass = NULL;
|
||||
fb_utils::FetchPassResult rez = fb_utils::fetchPassword(swarg_str, pass);
|
||||
if (rez == fb_utils::FETCH_PASS_OK)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user