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

Function CMP_post_procedure_access

src/jrd/cmp.cpp:462–504  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

460
461
462void CMP_post_procedure_access(thread_db* tdbb, CompilerScratch* csb, jrd_prc* procedure)
463{
464/**************************************
465 *
466 * C M P _ p o s t _ p r o c e d u r e _ a c c e s s
467 *
468 **************************************
469 *
470 * Functional description
471 *
472 * The request will inherit access requirements to all the objects
473 * the called stored procedure has access requirements for.
474 *
475 **************************************/
476 SET_TDBB(tdbb);
477
478 DEV_BLKCHK(csb, type_csb);
479
480 // allow all access to internal requests
481
482 if (csb->csb_g_flags & (csb_internal | csb_ignore_perm))
483 return;
484
485 // this request must have EXECUTE permission on the stored procedure
486 if (procedure->getName().package.isEmpty())
487 {
488 CMP_post_access(tdbb, csb, procedure->getSecurityName(),
489 (csb->csb_view ? csb->csb_view->rel_id : 0),
490 SCL_execute, obj_procedures, procedure->getName().identifier);
491 }
492 else
493 {
494 CMP_post_access(tdbb, csb, procedure->getSecurityName(),
495 (csb->csb_view ? csb->csb_view->rel_id : 0),
496 SCL_execute, obj_packages, procedure->getName().package);
497 }
498
499 // Add the procedure to list of external objects accessed
500 ExternalAccess temp(ExternalAccess::exa_procedure, procedure->getId());
501 FB_SIZE_T idx;
502 if (!csb->csb_external.find(temp, idx))
503 csb->csb_external.insert(idx, temp);
504}
505
506
507RecordSource* CMP_post_rse(thread_db* tdbb, CompilerScratch* csb, RseNode* rse)

Callers 2

pass1Method · 0.85
pass1SourceMethod · 0.85

Calls 7

SET_TDBBFunction · 0.85
CMP_post_accessFunction · 0.85
isEmptyMethod · 0.45
getNameMethod · 0.45
getIdMethod · 0.45
findMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected