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

Function INET_analyze

src/remote/inet.cpp:628–860  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

626
627
628rem_port* INET_analyze(ClntAuthBlock* cBlock,
629 const PathName& file_name,
630 const TEXT* node_name,
631 bool uv_flag,
632 ClumpletReader &dpb,
633 RefPtr<const Config>* config,
634 const PathName* ref_db_name,
635 ICryptKeyCallback* cryptCb,
636 int af)
637{
638/**************************************
639 *
640 * I N E T _ a n a l y z e
641 *
642 **************************************
643 *
644 * Functional description
645 * File_name is on node_name.
646 * Establish an external connection to node_name.
647 *
648 * If a connection is established, return a port block, otherwise
649 * return NULL.
650 *
651 * If the "uv_flag" is non-zero, user verification also takes place.
652 *
653 **************************************/
654 // We need to establish a connection to a remote server. Allocate the necessary
655 // blocks and get ready to go.
656
657 Rdb* rdb = FB_NEW Rdb;
658 PACKET* packet = &rdb->rdb_packet;
659
660 // Pick up some user identification information
661 ClumpletWriter user_id(ClumpletReader::UnTagged, 64000);
662 if (cBlock)
663 {
664 cBlock->extractDataFromPluginTo(user_id);
665 }
666
667 string buffer;
668 int eff_gid;
669 int eff_uid;
670
671 ISC_get_user(&buffer, &eff_uid, &eff_gid);
672#ifdef WIN_NT
673 // XNET lowercases user names (as it's always case-insensitive in Windows),
674 // so let's be consistent and use the same trick for INET as well
675 buffer.lower();
676#endif
677 ISC_systemToUtf8(buffer);
678 user_id.insertString(CNCT_user, buffer);
679
680 ISC_get_host(buffer);
681 buffer.lower();
682 ISC_systemToUtf8(buffer);
683 user_id.insertString(CNCT_host, buffer);
684
685 if ((eff_uid == -1) || uv_flag) {

Callers 1

analyzeFunction · 0.85

Calls 15

ISC_get_userFunction · 0.85
ISC_systemToUtf8Function · 0.85
ISC_get_hostFunction · 0.85
checkCompressionFunction · 0.85
inet_try_connectFunction · 0.85
REMOTE_free_packetFunction · 0.85
REMOTE_check_responseFunction · 0.85
GdsClass · 0.85
REMOTE_make_stringFunction · 0.85
lowerMethod · 0.80
storeDataForPluginMethod · 0.80
addServerKeysMethod · 0.80

Tested by

no test coverage detected