Content-type: text/html Manpage of postgresql_selinux

postgresql_selinux

Section: postgresql SELinux Policy documentation (8)
Updated: postgresql
Index Return to Main Contents
 

NAME

postgresql_selinux - Security Enhanced Linux Policy for the postgresql processes  

DESCRIPTION

Security-Enhanced Linux secures the postgresql processes via flexible mandatory access control.

 

BOOLEANS

SELinux policy is customizable based on least access required. postgresql policy is extremely flexible and has several booleans that allow you to manipulate the policy and run postgresql with the tightest access possible.

If you want to allow postgresql to use ssh and rsync for point-in-time recovery, you must turn on the postgresql_can_rsync boolean.

setsebool -P postgresql_can_rsync 1

If you want to allow unprivileged users to execute DDL statement, you must turn on the postgresql_selinux_users_ddl boolean.

setsebool -P postgresql_selinux_users_ddl 1

If you want to allow database admins to execute DML statement, you must turn on the postgresql_selinux_unconfined_dbadm boolean.

setsebool -P postgresql_selinux_unconfined_dbadm 1

If you want to allow users to connect to PostgreSQL, you must turn on the selinuxuser_postgresql_connect_enabled boolean.

setsebool -P selinuxuser_postgresql_connect_enabled 1

If you want to allow transmit client label to foreign database, you must turn on the postgresql_selinux_transmit_client_label boolean.

setsebool -P postgresql_selinux_transmit_client_label 1

 

NSSWITCH DOMAIN

If you want to allow users to resolve user passwd entries directly from ldap rather then using a sssd serve for the postgresql_t, you must turn on the authlogin_nsswitch_use_ldap boolean.

setsebool -P authlogin_nsswitch_use_ldap 1

If you want to allow confined applications to run with kerberos for the postgresql_t, you must turn on the kerberos_enabled boolean.

setsebool -P kerberos_enabled 1

 

FILE CONTEXTS

SELinux requires files to have an extended attribute to define the file type.

You can see the context of a file using the -Z option to lsP Policy governs the access confined processes have to these files. SELinux postgresql policy is very flexible allowing users to setup their postgresql processes in as secure a method as possible.

The following file types are defined for postgresql:

postgresql_db_t

- Set files with the postgresql_db_t type, if you want to treat the files as postgresql database content.


Paths:
/usr/share/jonas/pgsql(/.*)?, /var/lib/postgres(ql)?(/.*)?, /var/lib/sepgsql(/.*)?, /usr/lib/pgsql/test/regress(/.*)?, /var/lib/pgsql(/.*)?

postgresql_etc_t

- Set files with the postgresql_etc_t type, if you want to store postgresql files in the /etc directories.


Paths:
/etc/sysconfig/pgsql(/.*)?, /etc/postgresql(/.*)?

postgresql_exec_t

- Set files with the postgresql_exec_t type, if you want to transition an executable to the postgresql_t domain.


Paths:
/usr/bin/(se)?postgres, /usr/lib/postgresql/bin/.*, /usr/lib/pgsql/test/regress/pg_regress, /usr/bin/initdb(.sepgsql)?

postgresql_initrc_exec_t

- Set files with the postgresql_initrc_exec_t type, if you want to transition an executable to the postgresql_initrc_t domain.

postgresql_lock_t

- Set files with the postgresql_lock_t type, if you want to treat the files as postgresql lock data, stored under the /var/lock directory

postgresql_log_t

- Set files with the postgresql_log_t type, if you want to treat the data as postgresql log data, usually stored under the /var/log directory.


Paths:
/var/lib/pgsql/logfile(/.*)?, /var/log/postgresql(/.*)?, /var/log/postgres.log.*, /var/lib/sepgsql/pgstartup.log, /var/log/rhdb/rhdb(/.*)?, /var/lib/pgsql/.*.log, /var/log/sepostgresql.log.*

postgresql_tmp_t

- Set files with the postgresql_tmp_t type, if you want to store postgresql temporary files in the /tmp directories.


 

Index

NAME
DESCRIPTION
BOOLEANS
NSSWITCH DOMAIN
FILE CONTEXTS

This document was created by man2html, using the manual pages.
Time: 19:33:58 GMT, September 30, 2012