| 6799 | |
| 6800 | |
| 6801 | static 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 | |
| 6835 | static void set_system_flag(thread_db* tdbb, Record* record, USHORT field_id) |