@@ -273,6 +273,7 @@ void Service::getOptions(ClumpletReader& spb)
273273 {
274274 case isc_spb_user_name:
275275 spb.getString (svc_username);
276+ svc_orig_username = svc_username;
276277 fb_utils::dpbItemUpper (svc_username);
277278 break ;
278279
@@ -694,8 +695,8 @@ Service::Service(const TEXT* service_name, USHORT spb_length, const UCHAR* spb_d
694695 svc_resp_alloc(getPool()), svc_resp_buf(0 ), svc_resp_ptr(0 ), svc_resp_buf_len(0 ),
695696 svc_resp_len(0 ), svc_flags(SVC_finished), svc_user_flag(0 ), svc_spb_version(0 ),
696697 svc_shutdown_server(false ), svc_shutdown_request(false ),
697- svc_shutdown_in_progress(false ), svc_timeout(false ),
698- svc_username (getPool()), svc_sql_role(getPool()), svc_auth_block(getPool()),
698+ svc_shutdown_in_progress(false ), svc_timeout(false ), svc_username(getPool()),
699+ svc_orig_username (getPool()), svc_sql_role(getPool()), svc_auth_block(getPool()),
699700 svc_expected_db(getPool()), svc_trusted_role(false ), svc_utf8(false ),
700701 svc_switches(getPool()), svc_perm_sw(getPool()), svc_address_path(getPool()),
701702 svc_command_line(getPool()), svc_parallel_workers(0 ),
@@ -2067,17 +2068,15 @@ void Service::start(USHORT spb_length, const UCHAR* spb_data)
20672068 if (svc_username.hasData ())
20682069 {
20692070 string auth = " -user " ;
2070- auth += svc_username;
2071- auth += ' ' ;
2071+ UtilSvc::addStringWithSvcTrmntr (svc_orig_username, auth);
20722072 svc_switches = auth + svc_switches;
20732073 }
20742074 }
20752075
20762076 if (svc_sql_role.hasData ())
20772077 {
20782078 string auth = " -role " ;
2079- auth += svc_sql_role;
2080- auth += ' ' ;
2079+ UtilSvc::addStringWithSvcTrmntr (svc_sql_role, auth);
20812080 svc_switches = auth + svc_switches;
20822081 }
20832082 }
0 commit comments