| 6390 | |
| 6391 | |
| 6392 | ISC_STATUS rem_port::service_attach(const char* service_name, |
| 6393 | ClumpletWriter* spb, |
| 6394 | PACKET* sendL) |
| 6395 | { |
| 6396 | /************************************** |
| 6397 | * |
| 6398 | * s e r v i c e _ a t t a c h |
| 6399 | * |
| 6400 | ************************************** |
| 6401 | * |
| 6402 | * Functional description |
| 6403 | * Connect to a Firebird service. |
| 6404 | * |
| 6405 | **************************************/ |
| 6406 | // Now insert additional clumplets into spb |
| 6407 | addClumplets(spb, spbParam, this); |
| 6408 | |
| 6409 | for (spb->rewind(); !spb->isEof();) |
| 6410 | { |
| 6411 | switch (spb->getClumpTag()) |
| 6412 | { |
| 6413 | // remove old-style logon parameters |
| 6414 | case isc_spb_user_name: |
| 6415 | case isc_spb_password: |
| 6416 | case isc_spb_password_enc: |
| 6417 | |
| 6418 | // remove trusted auth & trusted role if present (security measure) |
| 6419 | case isc_spb_trusted_role: |
| 6420 | case isc_spb_trusted_auth: |
| 6421 | |
| 6422 | // remove user config info (security measure) |
| 6423 | case isc_spb_config: |
| 6424 | spb->deleteClumplet(); |
| 6425 | break; |
| 6426 | |
| 6427 | default: |
| 6428 | spb->moveNext(); |
| 6429 | break; |
| 6430 | } |
| 6431 | } |
| 6432 | |
| 6433 | // See if user has specified parameters relevant to the connection, |
| 6434 | // they will be stuffed in the SPB if so. |
| 6435 | REMOTE_get_timeout_params(this, spb); |
| 6436 | |
| 6437 | DispatcherPtr provider; |
| 6438 | LocalStatus ls; |
| 6439 | CheckStatusWrapper status_vector(&ls); |
| 6440 | |
| 6441 | fb_assert(port_server_crypt_callback); |
| 6442 | provider->setDbCryptCallback(&status_vector, port_server_crypt_callback->getInterface()); |
| 6443 | |
| 6444 | if (!(status_vector.getState() & IStatus::STATE_ERRORS)) |
| 6445 | { |
| 6446 | dumpAuthBlock("rem_port::service_attach()", spb, isc_spb_auth_block); |
| 6447 | ServService iface(provider->attachServiceManager(&status_vector, service_name, |
| 6448 | (ULONG) spb->getBufferLength(), spb->getBuffer())); |
| 6449 |
no test coverage detected