diff options
Diffstat (limited to 'policy/modules/services/postgresql.fc')
-rw-r--r-- | policy/modules/services/postgresql.fc | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/policy/modules/services/postgresql.fc b/policy/modules/services/postgresql.fc new file mode 100644 index 00000000..a77d9eb3 --- /dev/null +++ b/policy/modules/services/postgresql.fc @@ -0,0 +1,40 @@ +# +# /etc +# +/etc/postgresql(/.*)? gen_context(system_u:object_r:postgresql_etc_t,s0) + +# +# /usr +# +/usr/bin/initdb -- gen_context(system_u:object_r:postgresql_exec_t,s0) +/usr/bin/postgres -- gen_context(system_u:object_r:postgresql_exec_t,s0) + +/usr/lib/pgsql/test/regres(/.*)? gen_context(system_u:object_r:postgresql_db_t,s0) +/usr/lib/pgsql/test/regress/pg_regress -- gen_context(system_u:object_r:postgresql_exec_t,s0) + +/usr/lib(64)?/postgresql/bin/.* -- gen_context(system_u:object_r:postgresql_exec_t,s0) + +ifdef(`distro_debian', ` +/usr/lib/postgresql/.*/bin/.* -- gen_context(system_u:object_r:postgresql_exec_t,s0) +') + +ifdef(`distro_redhat', ` +/usr/share/jonas/pgsql(/.*)? gen_context(system_u:object_r:postgresql_db_t,s0) +') + +# +# /var +# +/var/lib/postgres(ql)?(/.*)? gen_context(system_u:object_r:postgresql_db_t,s0) + +/var/lib/pgsql/data(/.*)? gen_context(system_u:object_r:postgresql_db_t,s0) +/var/lib/pgsql/pgstartup.log gen_context(system_u:object_r:postgresql_log_t,s0) + +/var/log/postgres\.log.* -- gen_context(system_u:object_r:postgresql_log_t,s0) +/var/log/postgresql(/.*)? gen_context(system_u:object_r:postgresql_log_t,s0) + +ifdef(`distro_redhat', ` +/var/log/rhdb/rhdb(/.*)? gen_context(system_u:object_r:postgresql_log_t,s0) +') + +/var/run/postgresql(/.*)? gen_context(system_u:object_r:postgresql_var_run_t,s0) |