GRANT syntax for SHOWDDL output incorrect

Bug #1450200 reported by Roberta Marton
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Trafodion
Fix Committed
High
Roberta Marton

Bug Description

There are several issues related to SHOWDDL of functions.

If SHOWDDL function <name> is performed and authorization is not enabled, then the operations should succeed, instead the following error is reported:

showddl function translateBitmap;

*** ERROR[4082] Object TRAFODION."_PRIVMGR_MD_".OBJECT_PRIVILEGES does not exist or is inaccessible.

If SHOWDDL function <name> is performed then the GRANT output is incorrect:
the keyword FUNCTION is needed before the function name.

CREATE FUNCTION TRAFODION.SCH.T134_TRANSLATEPRIVSBITMAP
  (
    IN BITMAP LARGEINT
  )
  RETURNS
  (
    OUT BITMAP_STRING CHAR(20) CHARACTER SET ISO88591
  )
 . . .
  SAFE EXECUTION MODE
  ;

-- GRANT EXECUTE ON TRAFODION.SCH.T134_TRANSLATEPRIVSBITMAP TO DB__ROOT WITH GRANT OPTION;
  GRANT EXECUTE ON TRAFODION.SCH.T134_TRANSLATEPRIVSBITMAP TO SQL_USER2;

If a privilege is granted to PUBLIC, then the GRANT statement is incorrect, PUBLIC should be enclosed in double quotes:

CREATE FUNCTION TRAFODION.SCH.T134_TRANSLATEPRIVSBITMAP
  (
    IN BITMAP LARGEINT
  )
  RETURNS
  (
    OUT BITMAP_STRING CHAR(20) CHARACTER SET ISO88591
  )
  . . .
  SAFE EXECUTION MODE
  ;

-- GRANT EXECUTE ON TRAFODION.SCH.T134_TRANSLATEPRIVSBITMAP TO DB__ROOT WITH GRANT OPTION;
  GRANT EXECUTE ON TRAFODION.SCH.T134_TRANSLATEPRIVSBITMAP TO PUBLIC;
GRANT
  EXECUTE ON TRAFODION.SCH.T134_TRANSLATEPRIVSBITMAP TO SQL_USER2;

Tags: sql-security
Changed in trafodion:
importance: Undecided → High
assignee: nobody → Roberta Marton (roberta-marton)
milestone: none → r2.0
tags: added: sql-security
Changed in trafodion:
status: New → In Progress
Revision history for this message
Roberta Marton (roberta-marton) wrote :

Fixed the OBJECT_PRIVILEGES error returned
But public does not need to be enclosed in double quotes. The code handles this name correctly.

Changed in trafodion:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.