Skip to content

Commit

Permalink
Fixed CORE-927: Grants don't work for procedures used inside views.
Browse files Browse the repository at this point in the history
  • Loading branch information
dyemanov committed Dec 6, 2011
1 parent 5c980cb commit 6706f10
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/jrd/cmp.cpp
Expand Up @@ -6164,12 +6164,9 @@ static void post_procedure_access(thread_db* tdbb, CompilerScratch* csb, jrd_prc
if (csb->csb_g_flags & (csb_internal | csb_ignore_perm))
return;

const TEXT* prc_sec_name =
(procedure->prc_security_name.length() > 0 ? procedure->prc_security_name.c_str() : NULL);

// this request must have EXECUTE permission on the stored procedure
CMP_post_access(tdbb, csb, prc_sec_name, 0, SCL_execute, object_procedure,
procedure->prc_name);
CMP_post_access(tdbb, csb, procedure->prc_security_name, csb->csb_view ? csb->csb_view->rel_id : 0,
SCL_execute, object_procedure, procedure->prc_name);

// Add the procedure to list of external objects accessed
ExternalAccess temp(procedure->prc_id);
Expand Down

0 comments on commit 6706f10

Please sign in to comment.