8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 21:23:04 +01:00
This commit is contained in:
asfernandes 2008-12-01 01:26:27 +00:00
parent 00e0197683
commit a5ff7ca091
7 changed files with 11 additions and 13 deletions

View File

@ -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

View File

@ -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

View File

@ -688,7 +688,7 @@ namespace {
class FileClose
{
public:
static void clear(FILE *f)
static void clear(FILE* f)
{
if (f && f != stdin) {
fclose(f);

View File

@ -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--;

View File

@ -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;

View File

@ -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)
{