diff options
author | Robert Haas <rhaas@postgresql.org> | 2010-09-27 20:55:27 -0400 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2010-09-27 20:55:27 -0400 |
commit | 4d355a8336e0f2265b31d678ffd1ee5cf9e79fae (patch) | |
tree | 9ab7e59c81ca1a8417ea2bfe8b3c11e232f3a9ee /src/include/catalog/pg_seclabel.h | |
parent | 2ce003973db82205cec55d596d51e957293019d1 (diff) | |
download | postgresql-4d355a8336e0f2265b31d678ffd1ee5cf9e79fae.tar.gz |
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
Diffstat (limited to 'src/include/catalog/pg_seclabel.h')
-rw-r--r-- | src/include/catalog/pg_seclabel.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/include/catalog/pg_seclabel.h b/src/include/catalog/pg_seclabel.h new file mode 100644 index 0000000000..1fd7451ad0 --- /dev/null +++ b/src/include/catalog/pg_seclabel.h @@ -0,0 +1,43 @@ +/* ------------------------------------------------------------------------- + * + * pg_seclabel.h + * definition of the system "security label" relation (pg_seclabel) + * + * Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group + * Portions Copyright (c) 1994, Regents of the University of California + * + * ------------------------------------------------------------------------- + */ +#ifndef PG_SECLABEL_H +#define PG_SECLABEL_H + +#include "catalog/genbki.h" + +/* ---------------- + * pg_seclabel definition. cpp turns this into + * typedef struct FormData_pg_seclabel + * ---------------- + */ +#define SecLabelRelationId 3037 + +CATALOG(pg_seclabel,3037) BKI_WITHOUT_OIDS +{ + Oid objoid; /* OID of the object itself */ + Oid classoid; /* OID of table containing the object */ + int4 objsubid; /* column number, or 0 if not used */ + text provider; /* name of label provider */ + text label; /* security label of the object */ +} FormData_pg_seclabel; + +/* ---------------- + * compiler constants for pg_seclabel + * ---------------- + */ +#define Natts_pg_seclabel 5 +#define Anum_pg_seclabel_objoid 1 +#define Anum_pg_seclabel_classoid 2 +#define Anum_pg_seclabel_objsubid 3 +#define Anum_pg_seclabel_provider 4 +#define Anum_pg_seclabel_label 5 + +#endif /* PG_SECLABEL_H */ |