diff options
Diffstat (limited to 'contrib/sepgsql')
-rw-r--r-- | contrib/sepgsql/expected/alter.out | 18 | ||||
-rw-r--r-- | contrib/sepgsql/expected/ddl.out | 6 | ||||
-rw-r--r-- | contrib/sepgsql/label.c | 8 | ||||
-rw-r--r-- | contrib/sepgsql/sql/alter.sql | 4 | ||||
-rw-r--r-- | contrib/sepgsql/sql/ddl.sql | 3 |
5 files changed, 7 insertions, 32 deletions
diff --git a/contrib/sepgsql/expected/alter.out b/contrib/sepgsql/expected/alter.out index e1d31e5b2fa..b27274d83ec 100644 --- a/contrib/sepgsql/expected/alter.out +++ b/contrib/sepgsql/expected/alter.out @@ -212,16 +212,6 @@ ALTER TABLE regtest_table ENABLE TRIGGER regtest_test_trig; -- not supported CREATE RULE regtest_test_rule AS ON INSERT TO regtest_table_3 DO ALSO NOTHING; ALTER TABLE regtest_table_3 DISABLE RULE regtest_test_rule; -- not supported ALTER TABLE regtest_table_3 ENABLE RULE regtest_test_rule; -- not supported -ALTER TABLE regtest_table SET WITH OIDS; -LOG: SELinux: allowed { create } scontext=unconfined_u:unconfined_r:sepgsql_regtest_superuser_t:s0 tcontext=unconfined_u:object_r:sepgsql_table_t:s0 tclass=db_column name="regtest_schema_2.regtest_table.oid" -LOG: SELinux: allowed { create } scontext=unconfined_u:unconfined_r:sepgsql_regtest_superuser_t:s0 tcontext=unconfined_u:object_r:sepgsql_table_t:s0 tclass=db_column name="regtest_schema.regtest_table_2.oid" -ALTER TABLE regtest_table SET WITHOUT OIDS; -LOG: SELinux: allowed { drop } scontext=unconfined_u:unconfined_r:sepgsql_regtest_superuser_t:s0 tcontext=unconfined_u:object_r:sepgsql_table_t:s0 tclass=db_column name="regtest_schema.regtest_table_2.oid" -LOG: SELinux: allowed { drop } scontext=unconfined_u:unconfined_r:sepgsql_regtest_superuser_t:s0 tcontext=unconfined_u:object_r:sepgsql_table_t:s0 tclass=db_column name="regtest_schema_2.regtest_table.oid" -ALTER TABLE regtest_table SET (fillfactor = 75); -LOG: SELinux: allowed { setattr } scontext=unconfined_u:unconfined_r:sepgsql_regtest_superuser_t:s0 tcontext=unconfined_u:object_r:sepgsql_table_t:s0 tclass=db_table name="regtest_schema_2.regtest_table" -ALTER TABLE regtest_table RESET (fillfactor); -LOG: SELinux: allowed { setattr } scontext=unconfined_u:unconfined_r:sepgsql_regtest_superuser_t:s0 tcontext=unconfined_u:object_r:sepgsql_table_t:s0 tclass=db_table name="regtest_schema_2.regtest_table" ALTER TABLE regtest_table_2 NO INHERIT regtest_table; -- not supported ALTER TABLE regtest_table_2 INHERIT regtest_table; -- not supported ALTER TABLE regtest_table SET TABLESPACE pg_default; @@ -265,14 +255,6 @@ LOG: SELinux: allowed { setattr } scontext=unconfined_u:unconfined_r:sepgsql_re LOG: SELinux: allowed { setattr } scontext=unconfined_u:unconfined_r:sepgsql_regtest_superuser_t:s0 tcontext=unconfined_u:object_r:sepgsql_table_t:s0 tclass=db_column name="regtest_schema.regtest_ptable_1_tens.p" ALTER TABLE regtest_ptable ADD CONSTRAINT test_ck CHECK (p like '%abc%') NOT VALID; -- not supported by sepgsql ALTER TABLE regtest_ptable DROP CONSTRAINT test_ck; -- not supported by sepgsql -ALTER TABLE regtest_ptable SET WITH OIDS; -LOG: SELinux: allowed { create } scontext=unconfined_u:unconfined_r:sepgsql_regtest_superuser_t:s0 tcontext=unconfined_u:object_r:sepgsql_table_t:s0 tclass=db_column name="regtest_schema_2.regtest_ptable.oid" -LOG: SELinux: allowed { create } scontext=unconfined_u:unconfined_r:sepgsql_regtest_superuser_t:s0 tcontext=unconfined_u:object_r:sepgsql_table_t:s0 tclass=db_column name="regtest_schema_2.regtest_table_part.oid" -LOG: SELinux: allowed { create } scontext=unconfined_u:unconfined_r:sepgsql_regtest_superuser_t:s0 tcontext=unconfined_u:object_r:sepgsql_table_t:s0 tclass=db_column name="regtest_schema.regtest_ptable_1_tens.oid" -ALTER TABLE regtest_ptable SET WITHOUT OIDS; -LOG: SELinux: allowed { drop } scontext=unconfined_u:unconfined_r:sepgsql_regtest_superuser_t:s0 tcontext=unconfined_u:object_r:sepgsql_table_t:s0 tclass=db_column name="regtest_schema_2.regtest_table_part.oid" -LOG: SELinux: allowed { drop } scontext=unconfined_u:unconfined_r:sepgsql_regtest_superuser_t:s0 tcontext=unconfined_u:object_r:sepgsql_table_t:s0 tclass=db_column name="regtest_schema.regtest_ptable_1_tens.oid" -LOG: SELinux: allowed { drop } scontext=unconfined_u:unconfined_r:sepgsql_regtest_superuser_t:s0 tcontext=unconfined_u:object_r:sepgsql_table_t:s0 tclass=db_column name="regtest_schema_2.regtest_ptable.oid" ALTER TABLE regtest_ptable SET TABLESPACE pg_default; -- partitioned table child ALTER TABLE regtest_table_part ALTER p SET DEFAULT 'abcd'; -- not supported by sepgsql diff --git a/contrib/sepgsql/expected/ddl.out b/contrib/sepgsql/expected/ddl.out index 1c0409a7a65..9c5c6061390 100644 --- a/contrib/sepgsql/expected/ddl.out +++ b/contrib/sepgsql/expected/ddl.out @@ -61,9 +61,9 @@ LINE 1: ALTER TABLE regtest_table ADD COLUMN z int; ^ LOG: SELinux: allowed { search } scontext=unconfined_u:unconfined_r:sepgsql_regtest_superuser_t:s0 tcontext=system_u:object_r:sepgsql_schema_t:s0 tclass=db_schema name="pg_catalog" LOG: SELinux: allowed { create } scontext=unconfined_u:unconfined_r:sepgsql_regtest_superuser_t:s0 tcontext=unconfined_u:object_r:sepgsql_table_t:s0 tclass=db_column name="regtest_schema.regtest_table.z" -CREATE TABLE regtest_table_2 (a int) WITH OIDS; +CREATE TABLE regtest_table_2 (a int); LOG: SELinux: allowed { search } scontext=unconfined_u:unconfined_r:sepgsql_regtest_superuser_t:s0 tcontext=system_u:object_r:sepgsql_schema_t:s0 tclass=db_schema name="pg_catalog" -LINE 1: CREATE TABLE regtest_table_2 (a int) WITH OIDS; +LINE 1: CREATE TABLE regtest_table_2 (a int); ^ LOG: SELinux: allowed { search } scontext=unconfined_u:unconfined_r:sepgsql_regtest_superuser_t:s0 tcontext=system_u:object_r:sepgsql_schema_t:s0 tclass=db_schema name="pg_catalog" LOG: SELinux: allowed { add_name } scontext=unconfined_u:unconfined_r:sepgsql_regtest_superuser_t:s0 tcontext=unconfined_u:object_r:sepgsql_schema_t:s0 tclass=db_schema name="regtest_schema" @@ -413,8 +413,6 @@ LOG: SELinux: allowed { remove_name } scontext=unconfined_u:unconfined_r:sepgsq LOG: SELinux: allowed { drop } scontext=unconfined_u:unconfined_r:sepgsql_regtest_superuser_t:s0 tcontext=unconfined_u:object_r:sepgsql_view_t:s0 tclass=db_view name="regtest_schema.regtest_view" ALTER TABLE regtest_table DROP COLUMN y; LOG: SELinux: allowed { drop } scontext=unconfined_u:unconfined_r:sepgsql_regtest_superuser_t:s0 tcontext=unconfined_u:object_r:sepgsql_table_t:s0 tclass=db_column name="regtest_schema.regtest_table.y" -ALTER TABLE regtest_table_2 SET WITHOUT OIDS; -LOG: SELinux: allowed { drop } scontext=unconfined_u:unconfined_r:sepgsql_regtest_superuser_t:s0 tcontext=unconfined_u:object_r:sepgsql_table_t:s0 tclass=db_column name="regtest_schema.regtest_table_2.oid" ALTER TABLE regtest_ptable DROP COLUMN q CASCADE; LOG: SELinux: allowed { drop } scontext=unconfined_u:unconfined_r:sepgsql_regtest_superuser_t:s0 tcontext=unconfined_u:object_r:sepgsql_table_t:s0 tclass=db_column name="regtest_schema.regtest_ptable_ones.q" LOG: SELinux: allowed { drop } scontext=unconfined_u:unconfined_r:sepgsql_regtest_superuser_t:s0 tcontext=unconfined_u:object_r:sepgsql_table_t:s0 tclass=db_column name="regtest_schema.regtest_ptable_tens.q" diff --git a/contrib/sepgsql/label.c b/contrib/sepgsql/label.c index dba0986e02a..acffc468d28 100644 --- a/contrib/sepgsql/label.c +++ b/contrib/sepgsql/label.c @@ -758,7 +758,7 @@ exec_object_restorecon(struct selabel_handle *sehnd, Oid catalogId) NULL, NULL, NULL); object.classId = DatabaseRelationId; - object.objectId = HeapTupleGetOid(tuple); + object.objectId = datForm->oid; object.objectSubId = 0; break; @@ -772,7 +772,7 @@ exec_object_restorecon(struct selabel_handle *sehnd, Oid catalogId) NULL, NULL); object.classId = NamespaceRelationId; - object.objectId = HeapTupleGetOid(tuple); + object.objectId = nspForm->oid; object.objectSubId = 0; break; @@ -797,7 +797,7 @@ exec_object_restorecon(struct selabel_handle *sehnd, Oid catalogId) pfree(namespace_name); object.classId = RelationRelationId; - object.objectId = HeapTupleGetOid(tuple); + object.objectId = relForm->oid; object.objectSubId = 0; break; @@ -838,7 +838,7 @@ exec_object_restorecon(struct selabel_handle *sehnd, Oid catalogId) pfree(namespace_name); object.classId = ProcedureRelationId; - object.objectId = HeapTupleGetOid(tuple); + object.objectId = proForm->oid; object.objectSubId = 0; break; diff --git a/contrib/sepgsql/sql/alter.sql b/contrib/sepgsql/sql/alter.sql index 14000eaaeeb..f1144492329 100644 --- a/contrib/sepgsql/sql/alter.sql +++ b/contrib/sepgsql/sql/alter.sql @@ -134,8 +134,6 @@ CREATE RULE regtest_test_rule AS ON INSERT TO regtest_table_3 DO ALSO NOTHING; ALTER TABLE regtest_table_3 DISABLE RULE regtest_test_rule; -- not supported ALTER TABLE regtest_table_3 ENABLE RULE regtest_test_rule; -- not supported -ALTER TABLE regtest_table SET WITH OIDS; -ALTER TABLE regtest_table SET WITHOUT OIDS; ALTER TABLE regtest_table SET (fillfactor = 75); ALTER TABLE regtest_table RESET (fillfactor); ALTER TABLE regtest_table_2 NO INHERIT regtest_table; -- not supported @@ -157,8 +155,6 @@ ALTER TABLE regtest_ptable ALTER p SET STORAGE PLAIN; ALTER TABLE regtest_ptable ADD CONSTRAINT test_ck CHECK (p like '%abc%') NOT VALID; -- not supported by sepgsql ALTER TABLE regtest_ptable DROP CONSTRAINT test_ck; -- not supported by sepgsql -ALTER TABLE regtest_ptable SET WITH OIDS; -ALTER TABLE regtest_ptable SET WITHOUT OIDS; ALTER TABLE regtest_ptable SET TABLESPACE pg_default; -- partitioned table child diff --git a/contrib/sepgsql/sql/ddl.sql b/contrib/sepgsql/sql/ddl.sql index ae431f6cd2a..3deadb62526 100644 --- a/contrib/sepgsql/sql/ddl.sql +++ b/contrib/sepgsql/sql/ddl.sql @@ -30,7 +30,7 @@ CREATE TABLE regtest_table (x serial primary key, y text); ALTER TABLE regtest_table ADD COLUMN z int; -CREATE TABLE regtest_table_2 (a int) WITH OIDS; +CREATE TABLE regtest_table_2 (a int); CREATE TABLE regtest_ptable (a int) PARTITION BY RANGE (a); CREATE TABLE regtest_ptable_ones PARTITION OF regtest_ptable FOR VALUES FROM ('0') TO ('10'); @@ -112,7 +112,6 @@ DROP SEQUENCE regtest_seq; DROP VIEW regtest_view; ALTER TABLE regtest_table DROP COLUMN y; -ALTER TABLE regtest_table_2 SET WITHOUT OIDS; ALTER TABLE regtest_ptable DROP COLUMN q CASCADE; |