public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/hardened-refpolicy:master commit in: policy/modules/contrib/, man/ru/man8/, man/man8/
@ 2013-04-11 12:47 Sven Vermeulen
  0 siblings, 0 replies; only message in thread
From: Sven Vermeulen @ 2013-04-11 12:47 UTC (permalink / raw
  To: gentoo-commits

commit:     04bf015e48c15d149310c72ce6217108747914f6
Author:     Sven Vermeulen <sven.vermeulen <AT> siphos <DOT> be>
AuthorDate: Thu Apr 11 12:46:49 2013 +0000
Commit:     Sven Vermeulen <sven.vermeulen <AT> siphos <DOT> be>
CommitDate: Thu Apr 11 12:46:49 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-refpolicy.git;a=commit;h=04bf015e

Start documentation effort for individual modules

---
 man/man8/portage_selinux.8         |  275 ++++++++++++++++++++++++++++++++++++
 man/ru/man8/ftpd_selinux.8         |   57 --------
 man/ru/man8/httpd_selinux.8        |  137 ------------------
 man/ru/man8/kerberos_selinux.8     |   30 ----
 man/ru/man8/named_selinux.8        |   31 ----
 man/ru/man8/nfs_selinux.8          |   33 -----
 man/ru/man8/rsync_selinux.8        |   50 -------
 man/ru/man8/samba_selinux.8        |   60 --------
 man/ru/man8/ypbind_selinux.8       |   19 ---
 policy/modules/contrib/portage.rst |  238 +++++++++++++++++++++++++++++++
 10 files changed, 513 insertions(+), 417 deletions(-)

diff --git a/man/man8/portage_selinux.8 b/man/man8/portage_selinux.8
new file mode 100644
index 0000000..4a7658a
--- /dev/null
+++ b/man/man8/portage_selinux.8
@@ -0,0 +1,275 @@
+.\" Man page generated from reStructuredText.
+.
+.TH PORTAGE_SELINUX 8 "2013-04-11" "" "SELinux"
+.SH NAME
+portage_selinux \- SELinux policy module for Gentoo Portage
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH DESCRIPTION
+.sp
+The \fBportage\fP SELinux module supports the various SELinux domains and types
+related to Gentoo Portage. This includes the main \fBportage_t\fP domain and the
+functionality\-related \fBportage_sandbox_t\fP and \fBportage_fetch_t\fP domains.
+Another provided domain is \fBgcc_config_t\fP for the \fBgcc\-config\fP helper script.
+.SH BOOLEANS
+.sp
+The following booleans are defined through the \fBportage\fP SELinux policy
+module. They can be toggled using \fBsetsebool\fP, like so:
+.INDENT 0.0
+.INDENT 3.5
+.sp
+.nf
+.ft C
+setsebool \-P portage_use_nfs on
+.ft P
+.fi
+.UNINDENT
+.UNINDENT
+.INDENT 0.0
+.TP
+.B portage_use_nfs
+Determine whether portage can use nfs file systems
+.UNINDENT
+.SH DOMAINS
+.SS portage_t
+.sp
+The \fBportage_t\fP domain is used for the majority of Portage related applications.
+Applications that, when executed, will run in this domain are \fBemerge\fP,
+\fBebuild\fP, \fBquickpkg\fP, \fBregenworld\fP, \fBsandbox\fP and \fBglsa\-check\fP.
+.sp
+This domain is able to trigger builds (for which it transitions to
+\fBportage_sandbox_t\fP) and holds the rights to merge the eventually built
+software onto the main system. As such, it should be regarded as a highly
+privileged domain.
+.sp
+By default, only the \fBsysadm_r\fP role is allowed to transition to the
+\fBportage_t\fP domain as this domain is used for system administrative
+purposes.
+.SS portage_fetch_t
+.sp
+The \fBportage_fetch_t\fP domain is used to manage and update the Portage tree.
+.sp
+Permission\-wise, it is allowed to transition to the \fBportage_t\fP domain when
+it, for instance, needs to update metadata.
+.sp
+The domain is affected by the following booleans:
+.INDENT 0.0
+.IP \(bu 2
+\fBportage_use_nfs\fP allows the \fBportage_fetch_t\fP domain to manage NFS\-hosted
+files, such as an NFS\-hosted Portage tree.
+.UNINDENT
+.SS portage_sandbox_t
+.sp
+The \fBportage_sandbox_t\fP domain is used when building software. It has a wide
+range of read rights as it has to be flexible enough to support all possible
+software builds. This includes networking support (for instance when using
+\fBdistcc\fP).
+.sp
+This domain is only transitioned towards by the \fBportage_t\fP domain and is not
+directly accessible. Also, this domain is not allowed to transition towards any
+other domain.
+.sp
+The domain is affected by the following booleans:
+.INDENT 0.0
+.IP \(bu 2
+\fBportage_use_nfs\fP allows the \fBportage_sandbox_t\fP domain to manage
+NFS\-hosted files.
+.sp
+If you have the repository on an NFS share, or any of the Portage related
+locations (such as the temporary build dir) on NFS, then you will need to
+enable this boolean.
+.UNINDENT
+.SS gcc_config_t
+.sp
+The \fBgcc_config_t\fP domain is used by the \fBgcc\-config\fP helper script which
+allows users to switch between installed compilers and compiler specifications.
+.sp
+By default, only the \fBsysadm_r\fP role is allowed to transition to the
+\fBgcc_config_t\fP domain as this domain is used for system administrative
+purposes.
+.sp
+The domain is affected by the following booleans:
+.INDENT 0.0
+.IP \(bu 2
+\fBportage_use_nfs\fP allows the \fBgcc_config_t\fP domain to read NFS hosted
+files. This was made necessary as the \fBgcc\-config\fP application underlyingly
+uses Portage code, which reads information from the repository and configuration
+locations.
+.sp
+This boolean only needs to be set if you have the Portage tree hosted on an
+NFS share.
+.UNINDENT
+.SH LOCATIONS
+.SS USER\-ORIENTED
+.sp
+The following list of locations identify file resources that are used by the
+Portage domains. They are by default allocated towards the default locations for
+Portage, so if you use a different location, you will need to properly address
+this. You can do so through \fBsemanage\fP, like so:
+.INDENT 0.0
+.INDENT 3.5
+.sp
+.nf
+.ft C
+semanage fcontext \-a \-t portage_ebuild_t "/var/portage/tree(/.*)?"
+.ft P
+.fi
+.UNINDENT
+.UNINDENT
+.sp
+The above example marks the \fI/var/portage/tree\fP location as the location where
+the Portage tree is stored (identified through the \fBportage_ebuild_t\fP type).
+.INDENT 0.0
+.TP
+.B portage_conf_t
+is used for the Portage configuration files, and defaults to
+\fI/etc/portage\fP. It is also used for files or links such as
+\fI/etc/make.profile\fP.
+.TP
+.B portage_ebuild_t
+is used for the Portage tree, and defaults to \fI/usr/portage\fP
+This also includes the downloaded source code archives.
+.TP
+.B portage_log_t
+is used for the Portage logging. It is used for files such as
+\fI/var/log/emerge.log\fP, \fI/var/log/emerge\-fetch.log\fP and the \fI/var/log/portage/\fP
+directory.
+.TP
+.B portage_srcrepo_t
+is used for the live ebuild source code repositories,
+and is used by locations such as \fI/usr/portage/distfiles/cvs\-src\fP.
+.TP
+.B portage_tmp_t
+is used for the Portage domain temporary files and the build location. It
+is by default assigned to locations such as \fI/var/tmp/portage\fP.
+.UNINDENT
+.SS INTERNAL
+.INDENT 0.0
+.TP
+.B portage_cache_t
+is used to identify the Portage cache (\fI/var/lib/portage\fP)
+.TP
+.B portage_db_t
+is used for the Portage database files (\fI/var/db/pkg\fP)
+.UNINDENT
+.SH OTHER RESOURCES
+.SS EXECUTABLE FILES
+.INDENT 0.0
+.TP
+.B portage_exec_t
+is used as entry point for the various Portage applications that generally run
+in the \fBportage_t\fP domain
+.TP
+.B portage_fetch_exec_t
+is used as the entry point for the fetch\-related applications, which generally
+run in the \fBportage_fetch_t\fP domain
+.TP
+.B gcc_config_exec_t
+is used as the entry point for the \fBgcc\-config\fP application.
+.UNINDENT
+.SH POLICY
+.sp
+The following interfaces can be used to enhance the default policy with
+Portage\-related privileges. More details on these interfaces can be found in the
+interface HTML documentation, we will not list all available interfaces here.
+.SS Run interfaces
+.sp
+The following run interfaces allow users and roles access to the specified
+domains. Only to be used for new user domains and roles.
+.INDENT 0.0
+.TP
+.B portage_run
+Allow the specified user domain and role access and transition rights
+to the \fBportage_t\fP domain.
+.TP
+.B portage_run_fetch
+Allow the specified user domain and role access and transition rights
+to the \fBportage_fetch_t\fP domain.
+.TP
+.B portage_run_gcc_config
+Allow the specified user domain and role access and transition rights
+to the \fBgcc_config_t\fP domain.
+.UNINDENT
+.SS Domtrans interfaces
+.sp
+The following domain transition interfaces allow domains to execute and
+transition into the mentioned Portage domains. Only to be used for domains
+assumed to be running within the general \fBsystem_r\fP role, or within a role
+already allowed access to the Portage domains (such as \fBsysadm_r\fP).
+.INDENT 0.0
+.TP
+.B portage_domtrans
+Allow the specified domain access and transition rights to the
+\fBportage_t\fP domain.
+.TP
+.B portage_domtrans_fetch
+Allow the specified domain access and transition rights to the
+\fBportage_fetch_t\fP domain.
+.TP
+.B portage_domtrans_gcc_config
+Allow the specified domain access and transition rights to the
+\fBgcc_config_t\fP domain.
+.UNINDENT
+.SS Resource access
+.sp
+The following interfaces allow a specified domain access to the Portage
+resources. These can be assigned on user domains as well.
+.INDENT 0.0
+.TP
+.B portage_read_config
+Allow the specified domain read access on the Portage configuration files
+.TP
+.B portage_read_ebuild
+Allow the specified domain read access on the Portage tree.
+.sp
+For instance, if you want to allow the \fBhttpd_t\fP domain (used by web server
+domains) read access:
+.INDENT 7.0
+.INDENT 3.5
+.sp
+.nf
+.ft C
+portage_read_ebuild( httpd_t )
+.ft P
+.fi
+.UNINDENT
+.UNINDENT
+.UNINDENT
+.SH SEE ALSO
+.INDENT 0.0
+.IP \(bu 2
+Gentoo and SELinux at
+\fI\%https://wiki.gentoo.org/wiki/SELinux\fP
+.IP \(bu 2
+Gentoo Hardened SELinux Project at
+\fI\%http://www.gentoo.org/proj/en/hardened/selinux\fP
+.UNINDENT
+.SH AUTHOR
+Sven Vermeulen <swift@gentoo.org>
+.\" Generated by docutils manpage writer.
+.

diff --git a/man/ru/man8/ftpd_selinux.8 b/man/ru/man8/ftpd_selinux.8
deleted file mode 100644
index efa915e..0000000
--- a/man/ru/man8/ftpd_selinux.8
+++ /dev/null
@@ -1,57 +0,0 @@
-.TH  "ftpd_selinux"  "8"  "17 Янв 2005" "dwalsh@redhat.com" "ftpd Selinux Policy documentation"
-.SH "НАЗВАНИЕ"
-ftpd_selinux \- Политика Security Enhanced Linux для демона ftp
-.SH "ОПИСАНИЕ"
-
-Security-Enhanced Linux обеспечивает защиту сервера ftpd при помощи гибко настраиваемого мандатного контроля доступа. 
-.SH КОНТЕКСТ ФАЙЛОВ
-SELinux требует наличия у файлов расширенных атрибутов, определяющих тип файла. 
-Политика управляет видом доступа демона к этим файлам. Если вы хотите организовать анонимный
-доступ к файлам, вы должны присвоить  этим файлам и директориям контекст public_content_t.
-Таким образом, если вы создаете специальную директорию /var/ftp, то вам необходимо установить  контекст для этой директории при помощи утилиты chcon.
-.TP
-chcon -R -t public_content_t /var/ftp
-.TP
-Если вы хотите задать директорию, в которую вы собираетесь загружать файлы, то вы должны
-установить контекст ftpd_anon_rw_t. Таким образом, если вы создаете специальную директорию /var/ftp/incoming, то вам необходимо установить контекст для этой директории при помощи утилиты chcon.
-.TP
-chcon -t public_content_rw_t /var/ftp/incoming
-.TP
-Вы также должны включить переключатель allow_ftpd_anon_write.
-.TP
-setsebool -P allow_ftpd_anon_write=1
-.TP
-Если вы хотите сделать эти изменения постоянными, иными словами, чтобы данный контекст сохранялся
-при обновлении контекстов, вы должны добавить записи в файл file_contexts.local.
-.TP
-/etc/selinux/POLICYTYPE/contexts/files/file_contexts.local
-.br
-/var/ftp(/.*)? system_u:object_r:public_content_t
-/var/ftp/incoming(/.*)? system_u:object_r:public_content_rw_t
-
-.SH ПЕРЕКЛЮЧАТЕЛИ (BOOLEANS)
-Политика SELinux для демона ftp настроена исходя из принципа наименьших привелегий. Таким
-образом, по умолчанию политика SELinux не позволяет пользователям заходить на сервер и 
-читать содержимое их домашних директорий.
-.br
-Если вы настраиваете данную машину как ftpd-сервер и хотите, чтобы пользователи могли получать 
-доступ к своим домашним директориям, то вам необходимо установить переключатель ftp_home_dir.
-.TP
-setsebool -P ftp_home_dir 1
-.TP
-ftpd может функционировать как самостоятельный демон, а также как часть домена xinetd. Если вы 
-хотите, чтобы ftpd работал как демон, вы должны установить переключатель ftpd_is_daemon.
-.TP
-setsebool -P ftpd_is_daemon 1
-.br
-service vsftpd restart
-.TP
-Для управления настройками SELinux существует графическая утилита system-config-selinux.
-.SH АВТОРЫ	
-Эту страницу руководства написал Dan Walsh <dwalsh@redhat.com>.
-Перевод руководства - Андрей Маркелов <andrey@markelov.net>, 2007г.
-
-.SH "СМОТРИ ТАКЖЕ"
-selinux(8), ftpd(8), chcon(1), setsebool(8)
-
-

diff --git a/man/ru/man8/httpd_selinux.8 b/man/ru/man8/httpd_selinux.8
deleted file mode 100644
index a653b7d..0000000
--- a/man/ru/man8/httpd_selinux.8
+++ /dev/null
@@ -1,137 +0,0 @@
-.TH  "httpd_selinux"  "8"  "17 Янв 2005" "dwalsh@redhat.com" "httpd Selinux Policy documentation"
-.de EX
-.nf
-.ft CW
-..
-.de EE
-.ft R
-.fi
-..
-.SH "НАЗВАНИЕ"
-httpd_selinux \- Политика Security Enhanced Linux для демона httpd
-.SH "ОПИСАНИЕ"
-
-Security-Enhanced Linux обеспечивает защиту сервера httpd при помощи гибко настраиваемого мандатного контроля доступа.  
-.SH КОНТЕКСТ ФАЙЛОВ
-SELinux требует наличия у файлов расширенных атрибутов, определяющих тип файла. 
-Политика управляет видом доступа демона к этим файлам.
-Политика SELinux для демона httpd позволяет пользователям настроить web-службы максимально безопасным методом с высокой степенью гибкости.
-.PP 
-Для httpd определены следующие контексты файлов:
-.EX
-httpd_sys_content_t 
-.EE 
-- Установите контекст httpd_sys_content_t для содержимого, которое должно быть доступно для всех скриптов httpd и для самого демона.
-.EX
-httpd_sys_script_exec_t  
-.EE 
-- Установите контекст httpd_sys_script_exec_t для cgi-скриптов, чтобы разрешить им доступ ко всем sys-типам.
-.EX
-httpd_sys_script_ro_t 
-.EE
-- Установите на файлы контекст httpd_sys_script_ro_t если вы хотите, чтобы скрипты httpd_sys_script_exec_t могли читать данные, и при этом нужно запретить доступ другим не-sys скриптам.
-.EX
-httpd_sys_script_rw_t 
-.EE
-- Установите на файлы контекст httpd_sys_script_rw_t если вы хотите, чтобы скрипты httpd_sys_script_exec_t могли читать и писать данные, и при этом нужно запретить доступ другим не-sys скриптам.
-.EX
-httpd_sys_script_ra_t 
-.EE
-- Установите на файлы контекст httpd_sys_script_ra_t если вы хотите, чтобы скрипты httpd_sys_script_exec_t могли читать и добавлять данные, и при этом нужно запретить доступ другим не-sys скриптам.
-.EX
-httpd_unconfined_script_exec_t  
-.EE 
-- Установите на cgi-скрипты контекст httpd_unconfined_script_exec_t если вы хотите разрешить
-им исполняться без какой-либо защиты SELinux. Такой способ должен использоваться только для
-скриптов с очень комплексными требованиями, и только в случае, если все остальные варианты настройки не дали результата. Лучше использовать скрипты с контекстом httpd_unconfined_script_exec_t, чем выключать защиту SELinux для httpd.
-
-.SH ЗАМЕЧАНИЕ
-Вместе с некоторыми политиками, вы можете определить дополнительные контексты файлов, основанные
-на ролях, таких как user или staff. Может быть определен контекст httpd_user_script_exec_t, который будет иметь доступ только к "пользовательским" контекстам.
-
-.SH СОВМЕСТНОЕ ВЛАДЕНИЕ ФАЙЛАМИ
-Если вы хотите организовать между несколькими доменами (Apache, FTP, rsync, Samba) совместный
-доступ к файлам, то вы можете установить контекст файлов в public_content_t и public_content_rw_t.
-Данный контекст позволяет любому из выше перечисленных демонов читать содержимое.
-Если вы хотите, чтобы конкретный домен имел право записи в домен public_content_rw_t, вы должны
-установить соответствующий переключатель allow_ДОМЕН_anon_write. Таким образом, для httpd вы должны выполнить команду:
-
-.EX
-setsebool -P allow_httpd_anon_write=1
-.EE
-
-или 
-
-.EX
-setsebool -P allow_httpd_sys_script_anon_write=1
-.EE
-
-.SH ПЕРЕКЛЮЧАТЕЛИ (BOOLEANS)
-Политика SELinux настроена исходя из принципа наименьших привилегий. Таким образом,
-по умолчанию SELinux препятствует работе некоторых http-скриптов. Политика httpd весьма
-гибка, и существующие переключатели управляют политикой, позволяя httpd выполняться
-с наименее возможными правами доступа.
-.PP
-Если вы хотите, чтобы httpd мог исполнять cgi-скрипты, установите переключатель httpd_enable_cgi
-.EX
-setsebool -P httpd_enable_cgi 1
-.EE
-
-.PP
-По умолчанию демону httpd не разрешен доступ в домашние дерикториии пользователей. Если вы хотите разрешить доступ, вам необходимо установить переключатель httpd_enable_homedirs и изменить контекст
-тех файлов в домашних директориях пользователей, к которым должен быть разрешен доступ.
-
-.EX
-setsebool -P httpd_enable_homedirs 1
-chcon -R -t httpd_sys_content_t ~user/public_html
-.EE
-
-.PP
-По умолчанию демон httpd не имеет доступ к управляющему терминалу. В большинстве случаев такое
-поведение является предпочтительным. Это связанно с тем, что злоумышленник может попытаться
-использовать доступ к терминалу для получения привилегий. Однако, в некоторых ситуациях демон
-httpd должен выводить запрос пароля для открытия файла сертификата и в таких случаях нужен доступ
-к терминалу. Для того, чтобы разрешить доступ к терминалу, установите переключатель httpd_tty_comm.
-.EX
-setsebool -P httpd_tty_comm 1
-.EE
-
-.PP
-httpd может быть настроен так, чтобы не разграничивать тип доступа к файлу на основании контекста.
-Иными словами, ко всем файлам, имеющим контекст httpd разрешен доступ на чтение/запись/исполнение. 
-Установка этого переключателя в false, позволяет настроить политику безопасности таким образом,
-что одина служба httpd не конфликтует с другой.
-.EX
-setsebool -P httpd_unified 0
-.EE
-
-.PP
-Имеется возможность настроить httpd таким образом, чтобы отключить встроенную поддержку 
-скриптов (PHP). PHP и другие загружаемые модули работают в том же контексте, что и httpd.
-Таким образом, если используются только внешние cgi-скрипты, некоторые из правил политики
-разрешают httpd больший доступ к системе, чем необходимо. 
-
-.EX
-setsebool -P httpd_builtin_scripting 0
-.EE
-
-.PP
-По умолчанию httpd-скриптам запрещено устанавливать внешние сетевые подключения. 
-Это не позволит хакеру, взломавшему ваш httpd-сервер, атаковать другие машины.
-Если вашим скриптам необходимо иметь возможность подключения, установите переключатель
-httpd_can_network_connect
-
-.EX
-setsebool -P httpd_can_network_connect 1
-.EE
-
-.PP
-Для управления настройками SELinux существует графическая утилита system-config-selinux.
-.SH АВТОРЫ	
-Эту страницу руководства написал Dan Walsh <dwalsh@redhat.com>.
-Перевод руководства - Андрей Маркелов <andrey@markelov.net>, 2007г.
-
-.SH "СМОТРИ ТАКЖЕ"
-selinux(8), httpd(8), chcon(1), setsebool(8)
-
-

diff --git a/man/ru/man8/kerberos_selinux.8 b/man/ru/man8/kerberos_selinux.8
deleted file mode 100644
index 9f546dc..0000000
--- a/man/ru/man8/kerberos_selinux.8
+++ /dev/null
@@ -1,30 +0,0 @@
-.TH  "kerberos_selinux"  "8"  "17 Янв 2005" "dwalsh@redhat.com" "kerberos Selinux Policy documentation"
-.de EX
-.nf
-.ft CW
-..
-.de EE
-.ft R
-.fi
-..
-.SH "НАЗВАНИЕ"
-kerberos_selinux \- Политика Security Enhanced Linux для Kerberos.
-.SH "ОПИСАНИЕ"
-
-Security-Enhanced Linux защищает систему при помощи гибко настраиваемого мандатного контроля доступа. По умолчанию Kerberos запрещен, поскольку требуется функционирование демонов,
-которым предоставляется слишком обширный доступ к сети и некоторым чувствительным в плане безопасности файлам.
-
-.SH ПЕРЕКЛЮЧАТЕЛИ (BOOLEANS)
-.PP
-Для того, чтобы система могла корректно работать в окружении Kerberos, вы должны установить переключатель allow_kerberos.
-.EX
-setsebool -P allow_kerberos 1
-.EE
-.PP
-Для управления настройками SELinux существует графическая утилита system-config-selinux.
-.SH АВТОРЫ	
-Эту страницу руководства написал Dan Walsh <dwalsh@redhat.com>.
-Перевод руководства - Андрей Маркелов <andrey@markelov.net>, 2007г.
-
-.SH "СМОТРИ ТАКЖЕ"
-selinux(8), kerberos(1), chcon(1), setsebool(8)

diff --git a/man/ru/man8/named_selinux.8 b/man/ru/man8/named_selinux.8
deleted file mode 100644
index 9818f79..0000000
--- a/man/ru/man8/named_selinux.8
+++ /dev/null
@@ -1,31 +0,0 @@
-.TH  "named_selinux"  "8"  "17 Янв 2005" "dwalsh@redhat.com" "named Selinux Policy documentation"
-.de EX
-.nf
-.ft CW
-..
-.de EE
-.ft R
-.fi
-..
-.SH "НАЗВАНИЕ"
-named_selinux \- Политика Security Enhanced Linux для демона Internet Name server (named)
-.SH "ОПИСАНИЕ"
-
-Security-Enhanced Linux обеспечивает защиту сервера named при помощи гибко настраиваемого мандатного контроля доступа.
-.SH ПЕРЕКЛЮЧАТЕЛИ (BOOLEANS)
-Политика SELinux настраивается исходя из принципа наименьших привилегий. Таким образом,
-по умолчанию политика SELinux не позволяет демону named осуществлять изменения файлов мастер-зоны.
-Если вам необходимо, чтобы named мог обновлять файлы мастер-зоны, вы должны установить переключатель named_write_master_zones boolean.
-.EX
-setsebool -P named_write_master_zones 1
-.EE
-.PP
-Для управления настройками SELinux существует графическая утилита system-config-selinux.
-.SH АВТОРЫ	
-Эту страницу руководства написал Dan Walsh <dwalsh@redhat.com>.
-Перевод руководства - Андрей Маркелов <andrey@markelov.net>, 2007г.
-
-.SH "СМОТРИ ТАКЖЕ"
-selinux(8), named(8), chcon(1), setsebool(8)
-
-

diff --git a/man/ru/man8/nfs_selinux.8 b/man/ru/man8/nfs_selinux.8
deleted file mode 100644
index 525513f..0000000
--- a/man/ru/man8/nfs_selinux.8
+++ /dev/null
@@ -1,33 +0,0 @@
-.TH  "nfs_selinux"  "8"  "17 Янв 2005" "dwalsh@redhat.com" "nfs Selinux Policy documentation"
-.SH "НАЗВАНИЕ"
-nfs_selinux \- Политика Security Enhanced Linux для NFS
-.SH "ОПИСАНИЕ"
-
-Security-Enhanced Linux защищает сервер nfs при помощи гибко настраиваемого мандатного контроля доступа.
-.SH ПЕРЕКЛЮЧАТЕЛИ (BOOLEANS)
-Политика SELinux настраивается исходя из принципа наименьших привилегий. Таким образом, 
-по умолчанию политика SELinux не позволяет предоставлять доступ к файлам по nfs. Если вы хотите 
-разрешить доступ только на чтение к файлам этой машины по nfs, вы должны установить переключатель
-nfs_export_all_ro.
-
-.TP
-setsebool -P nfs_export_all_ro 1
-.TP
-Если вы хотите разрешить доступ на чтение/запись, вы должны установить переключатель nfs_export_all_rw.
-.TP
-setsebool -P nfs_export_all_rw 1
-
-.TP
-Если вы хотите использовать удаленный NFS сервер для хранения домашних директорий этой машины,
-то вы должны установить переключатель use_nfs_home_dir boolean.
-.TP
-setsebool -P use_nfs_home_dirs 1
-.TP
-Для управления настройками SELinux существует графическая утилита
-system-config-selinux.
-.SH АВТОРЫ	
-Эту страницу руководства написал Dan Walsh <dwalsh@redhat.com>.
-Перевод руководства - Андрей Маркелов <andrey@markelov.net>, 2007г.
-
-.SH "СМОТРИ ТАКЖЕ"
-selinux(8), chcon(1), setsebool(8)

diff --git a/man/ru/man8/rsync_selinux.8 b/man/ru/man8/rsync_selinux.8
deleted file mode 100644
index 7b60605..0000000
--- a/man/ru/man8/rsync_selinux.8
+++ /dev/null
@@ -1,50 +0,0 @@
-.TH  "rsync_selinux"  "8"  "17 Янв 2005" "dwalsh@redhat.com" "rsync Selinux Policy documentation"
-.de EX
-.nf
-.ft CW
-..
-.de EE
-.ft R
-.fi
-..
-.SH "НАЗВАНИЕ"
-rsync_selinux \- Политика Security Enhanced Linux для демона rsync
-.SH "ОПИСАНИЕ"
-
-Security-Enhanced Linux обеспечивает защиту сервера rsync при помощи гибко настраиваемого мандатного контроля доступа. 
-.SH КОНТЕКСТ ФАЙЛОВ
-SELinux требует наличия у файлов расширенных атрибутов, определяющих тип файла. 
-Политика управляет видом доступа демона к этим файлам. Если вы хотите предоставить доступ к файлам
-при помощи демона rsync, вы должны присвоить этим файлам и директориям контекст
-public_content_t. Таким образом, если вы создаете специальную директорию /var/rsync, то вам 
-необходимо установить контекст для этой директории при помощи утилиты chcon.
-.TP
-chcon -t public_content_t /var/rsync
-.TP
-Если вы хотите сделать эти изменения постоянными, иными словами, чтобы данный контекст сохранялся
-при обновлении контекстов, вы должны добавить записи в файл file_contexts.local.
-.EX
-/etc/selinux/POLICYTYPE/contexts/files/file_contexts.local
-/var/rsync(/.*)? system_u:object_r:public_content_t
-.EE
-
-.SH СОВМЕСТНОЕ ВЛАДЕНИЕ ФАЙЛАМИ
-Если вы хотите организовать между несколькими доменами (Apache, FTP, rsync, Samba) совместный
-доступ к файлам, то вы можете установить контекст файлов в public_content_t и public_content_rw_t.
-Данный контекст позволяет любому из выше перечисленных демонов читать содержимое.
-Если вы хотите, чтобы конкретный домен имел право записи в домен public_content_rw_t, вы должны
-установить соответствующий переключатель allow_ДОМЕН_anon_write. Таким образом, для rsync вы должны выполнить команду:
-
-.EX
-setsebool -P allow_rsync_anon_write=1
-.EE
-
-.SH ПЕРЕКЛЮЧАТЕЛИ (BOOLEANS)
-.TP
-Для управления настройками SELinux существует графическая утилита system-config-selinux.
-.SH АВТОРЫ	
-Эту страницу руководства написал Dan Walsh <dwalsh@redhat.com>.
-Перевод руководства - Андрей Маркелов <andrey@markelov.net>, 2007г.
-
-.SH "СМОТРИ ТАКЖЕ"
-selinux(8), rsync(1), chcon(1), setsebool(8)

diff --git a/man/ru/man8/samba_selinux.8 b/man/ru/man8/samba_selinux.8
deleted file mode 100644
index 9a16863..0000000
--- a/man/ru/man8/samba_selinux.8
+++ /dev/null
@@ -1,60 +0,0 @@
-.TH  "samba_selinux"  "8"  "17 Янв 2005" "dwalsh@redhat.com" "Samba Selinux Policy documentation"
-.SH "НАЗВАНИЕ"
-samba_selinux \- Политика Security Enhanced Linux для Samba
-.SH "ОПИСАНИЕ"
-
-Security-Enhanced Linux обеспечивает защиту сервера Samba при помощи гибко настраиваемого мандатного контроля доступа.  
-.SH КОНТЕКСТ ФАЙЛОВ
-SELinux требует наличия у файлов расширенных атрибутов, определяющих тип файла. 
-Политика управляет видом доступа демона к этим файлам. 
-Если вы хотите предоставить доступ к файлам вовне домашних директорий, этим файлам необходимо
-присвоить контекст samba_share_t. 
-Таким образом, если вы создаете специальную директорию  /var/eng,  то  вам  необходимо
-установить  контекст для этой директории при помощи утилиты chcon.
-.TP
-chcon -t samba_share_t /var/eng
-.TP
-
-Если вы хотите сделать эти изменения постоянными, иными словами, чтобы данный контекст сохранялся
-при обновлении контекстов, вы должны добавить записи в файл file_contexts.local.
-.TP
-/etc/selinux/POLICYTYPE/contexts/files/file_contexts.local
-.br
-/var/eng(/.*)? system_u:object_r:samba_share_t
-
-.SH СОВМЕСТНОЕ ВЛАДЕНИЕ ФАЙЛАМИ
-Если вы хотите организовать между несколькими доменами (Apache, FTP, rsync, Samba) совместный
-доступ к файлам, то вы можете установить контекст файлов в public_content_t и public_content_rw_t.
-Данный контекст позволяет любому из выше перечисленных демонов читать содержимое.
-Если вы хотите, чтобы конкретный домен имел право записи в домен public_content_rw_t, вы должны
-установить соответствующий переключатель allow_ДОМЕН_anon_write. Таким образом, для samba вы должны выполнить команду:
-
-setsebool -P allow_smbd_anon_write=1
-
-.SH ПЕРЕКЛЮЧАТЕЛИ (BOOLEANS)
-.br 
-Политика SELinux настраивается исходя из принципа наименьших привилегий.
-Таким образом, по умолчанию политика SELinux не позволяет предоставлять удаленный доступ
-к домашним директориям и не позволяет использовать удаленный сервер Samba для хранения 
-домашних директорий.
-.TP
-Если вы настроили эту машину как сервер Samba и желаете предоставить доступ к домашним
-директориям, вы должны установить переключатель samba_enable_home_dirs.
-.br
-
-setsebool -P samba_enable_home_dirs 1
-.TP
-Если вы хотите для хранения домашних директорий пользователей этой машины использовать удаленный
-сервер Samba, вы должны установить переключатель use_samba_home_dirs.
-.br 
-
-setsebool -P use_samba_home_dirs 1
-.TP
-Для управления настройками SELinux существует графическая утилита system-config-selinux.
-
-.SH АВТОРЫ	
-Эту страницу руководства написал Dan Walsh <dwalsh@redhat.com>.
-Перевод руководства - Андрей Маркелов <andrey@markelov.net>, 2007г.
-
-.SH "СМОТРИ ТАКЖЕ"
-selinux(8), samba(7), chcon(1), setsebool(8)

diff --git a/man/ru/man8/ypbind_selinux.8 b/man/ru/man8/ypbind_selinux.8
deleted file mode 100644
index a6c084a..0000000
--- a/man/ru/man8/ypbind_selinux.8
+++ /dev/null
@@ -1,19 +0,0 @@
-.TH  "ypbind_selinux"  "8"  "17 Янв 2005" "dwalsh@redhat.com" "ypbind Selinux Policy documentation"
-.SH "НАЗВАНИЕ"
-ypbind_selinux \- Политика Security Enhanced Linux для NIS.
-.SH "ОПИСАНИЕ"
-
-Security-Enhanced Linux защищает систему при помощи гибко настраиваемого мандатного контроля доступа. По умолчанию работа NIS запрещена. Это является следствием того, что демоны NIS требуют слишком обширного доступа к сети.  
-.SH ПЕРЕКЛЮЧАТЕЛИ (BOOLEANS)
-.TP
-Для того, чтобы система могла работать в окружении NIS, вы должны установить переключатель allow_ypbind.
-.TP
-setsebool -P allow_ypbind 1
-.TP
-Для управления настройками SELinux существует графическая утилита system-config-selinux.
-.SH АВТОРЫ	
-Эту страницу руководства написал Dan Walsh <dwalsh@redhat.com>.
-Перевод руководства - Андрей Маркелов <andrey@markelov.net>, 2007г.
-
-.SH "СМОТРИ ТАКЖЕ"
-selinux(8), ypbind(8), chcon(1), setsebool(8)

diff --git a/policy/modules/contrib/portage.rst b/policy/modules/contrib/portage.rst
new file mode 100644
index 0000000..3ca2cc7
--- /dev/null
+++ b/policy/modules/contrib/portage.rst
@@ -0,0 +1,238 @@
+=================
+ portage_selinux
+=================
+
+----------------------------------------
+SELinux policy module for Gentoo Portage
+----------------------------------------
+
+:Author:        Sven Vermeulen <swift@gentoo.org>
+:Date:          2013-04-11
+:Manual section:        8
+:Manual group:          SELinux
+
+DESCRIPTION
+===========
+
+The **portage** SELinux module supports the various SELinux domains and types
+related to Gentoo Portage. This includes the main **portage_t** domain and the
+functionality-related **portage_sandbox_t** and **portage_fetch_t** domains.
+Another provided domain is **gcc_config_t** for the ``gcc-config`` helper script.
+
+BOOLEANS
+========
+
+The following booleans are defined through the **portage** SELinux policy
+module. They can be toggled using ``setsebool``, like so::
+
+  setsebool -P portage_use_nfs on
+
+portage_use_nfs
+  Determine whether portage can use nfs file systems
+
+DOMAINS
+=======
+
+portage_t
+---------
+
+The **portage_t** domain is used for the majority of Portage related applications.
+Applications that, when executed, will run in this domain are ``emerge``,
+``ebuild``, ``quickpkg``, ``regenworld``, ``sandbox`` and ``glsa-check``.
+
+This domain is able to trigger builds (for which it transitions to
+**portage_sandbox_t**) and holds the rights to merge the eventually built
+software onto the main system. As such, it should be regarded as a highly
+privileged domain.
+
+By default, only the **sysadm_r** role is allowed to transition to the
+**portage_t** domain as this domain is used for system administrative
+purposes.
+
+portage_fetch_t
+---------------
+
+The **portage_fetch_t** domain is used to manage and update the Portage tree.
+
+Permission-wise, it is allowed to transition to the **portage_t** domain when
+it, for instance, needs to update metadata. 
+
+The domain is affected by the following booleans:
+
+* **portage_use_nfs** allows the **portage_fetch_t** domain to manage NFS-hosted
+  files, such as an NFS-hosted Portage tree.
+
+portage_sandbox_t
+-----------------
+
+The **portage_sandbox_t** domain is used when building software. It has a wide
+range of read rights as it has to be flexible enough to support all possible
+software builds. This includes networking support (for instance when using
+``distcc``). 
+
+This domain is only transitioned towards by the **portage_t** domain and is not
+directly accessible. Also, this domain is not allowed to transition towards any
+other domain.
+
+The domain is affected by the following booleans:
+
+* **portage_use_nfs** allows the **portage_sandbox_t** domain to manage
+  NFS-hosted files.
+  
+  If you have the repository on an NFS share, or any of the Portage related
+  locations (such as the temporary build dir) on NFS, then you will need to
+  enable this boolean.
+
+gcc_config_t
+------------
+
+The **gcc_config_t** domain is used by the ``gcc-config`` helper script which
+allows users to switch between installed compilers and compiler specifications.
+
+By default, only the **sysadm_r** role is allowed to transition to the
+**gcc_config_t** domain as this domain is used for system administrative
+purposes.
+
+The domain is affected by the following booleans:
+
+* **portage_use_nfs** allows the **gcc_config_t** domain to read NFS hosted
+  files. This was made necessary as the ``gcc-config`` application underlyingly
+  uses Portage code, which reads information from the repository and configuration
+  locations. 
+
+  This boolean only needs to be set if you have the Portage tree hosted on an
+  NFS share.
+
+LOCATIONS
+=========
+
+USER-ORIENTED
+-------------
+
+The following list of locations identify file resources that are used by the
+Portage domains. They are by default allocated towards the default locations for
+Portage, so if you use a different location, you will need to properly address
+this. You can do so through ``semanage``, like so::
+
+  semanage fcontext -a -t portage_ebuild_t "/var/portage/tree(/.*)?"
+
+The above example marks the */var/portage/tree* location as the location where
+the Portage tree is stored (identified through the **portage_ebuild_t** type).
+
+portage_conf_t
+  is used for the Portage configuration files, and defaults to
+  */etc/portage*. It is also used for files or links such as
+  */etc/make.profile*.
+
+portage_ebuild_t
+  is used for the Portage tree, and defaults to */usr/portage*
+  This also includes the downloaded source code archives.
+
+portage_log_t
+  is used for the Portage logging. It is used for files such as
+  */var/log/emerge.log*, */var/log/emerge-fetch.log* and the */var/log/portage/*
+  directory.
+
+portage_srcrepo_t
+  is used for the live ebuild source code repositories,
+  and is used by locations such as */usr/portage/distfiles/cvs-src*.
+
+portage_tmp_t
+  is used for the Portage domain temporary files and the build location. It
+  is by default assigned to locations such as */var/tmp/portage*.
+
+INTERNAL
+--------
+
+portage_cache_t
+  is used to identify the Portage cache (*/var/lib/portage*)
+
+portage_db_t
+  is used for the Portage database files (*/var/db/pkg*)
+
+OTHER RESOURCES
+===============
+
+EXECUTABLE FILES
+----------------
+
+portage_exec_t
+  is used as entry point for the various Portage applications that generally run
+  in the **portage_t** domain
+
+portage_fetch_exec_t
+  is used as the entry point for the fetch-related applications, which generally
+  run in the **portage_fetch_t** domain
+
+gcc_config_exec_t
+  is used as the entry point for the ``gcc-config`` application.
+
+POLICY
+======
+
+The following interfaces can be used to enhance the default policy with
+Portage-related privileges. More details on these interfaces can be found in the
+interface HTML documentation, we will not list all available interfaces here.
+
+Run interfaces
+--------------
+
+The following run interfaces allow users and roles access to the specified
+domains. Only to be used for new user domains and roles.
+
+portage_run
+  Allow the specified user domain and role access and transition rights
+  to the **portage_t** domain.
+
+portage_run_fetch
+  Allow the specified user domain and role access and transition rights
+  to the **portage_fetch_t** domain.
+
+portage_run_gcc_config
+  Allow the specified user domain and role access and transition rights
+  to the **gcc_config_t** domain.
+
+Domtrans interfaces
+-------------------
+
+The following domain transition interfaces allow domains to execute and
+transition into the mentioned Portage domains. Only to be used for domains
+assumed to be running within the general **system_r** role, or within a role
+already allowed access to the Portage domains (such as **sysadm_r**).
+
+portage_domtrans
+  Allow the specified domain access and transition rights to the
+  **portage_t** domain.
+
+portage_domtrans_fetch
+  Allow the specified domain access and transition rights to the
+  **portage_fetch_t** domain.
+
+portage_domtrans_gcc_config
+  Allow the specified domain access and transition rights to the
+  **gcc_config_t** domain.
+
+Resource access
+---------------
+
+The following interfaces allow a specified domain access to the Portage
+resources. These can be assigned on user domains as well.
+
+portage_read_config
+  Allow the specified domain read access on the Portage configuration files
+
+portage_read_ebuild
+  Allow the specified domain read access on the Portage tree.
+
+  For instance, if you want to allow the **httpd_t** domain (used by web server
+  domains) read access::
+
+    portage_read_ebuild( httpd_t )
+
+SEE ALSO
+========
+
+* Gentoo and SELinux at 
+  https://wiki.gentoo.org/wiki/SELinux
+* Gentoo Hardened SELinux Project at 
+  http://www.gentoo.org/proj/en/hardened/selinux


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-04-11 12:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-11 12:47 [gentoo-commits] proj/hardened-refpolicy:master commit in: policy/modules/contrib/, man/ru/man8/, man/man8/ Sven Vermeulen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox