mirror of
https://github.com/postgres/postgres.git
synced 2025-07-02 09:02:37 +03:00
Add a SECURITY LABEL command.
This is intended as infrastructure to support integration with label-based mandatory access control systems such as SE-Linux. Further changes (mostly hooks) will be needed, but this is a big chunk of it. KaiGai Kohei and Robert Haas
This commit is contained in:
@ -2607,6 +2607,20 @@ _copyCommentStmt(CommentStmt *from)
|
||||
return newnode;
|
||||
}
|
||||
|
||||
static SecLabelStmt *
|
||||
_copySecLabelStmt(SecLabelStmt *from)
|
||||
{
|
||||
SecLabelStmt *newnode = makeNode(SecLabelStmt);
|
||||
|
||||
COPY_SCALAR_FIELD(objtype);
|
||||
COPY_NODE_FIELD(objname);
|
||||
COPY_NODE_FIELD(objargs);
|
||||
COPY_STRING_FIELD(provider);
|
||||
COPY_STRING_FIELD(label);
|
||||
|
||||
return newnode;
|
||||
}
|
||||
|
||||
static FetchStmt *
|
||||
_copyFetchStmt(FetchStmt *from)
|
||||
{
|
||||
@ -3958,6 +3972,9 @@ copyObject(void *from)
|
||||
case T_CommentStmt:
|
||||
retval = _copyCommentStmt(from);
|
||||
break;
|
||||
case T_SecLabelStmt:
|
||||
retval = _copySecLabelStmt(from);
|
||||
break;
|
||||
case T_FetchStmt:
|
||||
retval = _copyFetchStmt(from);
|
||||
break;
|
||||
|
Reference in New Issue
Block a user