mirror of
https://github.com/postgres/postgres.git
synced 2025-10-16 17:07:43 +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:
@@ -2275,6 +2275,10 @@ _tocEntryRequired(TocEntry *te, RestoreOptions *ropt, bool include_acls)
|
||||
if ((!include_acls || ropt->aclsSkip) && _tocEntryIsACL(te))
|
||||
return 0;
|
||||
|
||||
/* If it's security labels, maybe ignore it */
|
||||
if (ropt->skip_seclabel && strcmp(te->desc, "SECURITY LABEL") == 0)
|
||||
return 0;
|
||||
|
||||
/* Ignore DATABASE entry unless we should create it */
|
||||
if (!ropt->createDB && strcmp(te->desc, "DATABASE") == 0)
|
||||
return 0;
|
||||
@@ -2341,6 +2345,8 @@ _tocEntryRequired(TocEntry *te, RestoreOptions *ropt, bool include_acls)
|
||||
(strcmp(te->desc, "ACL") == 0 &&
|
||||
strncmp(te->tag, "LARGE OBJECT ", 13) == 0) ||
|
||||
(strcmp(te->desc, "COMMENT") == 0 &&
|
||||
strncmp(te->tag, "LARGE OBJECT ", 13) == 0) ||
|
||||
(strcmp(te->desc, "SECURITY LABEL") == 0 &&
|
||||
strncmp(te->tag, "LARGE OBJECT ", 13) == 0))
|
||||
res = res & REQ_DATA;
|
||||
else
|
||||
|
Reference in New Issue
Block a user