MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / processFetchPass

Function processFetchPass

src/burp/burp.cpp:2930–2960  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2928}
2929
2930static void processFetchPass(const SCHAR*& password, int& itr, const int argc, Firebird::UtilSvc::ArgvType& argv)
2931{
2932 if (++itr >= argc)
2933 {
2934 BURP_error(189, true);
2935 // password parameter missing
2936 }
2937 if (password)
2938 {
2939 BURP_error(307, true);
2940 // too many passwords provided
2941 }
2942
2943 switch (fb_utils::fetchPassword(argv[itr], password))
2944 {
2945 case fb_utils::FETCH_PASS_OK:
2946 break;
2947 case fb_utils::FETCH_PASS_FILE_OPEN_ERROR:
2948 BURP_error(308, true, MsgFormat::SafeArg() << argv[itr] << errno);
2949 // error @2 opening password file @1
2950 break;
2951 case fb_utils::FETCH_PASS_FILE_READ_ERROR:
2952 BURP_error(309, true, MsgFormat::SafeArg() << argv[itr] << errno);
2953 // error @2 reading password file @1
2954 break;
2955 case fb_utils::FETCH_PASS_FILE_EMPTY:
2956 BURP_error(310, true, MsgFormat::SafeArg() << argv[itr]);
2957 // password file @1 is empty
2958 break;
2959 }
2960}

Callers 2

svc_api_gbakFunction · 0.85
gbakFunction · 0.85

Calls 3

BURP_errorFunction · 0.85
fetchPasswordFunction · 0.85
SafeArgClass · 0.50

Tested by

no test coverage detected