| 2489 | |
| 2490 | |
| 2491 | static void attach_database(rem_port* port, P_OP operation, P_ATCH* attach, PACKET* send) |
| 2492 | { |
| 2493 | /************************************** |
| 2494 | * |
| 2495 | * a t t a c h _ d a t a b a s e |
| 2496 | * |
| 2497 | ************************************** |
| 2498 | * |
| 2499 | * Functional description |
| 2500 | * Process an attach or create packet. |
| 2501 | * |
| 2502 | **************************************/ |
| 2503 | WIRECRYPT_DEBUG(fprintf(stderr, "Line encryption %sabled on attach\n", port->port_crypt_complete ? "en" : "dis")); |
| 2504 | if (port->port_crypt_level == WIRECRYPT_REQUIRED && !port->port_crypt_complete) |
| 2505 | { |
| 2506 | Arg::Gds(isc_miss_wirecrypt).raise(); |
| 2507 | } |
| 2508 | |
| 2509 | ClumpletWriter* wrt = FB_NEW_POOL(*getDefaultMemoryPool()) ClumpletWriter(*getDefaultMemoryPool(), |
| 2510 | ClumpletReader::dpbList, MAX_DPB_SIZE, attach->p_atch_dpb.cstr_address, |
| 2511 | attach->p_atch_dpb.cstr_length); |
| 2512 | |
| 2513 | port->port_srv_auth = FB_NEW DatabaseAuth(port, PathName(attach->p_atch_file.cstr_address, |
| 2514 | attach->p_atch_file.cstr_length), wrt, operation); |
| 2515 | |
| 2516 | if (port->port_srv_auth->authenticate(send)) |
| 2517 | { |
| 2518 | delete port->port_srv_auth; |
| 2519 | port->port_srv_auth = NULL; |
| 2520 | } |
| 2521 | } |
| 2522 | |
| 2523 | |
| 2524 | void DatabaseAuth::accept(PACKET* send, Auth::WriterImplementation* authBlock) |
no test coverage detected