mirror of
https://github.com/postgres/postgres.git
synced 2025-11-10 17:42:29 +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:
@@ -1163,6 +1163,18 @@ _equalCommentStmt(CommentStmt *a, CommentStmt *b)
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
_equalSecLabelStmt(SecLabelStmt *a, SecLabelStmt *b)
|
||||
{
|
||||
COMPARE_SCALAR_FIELD(objtype);
|
||||
COMPARE_NODE_FIELD(objname);
|
||||
COMPARE_NODE_FIELD(objargs);
|
||||
COMPARE_STRING_FIELD(provider);
|
||||
COMPARE_STRING_FIELD(label);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
_equalFetchStmt(FetchStmt *a, FetchStmt *b)
|
||||
{
|
||||
@@ -2624,6 +2636,9 @@ equal(void *a, void *b)
|
||||
case T_CommentStmt:
|
||||
retval = _equalCommentStmt(a, b);
|
||||
break;
|
||||
case T_SecLabelStmt:
|
||||
retval = _equalSecLabelStmt(a, b);
|
||||
break;
|
||||
case T_FetchStmt:
|
||||
retval = _equalFetchStmt(a, b);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user