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

Function attach_database

src/remote/server/server.cpp:2491–2521  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2489
2490
2491static 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
2524void DatabaseAuth::accept(PACKET* send, Auth::WriterImplementation* authBlock)

Callers 5

process_packetFunction · 0.85
lock_databaseMethod · 0.85
unlock_databaseMethod · 0.85
backup_databaseMethod · 0.85
restore_databaseMethod · 0.85

Calls 6

GdsClass · 0.85
getDefaultMemoryPoolFunction · 0.85
DatabaseAuthClass · 0.85
ClumpletWriterClass · 0.50
raiseMethod · 0.45
authenticateMethod · 0.45

Tested by

no test coverage detected