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

Function set_security_class

src/jrd/vio.cpp:6801–6832  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6799
6800
6801static bool set_security_class(thread_db* tdbb, Record* record, USHORT field_id)
6802{
6803/**************************************
6804 *
6805 * s e t _ s e c u r i t y _ c l a s s
6806 *
6807 **************************************
6808 *
6809 * Functional description
6810 * Generate the security class name.
6811 *
6812 **************************************/
6813 dsc desc1;
6814
6815 if (tdbb->tdbb_flags & TDBB_no_security_class)
6816 return false;
6817
6818 if (!EVL_field(0, record, field_id, &desc1))
6819 {
6820 const SINT64 value = DYN_UTIL_gen_unique_id(tdbb, drq_g_nxt_sec_id, SQL_SECCLASS_GENERATOR);
6821 MetaName name;
6822 name.printf("%s%" SQUADFORMAT, SQL_SECCLASS_PREFIX, value);
6823 dsc desc2;
6824 desc2.makeText((USHORT) name.length(), CS_ASCII, (UCHAR*) name.c_str());
6825 MOV_move(tdbb, &desc2, &desc1);
6826 record->clearNull(field_id);
6827
6828 return true;
6829 }
6830
6831 return false;
6832}
6833
6834
6835static void set_system_flag(thread_db* tdbb, Record* record, USHORT field_id)

Callers 1

VIO_storeFunction · 0.85

Calls 7

EVL_fieldFunction · 0.85
MOV_moveFunction · 0.85
makeTextMethod · 0.80
printfMethod · 0.45
lengthMethod · 0.45
c_strMethod · 0.45
clearNullMethod · 0.45

Tested by

no test coverage detected