Index: policy/flask/access_vectors =================================================================== --- policy/flask/access_vectors (revision 2935) +++ policy/flask/access_vectors (working copy) @@ -723,14 +723,12 @@ access install_module load_module - get_param - set_param + superuser } class db_table inherits database { - use select update insert @@ -749,7 +747,6 @@ class db_column inherits database { - use select update insert @@ -759,7 +756,6 @@ { relabelfrom relabelto - use select update insert Index: policy/modules/services/postgresql.if =================================================================== --- policy/modules/services/postgresql.if (revision 2935) +++ policy/modules/services/postgresql.if (working copy) @@ -55,10 +55,10 @@ type_transition $2 sepgsql_sysobj_table_type:db_tuple user_sepgsql_sysobj_t; ') - allow $2 user_sepgsql_table_t:db_table { getattr setattr use select update insert delete }; - allow $2 user_sepgsql_table_t:db_column { getattr setattr use select update insert }; - allow $2 user_sepgsql_table_t:db_tuple { use select update insert delete }; - allow $2 user_sepgsql_sysobj_t:db_tuple { use select }; + allow $2 user_sepgsql_table_t:db_table { getattr setattr select update insert delete lock }; + allow $2 user_sepgsql_table_t:db_column { getattr setattr select update insert }; + allow $2 user_sepgsql_table_t:db_tuple { select update insert delete }; + allow $2 user_sepgsql_sysobj_t:db_tuple { select }; allow $2 user_sepgsql_proc_exec_t:db_procedure { create drop getattr setattr execute }; type_transition $2 sepgsql_database_type:db_procedure user_sepgsql_proc_exec_t; Index: policy/modules/services/postgresql.te =================================================================== --- policy/modules/services/postgresql.te (revision 2935) +++ policy/modules/services/postgresql.te (working copy) @@ -281,27 +281,27 @@ # Rules common to all clients # -allow sepgsql_client_type sepgsql_db_t:db_database { getattr access get_param set_param }; +allow sepgsql_client_type sepgsql_db_t:db_database { getattr access }; type_transition sepgsql_client_type sepgsql_client_type:db_database sepgsql_db_t; -allow sepgsql_client_type sepgsql_fixed_table_t:db_table { getattr use select insert }; -allow sepgsql_client_type sepgsql_fixed_table_t:db_column { getattr use select insert }; -allow sepgsql_client_type sepgsql_fixed_table_t:db_tuple { use select insert }; +allow sepgsql_client_type sepgsql_fixed_table_t:db_table { getattr select insert lock }; +allow sepgsql_client_type sepgsql_fixed_table_t:db_column { getattr select insert }; +allow sepgsql_client_type sepgsql_fixed_table_t:db_tuple { select insert }; -allow sepgsql_client_type sepgsql_table_t:db_table { getattr use select update insert delete }; -allow sepgsql_client_type sepgsql_table_t:db_column { getattr use select update insert }; -allow sepgsql_client_type sepgsql_table_t:db_tuple { use select update insert delete }; +allow sepgsql_client_type sepgsql_table_t:db_table { getattr select update insert delete lock }; +allow sepgsql_client_type sepgsql_table_t:db_column { getattr select update insert }; +allow sepgsql_client_type sepgsql_table_t:db_tuple { select update insert delete }; -allow sepgsql_client_type sepgsql_ro_table_t:db_table { getattr use select }; -allow sepgsql_client_type sepgsql_ro_table_t:db_column { getattr use select }; -allow sepgsql_client_type sepgsql_ro_table_t:db_tuple { use select }; +allow sepgsql_client_type sepgsql_ro_table_t:db_table { getattr select lock }; +allow sepgsql_client_type sepgsql_ro_table_t:db_column { getattr select }; +allow sepgsql_client_type sepgsql_ro_table_t:db_tuple { select }; allow sepgsql_client_type sepgsql_secret_table_t:db_table getattr; allow sepgsql_client_type sepgsql_secret_table_t:db_column getattr; -allow sepgsql_client_type sepgsql_sysobj_t:db_table { getattr use select }; -allow sepgsql_client_type sepgsql_sysobj_t:db_column { getattr use select }; -allow sepgsql_client_type sepgsql_sysobj_t:db_tuple { use select }; +allow sepgsql_client_type sepgsql_sysobj_t:db_table { getattr select lock }; +allow sepgsql_client_type sepgsql_sysobj_t:db_column { getattr select }; +allow sepgsql_client_type sepgsql_sysobj_t:db_tuple { select }; allow sepgsql_client_type sepgsql_proc_t:db_procedure { getattr execute install }; allow sepgsql_client_type sepgsql_trusted_proc_t:db_procedure { getattr execute entrypoint }; @@ -321,7 +321,7 @@ # to access classified tuples and can make a audit record. # # Therefore, the following rule is applied for any domains which can connect SE-PostgreSQL. -dontaudit { postgresql_t sepgsql_client_type sepgsql_unconfined_type } { sepgsql_table_type -sepgsql_sysobj_table_type }:db_tuple { use select update insert delete }; +dontaudit { postgresql_t sepgsql_client_type sepgsql_unconfined_type } { sepgsql_table_type -sepgsql_sysobj_table_type }:db_tuple { select update insert delete }; tunable_policy(`sepgsql_enable_users_ddl',` allow sepgsql_client_type sepgsql_table_t:db_table { create drop setattr };