diff --git a/.gitignore b/.gitignore index bf1fee5..8b9b2d4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ -SOURCES/gui-po.tgz -SOURCES/policycoreutils-po.tgz -SOURCES/python-po.tgz -SOURCES/sandbox-po.tgz -SOURCES/selinux-3.5.tar.gz +SOURCES/selinux-3.6.tar.gz +SOURCES/selinux-gui.zip +SOURCES/selinux-policycoreutils.zip +SOURCES/selinux-python.zip +SOURCES/selinux-sandbox.zip SOURCES/sepolicy-icons.tgz SOURCES/system-config-selinux.png diff --git a/.policycoreutils.metadata b/.policycoreutils.metadata index 298caa7..f3cb631 100644 --- a/.policycoreutils.metadata +++ b/.policycoreutils.metadata @@ -1,7 +1,7 @@ -f9342645227d02f617924de0bb0dbfa9c67ebb43 SOURCES/gui-po.tgz -04e31eca7c25edb3a896637aba5b81b61d572995 SOURCES/policycoreutils-po.tgz -2395f9e7d3a01715f103a04fed37468ba0d3da5a SOURCES/python-po.tgz -65f89d944d50c59dd5a35453e9a94916db076b3d SOURCES/sandbox-po.tgz -28e8c0a58e01436b1c931559da3844d5774f8186 SOURCES/selinux-3.5.tar.gz +c1d6c443723b91295ca887eeea5c2d84a420593f SOURCES/selinux-3.6.tar.gz +c2957ae26fcabe856439915bc03fb7d25c91b724 SOURCES/selinux-gui.zip +8aec9d92a940e35756c4cf66891db7b070e00c5c SOURCES/selinux-policycoreutils.zip +6a9a8a86bf4b66b484533e5a5b91acd9f2ba4ed1 SOURCES/selinux-python.zip +c9b684345b0b6940afd38d8679e2838ad7ef5ffe SOURCES/selinux-sandbox.zip d849fa76cc3ef4a26047d8a69fef3a55d2f3097f SOURCES/sepolicy-icons.tgz 611a5d497efaddd45ec0dcc3e9b2e5b0f81ebc41 SOURCES/system-config-selinux.png diff --git a/SOURCES/0001-sandbox-add-reset-to-Xephyr-as-it-works-better-with-.patch b/SOURCES/0001-sandbox-add-reset-to-Xephyr-as-it-works-better-with-.patch index f14e1a2..353a498 100644 --- a/SOURCES/0001-sandbox-add-reset-to-Xephyr-as-it-works-better-with-.patch +++ b/SOURCES/0001-sandbox-add-reset-to-Xephyr-as-it-works-better-with-.patch @@ -1,4 +1,4 @@ -From 31ccf6f0fc5e77870f496fac4bea94a6ba2e5c30 Mon Sep 17 00:00:00 2001 +From b1612f0ed2cabdf7f2a5ab44edc5be94ab4b84ed Mon Sep 17 00:00:00 2001 From: Petr Lautrbach Date: Thu, 20 Aug 2015 12:58:41 +0200 Subject: [PATCH] sandbox: add -reset to Xephyr as it works better with it in @@ -23,5 +23,5 @@ index eaa500d08143..4774528027ef 100644 cat > ~/seremote << __EOF #!/bin/sh -- -2.39.1 +2.41.0 diff --git a/SOURCES/0002-Fix-STANDARD_FILE_CONTEXT-section-in-man-pages.patch b/SOURCES/0002-Fix-STANDARD_FILE_CONTEXT-section-in-man-pages.patch index 35b81ac..4ae26c5 100644 --- a/SOURCES/0002-Fix-STANDARD_FILE_CONTEXT-section-in-man-pages.patch +++ b/SOURCES/0002-Fix-STANDARD_FILE_CONTEXT-section-in-man-pages.patch @@ -1,4 +1,4 @@ -From 837c347bbee5db90d11144363525113edc8baed3 Mon Sep 17 00:00:00 2001 +From 2dade3b4302d6fb6c8abf94227d684ab284216e3 Mon Sep 17 00:00:00 2001 From: Dan Walsh Date: Mon, 21 Apr 2014 13:54:40 -0400 Subject: [PATCH] Fix STANDARD_FILE_CONTEXT section in man pages @@ -10,7 +10,7 @@ Signed-off-by: Miroslav Grepl 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/python/sepolicy/sepolicy/manpage.py b/python/sepolicy/sepolicy/manpage.py -index a488dcbf54f2..7d90ffb5a22f 100755 +index 629990194f83..b80a408a8f55 100755 --- a/python/sepolicy/sepolicy/manpage.py +++ b/python/sepolicy/sepolicy/manpage.py @@ -679,10 +679,13 @@ Default Defined Ports:""") @@ -43,5 +43,5 @@ index a488dcbf54f2..7d90ffb5a22f 100755 self.fd.write(r""" .I The following file types are defined for %(domainname)s: -- -2.39.1 +2.41.0 diff --git a/SOURCES/0003-If-there-is-no-executable-we-don-t-want-to-print-a-p.patch b/SOURCES/0003-If-there-is-no-executable-we-don-t-want-to-print-a-p.patch index c31d159..4d9b864 100644 --- a/SOURCES/0003-If-there-is-no-executable-we-don-t-want-to-print-a-p.patch +++ b/SOURCES/0003-If-there-is-no-executable-we-don-t-want-to-print-a-p.patch @@ -1,4 +1,4 @@ -From f21d5f9316094015c81339d25d69d3dc7150bd8a Mon Sep 17 00:00:00 2001 +From 91eebedb3f2af184720bf77f64133a9a2e0dc453 Mon Sep 17 00:00:00 2001 From: Miroslav Grepl Date: Mon, 12 May 2014 14:11:22 +0200 Subject: [PATCH] If there is no executable we don't want to print a part of @@ -10,7 +10,7 @@ Content-type: text/plain 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/sepolicy/sepolicy/manpage.py b/python/sepolicy/sepolicy/manpage.py -index 7d90ffb5a22f..11809dcede43 100755 +index b80a408a8f55..70a8ce848900 100755 --- a/python/sepolicy/sepolicy/manpage.py +++ b/python/sepolicy/sepolicy/manpage.py @@ -737,7 +737,8 @@ SELinux %(domainname)s policy is very flexible allowing users to setup their %(d @@ -24,5 +24,5 @@ index 7d90ffb5a22f..11809dcede43 100755 .B STANDARD FILE CONTEXT -- -2.39.1 +2.41.0 diff --git a/SOURCES/0004-Don-t-be-verbose-if-you-are-not-on-a-tty.patch b/SOURCES/0004-Don-t-be-verbose-if-you-are-not-on-a-tty.patch index 5caf30f..6058d07 100644 --- a/SOURCES/0004-Don-t-be-verbose-if-you-are-not-on-a-tty.patch +++ b/SOURCES/0004-Don-t-be-verbose-if-you-are-not-on-a-tty.patch @@ -1,4 +1,4 @@ -From 9e22ab3619d68277c89926f3f31e37a9101ca082 Mon Sep 17 00:00:00 2001 +From 06c0d6d8f34becde1a8b4b2532e2a22abe9d4d94 Mon Sep 17 00:00:00 2001 From: Dan Walsh Date: Fri, 14 Feb 2014 12:32:12 -0500 Subject: [PATCH] Don't be verbose if you are not on a tty @@ -21,5 +21,5 @@ index 166af6f360a2..ebe64563c7d7 100755 THREADS="" RPMFILES="" -- -2.39.1 +2.41.0 diff --git a/SOURCES/0005-sepolicy-generate-Handle-more-reserved-port-types.patch b/SOURCES/0005-sepolicy-generate-Handle-more-reserved-port-types.patch index 361e47b..73da82a 100644 --- a/SOURCES/0005-sepolicy-generate-Handle-more-reserved-port-types.patch +++ b/SOURCES/0005-sepolicy-generate-Handle-more-reserved-port-types.patch @@ -1,4 +1,4 @@ -From be8bd714f37e6114661f02df4ddb7cb7b25cd0a1 Mon Sep 17 00:00:00 2001 +From ff5572d5cb4ee465b09e353b84a75dc5ec60307d Mon Sep 17 00:00:00 2001 From: Masatake YAMATO Date: Thu, 14 Dec 2017 15:57:58 +0900 Subject: [PATCH] sepolicy-generate: Handle more reserved port types @@ -68,5 +68,5 @@ index b6df3e91160b..36a3ea1196b1 100644 dict[(p['low'], p['high'], p['protocol'])] = (p['type'], p.get('range')) return dict -- -2.39.1 +2.41.0 diff --git a/SOURCES/0006-sandbox-Use-matchbox-window-manager-instead-of-openb.patch b/SOURCES/0006-sandbox-Use-matchbox-window-manager-instead-of-openb.patch index f1c27fa..6484168 100644 --- a/SOURCES/0006-sandbox-Use-matchbox-window-manager-instead-of-openb.patch +++ b/SOURCES/0006-sandbox-Use-matchbox-window-manager-instead-of-openb.patch @@ -1,4 +1,4 @@ -From f4b78eeb59ae1ef4b5926c004debce04ee28dfe7 Mon Sep 17 00:00:00 2001 +From 8d751d18ea748de141880a726339e4aba4b7a437 Mon Sep 17 00:00:00 2001 From: Petr Lautrbach Date: Wed, 18 Jul 2018 09:09:35 +0200 Subject: [PATCH] sandbox: Use matchbox-window-manager instead of openbox @@ -33,17 +33,17 @@ index a2762a7d215a..a32a33ea3cf6 100644 parser.add_option("-l", "--level", dest="level", diff --git a/sandbox/sandbox.8 b/sandbox/sandbox.8 -index 1ee0ecea96d1..775e4b231204 100644 +index 095b9e27042d..1c1870190e51 100644 --- a/sandbox/sandbox.8 +++ b/sandbox/sandbox.8 @@ -80,7 +80,7 @@ Specifies the windowsize when creating an X based Sandbox. The default windowsiz \fB\-W\fR \fB\-\-windowmanager\fR - Select alternative window manager to run within + Select alternative window manager to run within .B sandbox \-X. -Default to /usr/bin/openbox. +Default to /usr/bin/matchbox-window-manager. .TP - \fB\-X\fR + \fB\-X\fR Create an X based Sandbox for gui apps, temporary files for diff --git a/sandbox/sandboxX.sh b/sandbox/sandboxX.sh index 4774528027ef..c211ebc14549 100644 @@ -71,5 +71,5 @@ index 4774528027ef..c211ebc14549 100644 export DISPLAY=:$D cat > ~/seremote << __EOF -- -2.39.1 +2.41.0 diff --git a/SOURCES/0007-Use-SHA-2-instead-of-SHA-1.patch b/SOURCES/0007-Use-SHA-2-instead-of-SHA-1.patch index 8c2398e..d6a2286 100644 --- a/SOURCES/0007-Use-SHA-2-instead-of-SHA-1.patch +++ b/SOURCES/0007-Use-SHA-2-instead-of-SHA-1.patch @@ -1,4 +1,4 @@ -From 604a275f53750e4c1e1101bd53c4fd448cc0b5e3 Mon Sep 17 00:00:00 2001 +From 5d257019cb4de4681e60f6e15bf2c1be73275b9c Mon Sep 17 00:00:00 2001 From: Petr Lautrbach Date: Fri, 30 Jul 2021 14:14:37 +0200 Subject: [PATCH] Use SHA-2 instead of SHA-1 @@ -6,17 +6,14 @@ Content-type: text/plain The use of SHA-1 in RHEL9 is deprecated --- - policycoreutils/setfiles/restorecon.8 | 10 +++++----- - policycoreutils/setfiles/restorecon_xattr.8 | 8 ++++---- - policycoreutils/setfiles/restorecon_xattr.c | 12 ++++++------ - policycoreutils/setfiles/ru/restorecon.8 | 8 ++++---- - policycoreutils/setfiles/ru/restorecon_xattr.8 | 10 +++++----- - policycoreutils/setfiles/ru/setfiles.8 | 8 ++++---- - policycoreutils/setfiles/setfiles.8 | 10 +++++----- - 7 files changed, 33 insertions(+), 33 deletions(-) + policycoreutils/setfiles/restorecon.8 | 10 +++++----- + policycoreutils/setfiles/restorecon_xattr.8 | 8 ++++---- + policycoreutils/setfiles/restorecon_xattr.c | 12 ++++++------ + policycoreutils/setfiles/setfiles.8 | 10 +++++----- + 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/policycoreutils/setfiles/restorecon.8 b/policycoreutils/setfiles/restorecon.8 -index e07db2c87dc4..dbd55ce7c512 100644 +index c3cc5c9b0e52..6160aced5922 100644 --- a/policycoreutils/setfiles/restorecon.8 +++ b/policycoreutils/setfiles/restorecon.8 @@ -95,14 +95,14 @@ display usage information and exit. @@ -56,7 +53,7 @@ index e07db2c87dc4..dbd55ce7c512 100644 and provided the .B \-n diff --git a/policycoreutils/setfiles/restorecon_xattr.8 b/policycoreutils/setfiles/restorecon_xattr.8 -index e04528e60824..4b1ce304d995 100644 +index 51d12a4dbb80..09bfd8c40ab4 100644 --- a/policycoreutils/setfiles/restorecon_xattr.8 +++ b/policycoreutils/setfiles/restorecon_xattr.8 @@ -23,7 +23,7 @@ or @@ -136,125 +133,8 @@ index 31fb82fd2099..bc22d3fd4560 100644 printf("\n"); } -diff --git a/policycoreutils/setfiles/ru/restorecon.8 b/policycoreutils/setfiles/ru/restorecon.8 -index 9be3a63db356..745135020f4b 100644 ---- a/policycoreutils/setfiles/ru/restorecon.8 -+++ b/policycoreutils/setfiles/ru/restorecon.8 -@@ -82,11 +82,11 @@ restorecon \- восстановить SELinux-контексты безопас - игнорировать файлы, которые не существуют. - .TP - .B \-I --игнорировать дайджест, чтобы принудительно проверить метки, даже если хранимый дайджест SHA1 соответствует дайджесту SHA1 файлов спецификации. Затем (при условии отсутствия ошибок) дайджест будет обновлён. Более подробные сведения доступны в разделе -+игнорировать дайджест, чтобы принудительно проверить метки, даже если хранимый дайджест SHA256 соответствует дайджесту SHA256 файлов спецификации. Затем (при условии отсутствия ошибок) дайджест будет обновлён. Более подробные сведения доступны в разделе - .B ПРИМЕЧАНИЯ. - .TP - .B \-D --установить или обновить дайджесты SHA1 для любых каталогов. Используйте этот параметр, чтобы включить использование расширенного атрибута -+установить или обновить дайджесты SHA256 для любых каталогов. Используйте этот параметр, чтобы включить использование расширенного атрибута - .IR security.restorecon_last. - .TP - .B \-m -@@ -159,7 +159,7 @@ GNU - .B \-D - команды - .B restorecon --обеспечит сохранение дайджеста SHA1 файлов спецификации по умолчанию в расширенном атрибуте с именем -+обеспечит сохранение дайджеста SHA256 файлов спецификации по умолчанию в расширенном атрибуте с именем - .IR security.restorecon_last - для каталогов, указанных в соответствующих путях - .IR pathname \ ... -@@ -173,7 +173,7 @@ GNU - .sp - Параметр - .B \-I --позволяет игнорировать дайджест SHA1 из каждого каталога, указанного в -+позволяет игнорировать дайджест SHA256 из каждого каталога, указанного в - .IR pathname \ ... - , и, при условии, что НЕ установлен параметр - .B \-n -diff --git a/policycoreutils/setfiles/ru/restorecon_xattr.8 b/policycoreutils/setfiles/ru/restorecon_xattr.8 -index 41c441b8c5c2..25c4c3033334 100644 ---- a/policycoreutils/setfiles/ru/restorecon_xattr.8 -+++ b/policycoreutils/setfiles/ru/restorecon_xattr.8 -@@ -23,7 +23,7 @@ restorecon_xattr \- управление записями расширенных - - .SH "ОПИСАНИЕ" - .B restorecon_xattr --покажет дайджесты SHA1, добавленные в расширенные атрибуты -+покажет дайджесты SHA256, добавленные в расширенные атрибуты - .I security.restorecon_last, - или полностью удалит эти атрибуты. Эти атрибуты устанавливаются командой - .BR restorecon (8) -@@ -47,11 +47,11 @@ restorecon_xattr \- управление записями расширенных - .sp - По умолчанию - .B restorecon_xattr --показывает дайджесты SHA1, добавляя в конце "Match", если они соответствуют установленному по умолчанию файлу спецификации или файлу спецификации -+показывает дайджесты SHA256, добавляя в конце "Match", если они соответствуют установленному по умолчанию файлу спецификации или файлу спецификации - .I specfile, - который установлен с помощью параметра - .B \-f. --Несоответствующие дайджесты SHA1 будут показаны с добавлением "No Match" в конце. -+Несоответствующие дайджесты SHA256 будут показаны с добавлением "No Match" в конце. - Эту возможность можно отключить с помощью параметра - .B \-n. - -@@ -81,7 +81,7 @@ restorecon_xattr \- управление записями расширенных - рекурсивно спускаться по каталогам. - .TP - .B \-v --показать дайджест SHA1, созданный установленным файлом спецификации. -+показать дайджест SHA256, созданный установленным файлом спецификации. - .TP - .B \-e - .I directory -@@ -97,7 +97,7 @@ restorecon_xattr \- управление записями расширенных - .BR file_contexts (5). - Он будет использоваться - .BR selabel_open (3) --для получения набора записей меток; получение дайджеста SHA1 выполняется с помощью -+для получения набора записей меток; получение дайджеста SHA256 выполняется с помощью - .BR selabel_digest (3). - Если этот параметр не указан, будет использоваться файл file_contexts по умолчанию. - -diff --git a/policycoreutils/setfiles/ru/setfiles.8 b/policycoreutils/setfiles/ru/setfiles.8 -index 910101452625..7f2daa09191b 100644 ---- a/policycoreutils/setfiles/ru/setfiles.8 -+++ b/policycoreutils/setfiles/ru/setfiles.8 -@@ -69,11 +69,11 @@ setfiles \- установить SELinux-контексты безопаснос - игнорировать файлы, которые не существуют. - .TP - .B \-I --игнорировать дайджест, чтобы принудительно проверить метки, даже если хранимый дайджест SHA1 соответствует дайджесту SHA1 файлов спецификации. Затем (при условии отсутствия ошибок) дайджест будет обновлён. Более подробные сведения доступны в разделе -+игнорировать дайджест, чтобы принудительно проверить метки, даже если хранимый дайджест SHA256 соответствует дайджесту SHA256 файлов спецификации. Затем (при условии отсутствия ошибок) дайджест будет обновлён. Более подробные сведения доступны в разделе - .B ПРИМЕЧАНИЯ. - .TP - .B \-D --установить или обновить дайджесты SHA1 для любых каталогов. Используйте этот параметр, чтобы включить использование расширенного атрибута -+установить или обновить дайджесты SHA256 для любых каталогов. Используйте этот параметр, чтобы включить использование расширенного атрибута - .IR security.restorecon_last. - .TP - .B \-l -@@ -186,7 +186,7 @@ GNU - .B \-D - команды - .B setfiles . --Он обеспечивает сохранение дайджеста SHA1 файла спецификации -+Он обеспечивает сохранение дайджеста SHA256 файла спецификации - .B spec_file - в расширенном атрибуте с именем - .IR security.restorecon_last -@@ -204,7 +204,7 @@ GNU - .sp - Параметр - .B \-I --позволяет игнорировать дайджест SHA1 из каждого каталога, указанного в -+позволяет игнорировать дайджест SHA256 из каждого каталога, указанного в - .IR pathname \ ... - , и, при условии, что НЕ установлен параметр - .B \-n diff --git a/policycoreutils/setfiles/setfiles.8 b/policycoreutils/setfiles/setfiles.8 -index bf26e161a71d..36fe6b369548 100644 +index ee01725050bb..57c663a99d67 100644 --- a/policycoreutils/setfiles/setfiles.8 +++ b/policycoreutils/setfiles/setfiles.8 @@ -95,14 +95,14 @@ display usage information and exit. @@ -294,5 +174,5 @@ index bf26e161a71d..36fe6b369548 100644 and provided the .B \-n -- -2.39.1 +2.41.0 diff --git a/SOURCES/0008-sepolicy-Drop-old-interface-file_type_is_executable-.patch b/SOURCES/0008-sepolicy-Drop-old-interface-file_type_is_executable-.patch index cf694e9..dd0c883 100644 --- a/SOURCES/0008-sepolicy-Drop-old-interface-file_type_is_executable-.patch +++ b/SOURCES/0008-sepolicy-Drop-old-interface-file_type_is_executable-.patch @@ -1,4 +1,4 @@ -From b9b94a3254905518f00c4746c0bd712921af31cb Mon Sep 17 00:00:00 2001 +From ada7ed4b14f24086a4d1147fc281ca2d61e744eb Mon Sep 17 00:00:00 2001 From: Petr Lautrbach Date: Mon, 27 Feb 2017 17:12:39 +0100 Subject: [PATCH] sepolicy: Drop old interface file_type_is_executable(f) and @@ -12,7 +12,7 @@ Content-type: text/plain 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/python/sepolicy/sepolicy/manpage.py b/python/sepolicy/sepolicy/manpage.py -index 11809dcede43..543fef6c8d13 100755 +index 70a8ce848900..572c493f6a15 100755 --- a/python/sepolicy/sepolicy/manpage.py +++ b/python/sepolicy/sepolicy/manpage.py @@ -127,8 +127,24 @@ def gen_domains(): @@ -60,5 +60,5 @@ index 11809dcede43..543fef6c8d13 100755 if f in self.fcdict: mpaths = mpaths + self.fcdict[f]["regex"] -- -2.39.1 +2.41.0 diff --git a/SOURCES/0009-python-chcat-Improve-man-pages.patch b/SOURCES/0009-python-chcat-Improve-man-pages.patch deleted file mode 100644 index 0fa3615..0000000 --- a/SOURCES/0009-python-chcat-Improve-man-pages.patch +++ /dev/null @@ -1,75 +0,0 @@ -From 09ad91e1fb8640e48cef895ead49d9c770016915 Mon Sep 17 00:00:00 2001 -From: Vit Mojzis -Date: Thu, 4 May 2023 14:04:47 +0200 -Subject: [PATCH] python/chcat: Improve man pages -Content-type: text/plain - -- Explain applying range/list of categories -- "-d" removes all categories of given file/user -- Add examples - -Signed-off-by: Vit Mojzis -Acked-by: James Carter ---- - python/chcat/chcat.8 | 23 ++++++++++++++++------- - 1 file changed, 16 insertions(+), 7 deletions(-) - -diff --git a/python/chcat/chcat.8 b/python/chcat/chcat.8 -index d095a2558d3a..3e1f7ca23361 100644 ---- a/python/chcat/chcat.8 -+++ b/python/chcat/chcat.8 -@@ -1,6 +1,6 @@ - .TH CHCAT "8" "September 2005" "chcat" "User Commands" - .SH NAME --chcat \- change file SELinux security category -+chcat \- change SELinux security categories of files/users - .SH SYNOPSIS - .B chcat - \fIcategory file\fR... -@@ -25,23 +25,33 @@ chcat \- change file SELinux security category - .br - .SH DESCRIPTION - .PP --Change/Remove the security \fIcategory\fR for each \fIfile\fR or \fIuser\fR. --.PP --Use +/- to add/remove categories from a \fIfile\fR or \fIuser\fR. -+Use +/- to add/remove categories from a \fIfile\fR or \fIuser\fR (only a single category can be specified at a time). Or specify the desired list/range of categories to be applied (replacing the existing categories). - .PP - .B - Note: --When removing a category you must specify '\-\-' on the command line before using the \-Category syntax. This tells the command that you have finished entering options and are now specifying a category name instead. -+When removing a category you must specify '\-\-' on the command line before using the \-Category syntax. This tells the command that you have finished entering options and are now specifying a category name instead. - - .TP - \fB\-d\fR --delete the category from each FILE/USER. -+delete all categories from given FILE/USER. - .TP - \fB\-L\fR - list available categories. - .TP - \fB\-l\fR - Tells chcat to operate on users instead of files. -+ -+.SH EXAMPLE -+.nf -+Replace categories of user "test" with c0.c6 -+# chcat -l c0.c6 test -+Add category c1023 to user "test" -+# chcat -l +c1023 test -+Remove category c5 from file "file" -+# chcat -- -c5 file -+Remove all categories from file "file" -+# chcat -d file -+ - .SH "SEE ALSO" - .TP - chcon(1), selinux(8), semanage(8) -@@ -52,4 +62,3 @@ When operating on files this script wraps the chcon command. - /etc/selinux/{SELINUXTYPE}/setrans.conf - .br - /etc/selinux/{SELINUXTYPE}/seusers -- --- -2.41.0 - diff --git a/SOURCES/0017-python-sepolicy-Fix-spec-file-dependencies.patch b/SOURCES/0009-python-sepolicy-Fix-spec-file-dependencies.patch similarity index 94% rename from SOURCES/0017-python-sepolicy-Fix-spec-file-dependencies.patch rename to SOURCES/0009-python-sepolicy-Fix-spec-file-dependencies.patch index 64ce655..626e22f 100644 --- a/SOURCES/0017-python-sepolicy-Fix-spec-file-dependencies.patch +++ b/SOURCES/0009-python-sepolicy-Fix-spec-file-dependencies.patch @@ -1,4 +1,4 @@ -From 1af71ea06bbb57082a627854ec77134428f8fb15 Mon Sep 17 00:00:00 2001 +From 5bd2a3a01ee3b645b5b665be4ef95ddae72806ee Mon Sep 17 00:00:00 2001 From: Vit Mojzis Date: Tue, 30 May 2023 09:07:28 +0200 Subject: [PATCH] python/sepolicy: Fix spec file dependencies @@ -14,7 +14,7 @@ Signed-off-by: Vit Mojzis 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/python/sepolicy/sepolicy/templates/spec.py b/python/sepolicy/sepolicy/templates/spec.py -index 16a22081b44b..cb3b2f63005b 100644 +index 433c298a17e0..a6d4508bb670 100644 --- a/python/sepolicy/sepolicy/templates/spec.py +++ b/python/sepolicy/sepolicy/templates/spec.py @@ -11,18 +11,20 @@ Version: 1.0 diff --git a/SOURCES/0010-Revert-Do-not-automatically-install-Russian-translat.patch b/SOURCES/0010-Revert-Do-not-automatically-install-Russian-translat.patch new file mode 100644 index 0000000..a8f81c1 --- /dev/null +++ b/SOURCES/0010-Revert-Do-not-automatically-install-Russian-translat.patch @@ -0,0 +1,264 @@ +From a87290f734ba136e7b648a9ce9754767cbb5eed3 Mon Sep 17 00:00:00 2001 +From: Petr Lautrbach +Date: Mon, 13 Nov 2023 13:37:36 +0100 +Subject: [PATCH] Revert "Do not automatically install Russian translations" +Content-type: text/plain + +This reverts commit 14f35fde50cd080650ac3b0136234464a3ea6fbe. +--- + gui/Makefile | 2 +- + policycoreutils/load_policy/Makefile | 2 +- + policycoreutils/man/Makefile | 2 +- + policycoreutils/newrole/Makefile | 2 +- + policycoreutils/run_init/Makefile | 2 +- + policycoreutils/scripts/Makefile | 2 +- + policycoreutils/secon/Makefile | 2 +- + policycoreutils/semodule/Makefile | 2 +- + policycoreutils/sestatus/Makefile | 2 +- + policycoreutils/setfiles/Makefile | 2 +- + policycoreutils/setsebool/Makefile | 2 +- + python/audit2allow/Makefile | 2 +- + python/chcat/Makefile | 2 +- + python/semanage/Makefile | 2 +- + python/sepolicy/Makefile | 2 +- + restorecond/Makefile | 2 +- + sandbox/Makefile | 2 +- + semodule-utils/semodule_expand/Makefile | 2 +- + semodule-utils/semodule_link/Makefile | 2 +- + semodule-utils/semodule_package/Makefile | 2 +- + 20 files changed, 20 insertions(+), 20 deletions(-) + +diff --git a/gui/Makefile b/gui/Makefile +index b29610d41b52..4035fb21b8c9 100644 +--- a/gui/Makefile ++++ b/gui/Makefile +@@ -1,5 +1,5 @@ + # Installation directories. +-LINGUAS ?= ++LINGUAS ?= ru + PREFIX ?= /usr + BINDIR ?= $(PREFIX)/bin + SHAREDIR ?= $(PREFIX)/share/system-config-selinux +diff --git a/policycoreutils/load_policy/Makefile b/policycoreutils/load_policy/Makefile +index ad80d500e53c..c1ba805b6a9a 100644 +--- a/policycoreutils/load_policy/Makefile ++++ b/policycoreutils/load_policy/Makefile +@@ -1,5 +1,5 @@ + # Installation directories. +-LINGUAS ?= ++LINGUAS ?= ru + PREFIX ?= /usr + SBINDIR ?= $(PREFIX)/sbin + MANDIR ?= $(PREFIX)/share/man +diff --git a/policycoreutils/man/Makefile b/policycoreutils/man/Makefile +index a4539f243b26..94bbf58652ad 100644 +--- a/policycoreutils/man/Makefile ++++ b/policycoreutils/man/Makefile +@@ -1,5 +1,5 @@ + # Installation directories. +-LINGUAS ?= ++LINGUAS ?= ru + PREFIX ?= /usr + MANDIR ?= $(PREFIX)/share/man + MAN5DIR ?= $(MANDIR)/man5 +diff --git a/policycoreutils/newrole/Makefile b/policycoreutils/newrole/Makefile +index 4b8145d35a8b..b3ccf671a9ae 100644 +--- a/policycoreutils/newrole/Makefile ++++ b/policycoreutils/newrole/Makefile +@@ -1,5 +1,5 @@ + # Installation directories. +-LINGUAS ?= ++LINGUAS ?= ru + PREFIX ?= /usr + BINDIR ?= $(PREFIX)/bin + MANDIR ?= $(PREFIX)/share/man +diff --git a/policycoreutils/run_init/Makefile b/policycoreutils/run_init/Makefile +index 619ebc1d7554..e86364a496e6 100644 +--- a/policycoreutils/run_init/Makefile ++++ b/policycoreutils/run_init/Makefile +@@ -1,6 +1,6 @@ + + # Installation directories. +-LINGUAS ?= ++LINGUAS ?= ru + PREFIX ?= /usr + SBINDIR ?= $(PREFIX)/sbin + MANDIR ?= $(PREFIX)/share/man +diff --git a/policycoreutils/scripts/Makefile b/policycoreutils/scripts/Makefile +index 6d8196c672d6..75e75b80a100 100644 +--- a/policycoreutils/scripts/Makefile ++++ b/policycoreutils/scripts/Makefile +@@ -1,5 +1,5 @@ + # Installation directories. +-LINGUAS ?= ++LINGUAS ?= ru + PREFIX ?= /usr + SBINDIR ?= $(PREFIX)/sbin + MANDIR ?= $(PREFIX)/share/man +diff --git a/policycoreutils/secon/Makefile b/policycoreutils/secon/Makefile +index 440503a14682..576a6203dfa3 100644 +--- a/policycoreutils/secon/Makefile ++++ b/policycoreutils/secon/Makefile +@@ -1,5 +1,5 @@ + # secon tool - command-line context +-LINGUAS ?= ++LINGUAS ?= ru + PREFIX ?= /usr + BINDIR ?= $(PREFIX)/bin + MANDIR ?= $(PREFIX)/share/man +diff --git a/policycoreutils/semodule/Makefile b/policycoreutils/semodule/Makefile +index 9fbf99d6177e..73801e487a76 100644 +--- a/policycoreutils/semodule/Makefile ++++ b/policycoreutils/semodule/Makefile +@@ -1,5 +1,5 @@ + # Installation directories. +-LINGUAS ?= ++LINGUAS ?= ru + PREFIX ?= /usr + SBINDIR ?= $(PREFIX)/sbin + MANDIR = $(PREFIX)/share/man +diff --git a/policycoreutils/sestatus/Makefile b/policycoreutils/sestatus/Makefile +index aebf050c2fb9..3dbb792bf5e5 100644 +--- a/policycoreutils/sestatus/Makefile ++++ b/policycoreutils/sestatus/Makefile +@@ -1,5 +1,5 @@ + # Installation directories. +-LINGUAS ?= ++LINGUAS ?= ru + PREFIX ?= /usr + BINDIR ?= $(PREFIX)/bin + SBINDIR ?= $(PREFIX)/sbin +diff --git a/policycoreutils/setfiles/Makefile b/policycoreutils/setfiles/Makefile +index 84ffb08bf412..d7670a8ff54b 100644 +--- a/policycoreutils/setfiles/Makefile ++++ b/policycoreutils/setfiles/Makefile +@@ -1,5 +1,5 @@ + # Installation directories. +-LINGUAS ?= ++LINGUAS ?= ru + PREFIX ?= /usr + SBINDIR ?= /sbin + MANDIR = $(PREFIX)/share/man +diff --git a/policycoreutils/setsebool/Makefile b/policycoreutils/setsebool/Makefile +index fc5b4ff63c01..c1440c1c04c8 100644 +--- a/policycoreutils/setsebool/Makefile ++++ b/policycoreutils/setsebool/Makefile +@@ -1,5 +1,5 @@ + # Installation directories. +-LINGUAS ?= ++LINGUAS ?= ru + PREFIX ?= /usr + SBINDIR ?= $(PREFIX)/sbin + MANDIR = $(PREFIX)/share/man +diff --git a/python/audit2allow/Makefile b/python/audit2allow/Makefile +index fb04b8bdc72e..76bf4e37f9a3 100644 +--- a/python/audit2allow/Makefile ++++ b/python/audit2allow/Makefile +@@ -2,7 +2,7 @@ PYTHON ?= python3 + SECILC ?= secilc + + # Installation directories. +-LINGUAS ?= ++LINGUAS ?= ru + PREFIX ?= /usr + BINDIR ?= $(PREFIX)/bin + MANDIR ?= $(PREFIX)/share/man +diff --git a/python/chcat/Makefile b/python/chcat/Makefile +index 7b3ee17f49b1..e4873bf4ff8f 100644 +--- a/python/chcat/Makefile ++++ b/python/chcat/Makefile +@@ -1,5 +1,5 @@ + # Installation directories. +-LINGUAS ?= ++LINGUAS ?= ru + PREFIX ?= /usr + BINDIR ?= $(PREFIX)/bin + MANDIR ?= $(PREFIX)/share/man +diff --git a/python/semanage/Makefile b/python/semanage/Makefile +index 628d135a8606..b53ee33db6ac 100644 +--- a/python/semanage/Makefile ++++ b/python/semanage/Makefile +@@ -1,7 +1,7 @@ + PYTHON ?= python3 + + # Installation directories. +-LINGUAS ?= ++LINGUAS ?= ru + PREFIX ?= /usr + SBINDIR ?= $(PREFIX)/sbin + MANDIR = $(PREFIX)/share/man +diff --git a/python/sepolicy/Makefile b/python/sepolicy/Makefile +index 1a26cfdce6cc..4e9e93d0779e 100644 +--- a/python/sepolicy/Makefile ++++ b/python/sepolicy/Makefile +@@ -1,7 +1,7 @@ + PYTHON ?= python3 + + # Installation directories. +-LINGUAS ?= ++LINGUAS ?= ru + PREFIX ?= /usr + BINDIR ?= $(PREFIX)/bin + MANDIR ?= $(PREFIX)/share/man +diff --git a/restorecond/Makefile b/restorecond/Makefile +index 1ddfcc9265ce..8e9a5ef1cfa1 100644 +--- a/restorecond/Makefile ++++ b/restorecond/Makefile +@@ -1,7 +1,7 @@ + PKG_CONFIG ?= pkg-config + + # Installation directories. +-LINGUAS ?= ++LINGUAS ?= ru + PREFIX ?= /usr + SBINDIR ?= $(PREFIX)/sbin + MANDIR = $(PREFIX)/share/man +diff --git a/sandbox/Makefile b/sandbox/Makefile +index 360a8bc5c125..84cb5a39bf7e 100644 +--- a/sandbox/Makefile ++++ b/sandbox/Makefile +@@ -1,7 +1,7 @@ + PYTHON ?= python3 + + # Installation directories. +-LINGUAS ?= ++LINGUAS ?= ru + PREFIX ?= /usr + SYSCONFDIR ?= /etc/sysconfig + BINDIR ?= $(PREFIX)/bin +diff --git a/semodule-utils/semodule_expand/Makefile b/semodule-utils/semodule_expand/Makefile +index ad776b15166c..e63dcff246d9 100644 +--- a/semodule-utils/semodule_expand/Makefile ++++ b/semodule-utils/semodule_expand/Makefile +@@ -1,5 +1,5 @@ + # Installation directories. +-LINGUAS ?= ++LINGUAS ?= ru + PREFIX ?= /usr + BINDIR ?= $(PREFIX)/bin + MANDIR ?= $(PREFIX)/share/man +diff --git a/semodule-utils/semodule_link/Makefile b/semodule-utils/semodule_link/Makefile +index 936d161cc16f..c5cf69cd9ca3 100644 +--- a/semodule-utils/semodule_link/Makefile ++++ b/semodule-utils/semodule_link/Makefile +@@ -1,5 +1,5 @@ + # Installation directories. +-LINGUAS ?= ++LINGUAS ?= ru + PREFIX ?= /usr + BINDIR ?= $(PREFIX)/bin + MANDIR ?= $(PREFIX)/share/man +diff --git a/semodule-utils/semodule_package/Makefile b/semodule-utils/semodule_package/Makefile +index 6a289f732a7e..680ab836cfe6 100644 +--- a/semodule-utils/semodule_package/Makefile ++++ b/semodule-utils/semodule_package/Makefile +@@ -1,5 +1,5 @@ + # Installation directories. +-LINGUAS ?= ++LINGUAS ?= ru + PREFIX ?= /usr + BINDIR ?= $(PREFIX)/bin + MANDIR ?= $(PREFIX)/share/man +-- +2.41.0 + diff --git a/SOURCES/0010-python-audit2allow-Add-missing-options-to-man-page.patch b/SOURCES/0010-python-audit2allow-Add-missing-options-to-man-page.patch deleted file mode 100644 index f85a2f2..0000000 --- a/SOURCES/0010-python-audit2allow-Add-missing-options-to-man-page.patch +++ /dev/null @@ -1,80 +0,0 @@ -From b67240b8663c3df471e8ce06b087ec7fb8b9d57c Mon Sep 17 00:00:00 2001 -From: Vit Mojzis -Date: Thu, 4 May 2023 14:04:48 +0200 -Subject: [PATCH] python/audit2allow: Add missing options to man page -Content-type: text/plain - -Signed-off-by: Vit Mojzis ---- - python/audit2allow/audit2allow.1 | 24 +++++++++++++++++++----- - 1 file changed, 19 insertions(+), 5 deletions(-) - -diff --git a/python/audit2allow/audit2allow.1 b/python/audit2allow/audit2allow.1 -index 04ec32398011..c31021d39489 100644 ---- a/python/audit2allow/audit2allow.1 -+++ b/python/audit2allow/audit2allow.1 -@@ -40,10 +40,10 @@ - Read input from audit and message log, conflicts with \-i - .TP - .B "\-b" | "\-\-boot" --Read input from audit messages since last boot conflicts with \-i -+Read input from audit messages since last boot, conflicts with \-i - .TP - .B "\-d" | "\-\-dmesg" --Read input from output of -+Read input from output of - .I /bin/dmesg. - Note that all audit messages are not available via dmesg when - auditd is running; use "ausearch \-m avc | audit2allow" or "\-a" instead. -@@ -51,15 +51,22 @@ auditd is running; use "ausearch \-m avc | audit2allow" or "\-a" instead. - .B "\-D" | "\-\-dontaudit" - Generate dontaudit rules (Default: allow) - .TP -+.B "\-e" | "\-\-explain" -+Fully explain generated output -+.TP - .B "\-h" | "\-\-help" - Print a short usage message - .TP - .B "\-i " | "\-\-input " --read input from -+Read input from - .I - .TP -+.B "\-\-interface-info=" -+Read interface information from -+.I -+.TP - .B "\-l" | "\-\-lastreload" --read input only after last policy reload -+Read input only after last policy reload - .TP - .B "\-m " | "\-\-module " - Generate module/require output -@@ -70,8 +77,12 @@ Generate loadable module package, conflicts with \-o - .B "\-p " | "\-\-policy " - Policy file to use for analysis - .TP -+.B "\-\-perm-map " -+Read permission map from -+.I -+.TP - .B "\-o " | "\-\-output " --append output to -+Append output to - .I - .TP - .B "\-r" | "\-\-requires" -@@ -85,6 +96,9 @@ This is the default behavior. - Generate reference policy using installed macros. - This attempts to match denials against interfaces and may be inaccurate. - .TP -+.B "\-t " | "\-\-type=" -+Only process messages with a type that matches this regex -+.TP - .B "\-x" | "\-\-xperms" - Generate extended permission access vector rules - .TP --- -2.41.0 - diff --git a/SOURCES/0011-Revert-semodule-utils-Remove-the-Russian-translation.patch b/SOURCES/0011-Revert-semodule-utils-Remove-the-Russian-translation.patch new file mode 100644 index 0000000..8e04a56 --- /dev/null +++ b/SOURCES/0011-Revert-semodule-utils-Remove-the-Russian-translation.patch @@ -0,0 +1,180 @@ +From 3895de8ec117fc9a9368ac34d8cc89805ac65b1e Mon Sep 17 00:00:00 2001 +From: Petr Lautrbach +Date: Mon, 13 Nov 2023 13:37:44 +0100 +Subject: [PATCH] Revert "semodule-utils: Remove the Russian translations" +Content-type: text/plain + +This reverts commit 5149c39a4ed20ab170f4c4ae1893ff68cf7b7b21. +--- + .../semodule_expand/ru/semodule_expand.8 | 31 ++++++++++++ + .../semodule_link/ru/semodule_link.8 | 32 +++++++++++++ + .../semodule_package/ru/semodule_package.8 | 48 +++++++++++++++++++ + .../semodule_package/ru/semodule_unpackage.8 | 24 ++++++++++ + 4 files changed, 135 insertions(+) + create mode 100644 semodule-utils/semodule_expand/ru/semodule_expand.8 + create mode 100644 semodule-utils/semodule_link/ru/semodule_link.8 + create mode 100644 semodule-utils/semodule_package/ru/semodule_package.8 + create mode 100644 semodule-utils/semodule_package/ru/semodule_unpackage.8 + +diff --git a/semodule-utils/semodule_expand/ru/semodule_expand.8 b/semodule-utils/semodule_expand/ru/semodule_expand.8 +new file mode 100644 +index 000000000000..28b381af6001 +--- /dev/null ++++ b/semodule-utils/semodule_expand/ru/semodule_expand.8 +@@ -0,0 +1,31 @@ ++.TH SEMODULE_EXPAND "8" "ноябрь 2005" "Security Enhanced Linux" ++.SH ИМЯ ++semodule_expand \- расширить пакет модуля политики SELinux ++ ++.SH ОБЗОР ++.B semodule_expand [-V ] [ -a ] [ -c [version]] basemodpkg outputfile ++.br ++.SH ОПИСАНИЕ ++.PP ++semodule_expand - утилита разработки для ручного расширения пакета базового модуля политики в двоичный файл политики ядра. ++Это средство не является необходимым для нормальной работы SELinux. Обычно такое расширение выполняется libsemanage внутренним образом в ответ на команды semodule. Пакеты базовых модулей политики можно создавать непосредственно с помощью semodule_package или semodule_link (при связывании набора пакетов в один пакет). ++ ++.SH "ПАРАМЕТРЫ" ++.TP ++.B \-V ++Показать версию ++.TP ++.B \-c [version] ++Версия политики, которую следует создать ++.TP ++.B \-a ++Не проверять утверждения. При использовании этого параметра политика не будет проверять запрещающие правила (neverallow). ++ ++.SH СМОТРИТЕ ТАКЖЕ ++.B checkmodule(8), semodule_package(8), semodule(8), semodule_link(8) ++(8), ++.SH АВТОРЫ ++.nf ++Эта страница руководства была написана Dan Walsh . ++Программа была написана Karl MacMillan , Joshua Brindle . ++Перевод на русский язык выполнила Герасименко Олеся . +diff --git a/semodule-utils/semodule_link/ru/semodule_link.8 b/semodule-utils/semodule_link/ru/semodule_link.8 +new file mode 100644 +index 000000000000..4a8f414e0e8e +--- /dev/null ++++ b/semodule-utils/semodule_link/ru/semodule_link.8 +@@ -0,0 +1,32 @@ ++.TH SEMODULE_LINK "8" "Ноябрь 2005" "Security Enhanced Linux" ++.SH ИМЯ ++semodule_link \- связать вместе пакеты модулей политики SELinux ++ ++.SH ОБЗОР ++.B semodule_link [-Vv] [-o outfile] basemodpkg modpkg1 [modpkg2]... ++.br ++.SH ОПИСАНИЕ ++.PP ++semodule_link - утилита разработки для ручного связывания набора пакетов модулей политики SELinux в один пакет модулей политики. ++Это средство не является необходимым для нормальной работы SELinux. Обычно такое связывание выполняется libsemanage внутренним образом в ответ на команды semodule. Пакеты модулей создаются с помощью semodule_package. ++ ++.SH "ПАРАМЕТРЫ" ++.TP ++.B \-V ++Показать версию ++.TP ++.B \-v ++Подробный режим ++.TP ++.B \-o ++Связанный пакет модулей политики, созданный с помощью этого средства ++ ++ ++.SH СМОТРИТЕ ТАКЖЕ ++.B checkmodule(8), semodule_package(8), semodule(8), semodule_expand(8) ++(8), ++.SH АВТОРЫ ++.nf ++Эта страница руководства была написана Dan Walsh . ++Программа была написана Karl MacMillan . ++Перевод на русский язык выполнила Герасименко Олеся . +diff --git a/semodule-utils/semodule_package/ru/semodule_package.8 b/semodule-utils/semodule_package/ru/semodule_package.8 +new file mode 100644 +index 000000000000..3f4b16a93322 +--- /dev/null ++++ b/semodule-utils/semodule_package/ru/semodule_package.8 +@@ -0,0 +1,48 @@ ++.TH SEMODULE_PACKAGE "8" "Ноябрь 2005" "Security Enhanced Linux" ++.SH ИМЯ ++semodule_package \- создать пакет модуля политики SELinux ++ ++.SH ОБЗОР ++.B semodule_package \-o \-m [\-f ] ++.br ++.SH ОПИСАНИЕ ++.PP ++semodule_package - утилита, которая используется для создания пакета модуля политики SELinux из двоичного модуля политики и (необязательно) других данных, таких как контексты файлов. Команда semodule_package упаковывает двоичные модули политики, созданные с помощью checkmodule. Пакет политики, созданный с помощью semodule_package, затем можно установить через semodule. ++ ++.SH ПРИМЕР ++.nf ++# Собрать пакет политики для базового модуля. ++$ semodule_package \-o base.pp \-m base.mod \-f file_contexts ++# Собрать пакет политики для модуля httpd. ++$ semodule_package \-o httpd.pp \-m httpd.mod \-f httpd.fc ++# Собрать пакет политики для локальных правил принудительного присвоения типов, не включая контексты файлов. ++$ semodule_package \-o local.pp \-m local.mod ++.fi ++ ++.SH "ПАРАМЕТРЫ" ++.TP ++.B \-o \-\-outfile ++Файл пакета модуля политики, созданный этим средством. ++.TP ++.B \-s \-\-seuser ++Файл seuser, который следует включить в пакет. ++.TP ++.B \-u \-\-user_extra ++Файл user_extra, который следует включить в пакет. ++.TP ++.B \-m \-\-module ++Файл модуля политики, который следует включить в пакет. ++.TP ++.B \-f \-\-fc ++Файл контекстов файлов для модуля (необязательно). ++.TP ++.B \-n \-\-nc ++Файл контекста netfilter, который следует включить в пакет. ++ ++.SH СМОТРИТЕ ТАКЖЕ ++.B checkmodule(8), semodule(8), semodule_unpackage(8) ++.SH АВТОРЫ ++.nf ++Эта страница руководства была написана Dan Walsh . ++Программа была написана Karl MacMillan . ++Перевод на русский язык выполнила Герасименко Олеся . +diff --git a/semodule-utils/semodule_package/ru/semodule_unpackage.8 b/semodule-utils/semodule_package/ru/semodule_unpackage.8 +new file mode 100644 +index 000000000000..057ae3d752f7 +--- /dev/null ++++ b/semodule-utils/semodule_package/ru/semodule_unpackage.8 +@@ -0,0 +1,24 @@ ++.TH SEMODULE_PACKAGE "8" "Ноябрь 2005" "Security Enhanced Linux" ++.SH ИМЯ ++semodule_unpackage \- извлечь модуль политики и файл контекстов файлов из пакета модуля политики SELinux ++ ++.SH ОБЗОР ++.B semodule_unpackage ppfile modfile [fcfile] ++.br ++.SH ОПИСАНИЕ ++.PP ++semodule_unpackage - утилита, которая используется для извлечения файла модуля политики SELinux и файла контекстов файлов из пакета политики SELinux. ++ ++.SH ПРИМЕР ++.nf ++# Извлечь файл модуля httpd из пакета политики httpd. ++$ semodule_unpackage httpd.pp httpd.mod httpd.fc ++.fi ++ ++.SH СМОТРИТЕ ТАКЖЕ ++.B semodule_package(8) ++.SH АВТОРЫ ++.nf ++Эта страница руководства была написана Dan Walsh . ++Программа была написана Stephen Smalley . ++Перевод на русский язык выполнила Герасименко Олеся . +-- +2.41.0 + diff --git a/SOURCES/0011-python-semanage-Improve-man-pages.patch b/SOURCES/0011-python-semanage-Improve-man-pages.patch deleted file mode 100644 index ce1f718..0000000 --- a/SOURCES/0011-python-semanage-Improve-man-pages.patch +++ /dev/null @@ -1,465 +0,0 @@ -From 4ebc1057f6e5494909045bbcc7ea8896bd32a094 Mon Sep 17 00:00:00 2001 -From: Vit Mojzis -Date: Thu, 4 May 2023 14:04:49 +0200 -Subject: [PATCH] python/semanage: Improve man pages -Content-type: text/plain - -- Add missing options -- Add more examples -- Note special cases - -Signed-off-by: Vit Mojzis ---- - python/semanage/semanage-boolean.8 | 9 ++++++--- - python/semanage/semanage-dontaudit.8 | 8 +++++--- - python/semanage/semanage-export.8 | 10 +++++++++- - python/semanage/semanage-fcontext.8 | 17 +++++++++++------ - python/semanage/semanage-ibendport.8 | 6 ++++-- - python/semanage/semanage-ibpkey.8 | 6 ++++-- - python/semanage/semanage-import.8 | 10 +++++++++- - python/semanage/semanage-interface.8 | 8 ++++++-- - python/semanage/semanage-login.8 | 14 ++++++++------ - python/semanage/semanage-module.8 | 15 ++++++++++----- - python/semanage/semanage-node.8 | 16 +++++++++++++--- - python/semanage/semanage-permissive.8 | 8 +++++--- - python/semanage/semanage-port.8 | 10 ++++++---- - python/semanage/semanage-user.8 | 8 +++++--- - 14 files changed, 101 insertions(+), 44 deletions(-) - -diff --git a/python/semanage/semanage-boolean.8 b/python/semanage/semanage-boolean.8 -index 1282d10626ff..3b664023d3fe 100644 ---- a/python/semanage/semanage-boolean.8 -+++ b/python/semanage/semanage-boolean.8 -@@ -7,11 +7,14 @@ semanage\-boolean \- SELinux Policy Management boolean tool - .SH "DESCRIPTION" - semanage is used to configure certain elements of - SELinux policy without requiring modification to or recompilation --from policy sources. semanage boolean command controls the settings of booleans in SELinux policy. booleans are if\-then\-else rules written in SELinux Policy. They can be used to customize the way that SELinux Policy rules effect a confined domain. -+from policy sources. -+.B semanage boolean -+command controls the settings of booleans in SELinux policy. Booleans are if\-then\-else rules written in SELinux Policy. They can be used to customize the way that SELinux Policy rules effect a confined domain. -+ - .SH "OPTIONS" - .TP - .I \-h, \-\-help --show this help message and exit -+Show this help message and exit - .TP - .I \-n, \-\-noheading - Do not print heading when listing the specified object type -@@ -45,7 +48,7 @@ Disable the boolean - - .SH EXAMPLE - .nf --Turn on the apache can send mail boolean -+Turn on the "apache can send mail" boolean (persistent version of #setsebool httpd_can_sendmail on) - # semanage boolean \-m \-\-on httpd_can_sendmail - - List customized booleans -diff --git a/python/semanage/semanage-dontaudit.8 b/python/semanage/semanage-dontaudit.8 -index 81accc6f83de..51d1f4b6b0e0 100644 ---- a/python/semanage/semanage-dontaudit.8 -+++ b/python/semanage/semanage-dontaudit.8 -@@ -7,13 +7,15 @@ - .SH "DESCRIPTION" - semanage is used to configure certain elements of - SELinux policy without requiring modification to or recompilation --from policy sources. semanage dontaudit toggles whether or not dontaudit rules will be in the policy. Policy writers use dontaudit rules to cause --confined applications to use alternative paths. Dontaudit rules are denied but not reported in the logs. Some times dontaudit rules can cause bugs in applications but policy writers will not realize it since the AVC is not audited. Turning off dontaudit rules with this command to see if the kernel is blocking an access. -+from policy sources. -+.B semanage dontaudit -+toggles whether or not dontaudit rules will be in the policy. Policy writers use dontaudit rules to cause -+confined applications to use alternative paths. Dontaudit rules are denied but not reported in the logs. Sometimes dontaudit rules can cause bugs in applications but policy writers will not realize it since the AVC is not audited. Turn off dontaudit rules with this command to see if the kernel is blocking an access. - - .SH "OPTIONS" - .TP - .I \-h, \-\-help --show this help message and exit -+Show this help message and exit - .TP - .I \-S STORE, \-\-store STORE - Select an alternate SELinux Policy Store to manage -diff --git a/python/semanage/semanage-export.8 b/python/semanage/semanage-export.8 -index d422683bd5c8..5198479306df 100644 ---- a/python/semanage/semanage-export.8 -+++ b/python/semanage/semanage-export.8 -@@ -7,7 +7,15 @@ - .SH "DESCRIPTION" - semanage is used to configure certain elements of - SELinux policy without requiring modification to or recompilation --from policy sources. semanage import and export can be used to extract the SELinux modifications from one machine and apply them to another. You can put a whole group of semanage commands within a file and apply them to a machine in a single transaction. -+from policy sources. -+.B semanage import -+and -+.B export -+can be used to extract the SELinux modifications from one machine and apply them to another. Please note that this will remove all current semanage customizations on the second machine as the command list generated using -+.B semanage export -+start with -+.I -D -+for all semanage sub-commands. You can put a whole group of semanage commands within a file and apply them to a machine in a single transaction. - - .SH "OPTIONS" - .TP -diff --git a/python/semanage/semanage-fcontext.8 b/python/semanage/semanage-fcontext.8 -index 1ebf085faed8..3e327d88d146 100644 ---- a/python/semanage/semanage-fcontext.8 -+++ b/python/semanage/semanage-fcontext.8 -@@ -8,8 +8,10 @@ semanage\-fcontext \- SELinux Policy Management file context tool - .SH "DESCRIPTION" - semanage is used to configure certain elements of - SELinux policy without requiring modification to or recompilation --from policy sources. semanage fcontext is used to manage the default --file system labeling on an SELinux system. This command maps file paths using regular expressions to SELinux labels. -+from policy sources. -+.B semanage fcontext -+is used to manage the default file system labeling on an SELinux system. -+This command maps file paths using regular expressions to SELinux labels. - - FILE_SPEC may contain either a fully qualified path, - or a Perl compatible regular expression (PCRE), -@@ -32,7 +34,7 @@ to avoid unintentionally impacting other parts of the filesystem. - .SH "OPTIONS" - .TP - .I \-h, \-\-help --show this help message and exit -+Show this help message and exit - .TP - .I \-n, \-\-noheading - Do not print heading when listing the specified object type -@@ -82,12 +84,13 @@ MLS/MCS Security Range (MLS/MCS Systems only) SELinux Range for SELinux login ma - - .SH EXAMPLE - .nf --.I remember to run restorecon after you set the file context --Add file-context for everything under /web -+.I Remember to run restorecon after you set the file context -+Add file-context httpd_sys_content_t for everything under /web - # semanage fcontext \-a \-t httpd_sys_content_t "/web(/.*)?" - # restorecon \-R \-v /web - - Substitute /home1 with /home when setting file context -+i.e. label everything under /home1 the same way /home is labeled - # semanage fcontext \-a \-e /home /home1 - # restorecon \-R \-v /home1 - -@@ -99,7 +102,9 @@ execute the following commands. - - .SH "SEE ALSO" - .BR selinux (8), --.BR semanage (8) -+.BR semanage (8), -+.BR restorecon (8), -+.BR selabel_file (5) - - .SH "AUTHOR" - This man page was written by Daniel Walsh -diff --git a/python/semanage/semanage-ibendport.8 b/python/semanage/semanage-ibendport.8 -index 0a29eae18031..53fe4ee8512a 100644 ---- a/python/semanage/semanage-ibendport.8 -+++ b/python/semanage/semanage-ibendport.8 -@@ -5,12 +5,14 @@ - .B semanage ibendport [\-h] [\-n] [\-N] [\-S STORE] [ \-\-add \-t TYPE \-z IBDEV_NAME \-r RANGE port | \-\-delete \-z IBDEV_NAME port | \-\-deleteall | \-\-extract | \-\-list [\-C] | \-\-modify \-t TYPE \-z IBDEV_NAME \-r RANGE port ] - - .SH "DESCRIPTION" --semanage is used to configure certain elements of SELinux policy without requiring modification to or recompilation from policy sources. semanage ibendport controls the ibendport number to ibendport type definitions. -+semanage is used to configure certain elements of SELinux policy without requiring modification to or recompilation from policy sources. -+.B semanage ibendport -+controls the ibendport number to ibendport type definitions. - - .SH "OPTIONS" - .TP - .I \-h, \-\-help --show this help message and exit -+Show this help message and exit - .TP - .I \-n, \-\-noheading - Do not print heading when listing the specified object type -diff --git a/python/semanage/semanage-ibpkey.8 b/python/semanage/semanage-ibpkey.8 -index 51f455abaeab..6cc5e02fbcb6 100644 ---- a/python/semanage/semanage-ibpkey.8 -+++ b/python/semanage/semanage-ibpkey.8 -@@ -5,12 +5,14 @@ - .B semanage ibpkey [\-h] [\-n] [\-N] [\-S STORE] [ \-\-add \-t TYPE \-x SUBNET_PREFIX \-r RANGE ibpkey_name | ibpkey_range | \-\-delete \-x SUBNET_PREFIX ibpkey_name | ibpkey_range | \-\-deleteall | \-\-extract | \-\-list [\-C] | \-\-modify \-t TYPE \-x SUBNET_PREFIX \-r RANGE ibpkey_name | ibpkey_range ] - - .SH "DESCRIPTION" --semanage is used to configure certain elements of SELinux policy without requiring modification to or recompilation from policy sources. semanage ibpkey controls the ibpkey number to ibpkey type definitions. -+semanage is used to configure certain elements of SELinux policy without requiring modification to or recompilation from policy sources. -+.B semanage ibpkey -+controls the ibpkey number to ibpkey type definitions. - - .SH "OPTIONS" - .TP - .I \-h, \-\-help --show this help message and exit -+Show this help message and exit - .TP - .I \-n, \-\-noheading - Do not print heading when listing the specified object type -diff --git a/python/semanage/semanage-import.8 b/python/semanage/semanage-import.8 -index 4a9b3e765f34..041e9ab052fb 100644 ---- a/python/semanage/semanage-import.8 -+++ b/python/semanage/semanage-import.8 -@@ -7,7 +7,15 @@ - .SH "DESCRIPTION" - semanage is used to configure certain elements of - SELinux policy without requiring modification to or recompilation --from policy sources. semanage import and export can be used to extract the SELinux modifications from one machine and apply them to another. You can put a whole group of semanage commands within a file and apply them to a machine in a single transaction. -+from policy sources. -+.B semanage import -+and -+.B export -+can be used to extract the SELinux modifications from one machine and apply them to another. Please note that this will remove all current semanage customizations on the second machine as the command list generated using -+.B semanage export -+start with -+.I -D -+for all semanage sub-commands. You can put a whole group of semanage commands within a file and apply them to a machine in a single transaction. - - .SH "OPTIONS" - .TP -diff --git a/python/semanage/semanage-interface.8 b/python/semanage/semanage-interface.8 -index d9d526dc7391..080db70b6ec2 100644 ---- a/python/semanage/semanage-interface.8 -+++ b/python/semanage/semanage-interface.8 -@@ -7,12 +7,14 @@ - .SH "DESCRIPTION" - semanage is used to configure certain elements of - SELinux policy without requiring modification to or recompilation --from policy sources. semanage interface controls the labels assigned to network interfaces. -+from policy sources. -+.B semanage interface -+controls the labels assigned to network interfaces. - - .SH "OPTIONS" - .TP - .I \-h, \-\-help --show this help message and exit -+Show this help message and exit - .TP - .I \-n, \-\-noheading - Do not print heading when listing the specified object type -@@ -54,6 +56,8 @@ MLS/MCS Security Range (MLS/MCS Systems only) SELinux Range for SELinux login ma - .nf - list all interface definitions - # semanage interface \-l -+Assign type netif_t and MLS/MCS range s0:c0.c1023 to interface eth0 -+# semanage interface \-a \-t netif_t \-r s0:c0.c1023 eth0 - - .SH "SEE ALSO" - .BR selinux (8), -diff --git a/python/semanage/semanage-login.8 b/python/semanage/semanage-login.8 -index f451bdc65d53..9076a1edcedb 100644 ---- a/python/semanage/semanage-login.8 -+++ b/python/semanage/semanage-login.8 -@@ -7,12 +7,14 @@ - .SH "DESCRIPTION" - semanage is used to configure certain elements of - SELinux policy without requiring modification to or recompilation --from policy sources. semanage login controls the mapping between a Linux User and the SELinux User. It can be used to turn on confined users. For example you could define that a particular user or group of users will login to a system as the user_u user. Prefix the group name with a '%' sign to indicate a group name. -+from policy sources. -+.B semanage login -+controls the mapping between a Linux User and the SELinux User. It can be used to turn on confined users. For example you could define that a particular user or group of users will login to a system as the user_u user. Prefix the group name with a '%' sign to indicate a group name. - - .SH "OPTIONS" - .TP - .I \-h, \-\-help --show this help message and exit -+Show this help message and exit - .TP - .I \-n, \-\-noheading - Do not print heading when listing the specified object type -@@ -52,11 +54,11 @@ MLS/MCS Security Range (MLS/MCS Systems only) SELinux Range for SELinux login ma - - .SH EXAMPLE - .nf --Modify the default user on the system to the guest_u user -+Set the default SELinux user on the system to guest_u - # semanage login \-m \-s guest_u __default__ --Assign gijoe user on an MLS machine a range and to the staff_u user --# semanage login \-a \-s staff_u \-rSystemLow-Secret gijoe --Assign all users in the engineering group to the staff_u user -+Map user gijoe to SELinux user staff_u and assign MLS range SystemLow\-Secret -+# semanage login \-a \-s staff_u \-rSystemLow\-Secret gijoe -+Map all users in the engineering group to SELinux user staff_u - # semanage login \-a \-s staff_u %engineering - - .SH "SEE ALSO" -diff --git a/python/semanage/semanage-module.8 b/python/semanage/semanage-module.8 -index e00571672565..6913b0cd47d9 100644 ---- a/python/semanage/semanage-module.8 -+++ b/python/semanage/semanage-module.8 -@@ -5,12 +5,14 @@ - .B semanage module [\-h] [\-n] [\-N] [\-S STORE] (\-a | \-r | \-e | \-d | \-\-extract | \-\-list [\-C] | \-\-deleteall) [module_name] - - .SH "DESCRIPTION" --semanage is used to configure certain elements of SELinux policy without requiring modification to or recompilation from policy sources. semanage module installs, removes, disables SELinux Policy modules. -+semanage is used to configure certain elements of SELinux policy without requiring modification to or recompilation from policy sources. -+.B semanage module -+installs, removes, disables, or enables SELinux Policy modules. - - .SH "OPTIONS" - .TP - .I \-h, \-\-help --show this help message and exit -+Show this help message and exit - .TP - .I \-n, \-\-noheading - Do not print heading when listing the specified object type -@@ -22,11 +24,14 @@ Do not reload policy after commit - Select an alternate SELinux Policy Store to manage - .TP - .I \-a, \-\-add --Install specified module -+Install specified module. Accepts both binary policy files (.pp) and CIL source files - .TP - .I \-r, \-\-remove - Remove specified module - .TP -+.I \-D, \-\-deleteall -+Remove all local customizations related to modules -+.TP - .I \-d \-\-disable - Disable specified module - .TP -@@ -48,8 +53,8 @@ List all modules - # semanage module \-l - Disable unconfined module - # semanage module \-\-disable unconfined --Install custom apache policy module --# semanage module \-a myapache -+Install custom apache policy module (same as #semodule -i myapache.pp) -+# semanage module \-a myapache.pp - - .SH "SEE ALSO" - .BR selinux (8), -diff --git a/python/semanage/semanage-node.8 b/python/semanage/semanage-node.8 -index a0098221c85b..c78d6c3eaf76 100644 ---- a/python/semanage/semanage-node.8 -+++ b/python/semanage/semanage-node.8 -@@ -7,12 +7,14 @@ - .SH "DESCRIPTION" - semanage is used to configure certain elements of - SELinux policy without requiring modification to or recompilation --from policy sources. semanage controls the ipaddress to node type definitions. -+from policy sources. -+.B semanage node -+controls the IP address to node type definitions. - - .SH "OPTIONS" - .TP - .I \-h, \-\-help --show this help message and exit -+Show this help message and exit - .TP - .I \-n, \-\-noheading - Do not print heading when listing the specified object type -@@ -54,5 +56,13 @@ SELinux type for the object - MLS/MCS Security Range (MLS/MCS Systems only) SELinux Range for SELinux login mapping defaults to the SELinux user record range. SELinux Range for SELinux user defaults to s0. - .TP - .I \-p PROTO, \-\-proto PROTO -- - Protocol for the specified port (tcp|udp) or internet protocol version for the specified node (ipv4|ipv6). -+ -+.SH "EXAMPLE" -+.nf -+Apply type node_t to ipv4 node 127.0.0.2 -+# semanage node \-a \-t node_t \-p ipv4 \-M 255.255.255.255 127.0.0.2 -+ -+.SH "SEE ALSO" -+.BR selinux (8), -+.BR semanage (8) -diff --git a/python/semanage/semanage-permissive.8 b/python/semanage/semanage-permissive.8 -index 5c3364fa54f8..0414a850082a 100644 ---- a/python/semanage/semanage-permissive.8 -+++ b/python/semanage/semanage-permissive.8 -@@ -5,12 +5,14 @@ - .B semanage permissive [\-h] [\-n] [\-N] [\-S STORE] (\-\-add TYPE | \-\-delete TYPE | \-\-deleteall | \-\-extract | \-\-list) - - .SH "DESCRIPTION" --semanage is used to configure certain elements of SELinux policy without requiring modification to or recompilation from policy sources. semanage permissive adds or removes a SELinux Policy permissive module. -+semanage is used to configure certain elements of SELinux policy without requiring modification to or recompilation from policy sources. -+.B semanage permissive -+adds or removes a SELinux Policy permissive module. Please note that this command can make any domain permissive, but can only remove the permissive property from domains where it was added by semanage permissive ("semanage permissive -d" can only be used on types listed as "Customized Permissive Types" by "semanage permissive -l"). - - .SH "OPTIONS" - .TP - .I \-h, \-\-help --show this help message and exit -+Show this help message and exit - .TP - .I \-a, \-\-add - Add a record of the specified object type -@@ -38,7 +40,7 @@ Select an alternate SELinux Policy Store to manage - - .SH EXAMPLE - .nf --List all permissive modules -+List all permissive domains ("Builtin Permissive Types" where set by the system policy, or a custom policy module) - # semanage permissive \-l - Make httpd_t (Web Server) a permissive domain - # semanage permissive \-a httpd_t -diff --git a/python/semanage/semanage-port.8 b/python/semanage/semanage-port.8 -index 12ec14c2cb33..c6048660ca21 100644 ---- a/python/semanage/semanage-port.8 -+++ b/python/semanage/semanage-port.8 -@@ -5,12 +5,14 @@ - .B semanage port [\-h] [\-n] [\-N] [\-S STORE] [ \-\-add \-t TYPE \-p PROTOCOL \-r RANGE port_name | port_range | \-\-delete \-p PROTOCOL port_name | port_range | \-\-deleteall | \-\-extract | \-\-list [\-C] | \-\-modify \-t TYPE \-p PROTOCOL \-r RANGE port_name | port_range ] - - .SH "DESCRIPTION" --semanage is used to configure certain elements of SELinux policy without requiring modification to or recompilation from policy sources. semanage port controls the port number to port type definitions. -+semanage is used to configure certain elements of SELinux policy without requiring modification to or recompilation from policy sources. -+.B semanage port -+controls the port number to port type definitions. - - .SH "OPTIONS" - .TP - .I \-h, \-\-help --show this help message and exit -+Show this help message and exit - .TP - .I \-n, \-\-noheading - Do not print heading when listing the specified object type -@@ -55,9 +57,9 @@ Protocol for the specified port (tcp|udp|dccp|sctp) or internet protocol version - .nf - List all port definitions - # semanage port \-l --Allow Apache to listen on tcp port 81 -+Allow Apache to listen on tcp port 81 (i.e. assign tcp port 81 label http_port_t, which apache is allowed to listen on) - # semanage port \-a \-t http_port_t \-p tcp 81 --Allow sshd to listen on tcp port 8991 -+Allow sshd to listen on tcp port 8991 (i.e. assign tcp port 8991 label ssh_port_t, which sshd is allowed to listen on) - # semanage port \-a \-t ssh_port_t \-p tcp 8991 - - .SH "SEE ALSO" -diff --git a/python/semanage/semanage-user.8 b/python/semanage/semanage-user.8 -index 23fec698e042..50d50bea7af8 100644 ---- a/python/semanage/semanage-user.8 -+++ b/python/semanage/semanage-user.8 -@@ -7,12 +7,14 @@ - .SH "DESCRIPTION" - semanage is used to configure certain elements of - SELinux policy without requiring modification to or recompilation --from policy sources. semanage user controls the mapping between an SELinux User and the roles and MLS/MCS levels. -+from policy sources. -+.B semanage user -+controls the mapping between an SELinux User and the roles and MLS/MCS levels. - - .SH "OPTIONS" - .TP - .I \-h, \-\-help --show this help message and exit -+Show this help message and exit - .TP - .I \-n, \-\-noheading - Do not print heading when listing the specified object type -@@ -59,7 +61,7 @@ List SELinux users - # semanage user \-l - Modify groups for staff_u user - # semanage user \-m \-R "system_r unconfined_r staff_r" staff_u --Add level for TopSecret Users -+Assign user topsecret_u role staff_r and range s0\-TopSecret - # semanage user \-a \-R "staff_r" \-rs0\-TopSecret topsecret_u - - .SH "SEE ALSO" --- -2.41.0 - diff --git a/SOURCES/0012-Revert-sandbox-Remove-the-Russian-translations.patch b/SOURCES/0012-Revert-sandbox-Remove-the-Russian-translations.patch new file mode 100644 index 0000000..f297b6b --- /dev/null +++ b/SOURCES/0012-Revert-sandbox-Remove-the-Russian-translations.patch @@ -0,0 +1,221 @@ +From 77b0ab65d1440d47395ec9d2091c15f63ef07c4a Mon Sep 17 00:00:00 2001 +From: Petr Lautrbach +Date: Mon, 13 Nov 2023 13:37:46 +0100 +Subject: [PATCH] Revert "sandbox: Remove the Russian translations" +Content-type: text/plain + +This reverts commit 8b2148f23853891eda00a4758cef2370880eb90c. +--- + sandbox/ru/sandbox.5 | 42 +++++++++++++++++ + sandbox/ru/sandbox.8 | 100 +++++++++++++++++++++++++++++++++++++++++ + sandbox/ru/seunshare.8 | 42 +++++++++++++++++ + 3 files changed, 184 insertions(+) + create mode 100644 sandbox/ru/sandbox.5 + create mode 100644 sandbox/ru/sandbox.8 + create mode 100644 sandbox/ru/seunshare.8 + +diff --git a/sandbox/ru/sandbox.5 b/sandbox/ru/sandbox.5 +new file mode 100644 +index 000000000000..69e822d8ad22 +--- /dev/null ++++ b/sandbox/ru/sandbox.5 +@@ -0,0 +1,42 @@ ++.TH sandbox.conf "5" "Июнь 2010" "sandbox.conf" "Администрирование системы Linux" ++.SH ИМЯ ++sandbox.conf \- файл конфигурации пользователей для изолированной среды SELinux ++.SH ОПИСАНИЕ ++.PP ++Если изолированная среда запускается с аргументом -C, она будет ограничена с помощью групп управления. Системный администратор может указать, как именно ограничить изолированную среду. ++ ++.PP ++Весь текст после "#" игнорируется, как и пустые строки. Все аргументы должны быть разделены пробелами и иметь знаки равенства ("="). ++ ++.PP ++Эти ключевые слова разрешены. ++ ++.RS ++.TP ++.B NAME ++Имя группы управления изолированной средой. По умолчанию: "sandbox". ++ ++.TP ++.B CPUAFFINITY ++Определяет, каким процессорам назначить изолированную среду. По умолчанию она назначается всем процессорам (ALL), но пользователи могут указать разделённый запятыми список с дефисами ("-"), чтобы представить диапазоны. Пример: 0-2,5 ++ ++.TP ++.B MEMUSAGE ++Определяет, сколько памяти разрешается использовать изолированной среде. Значение по умолчанию: 80%. Пользователи могут указать либо процентное значение, либо значение в виде числа, за которым следует суффикс K, M, G, для соответствующего обозначения килобайтов, мегабайтов или гигабайтов. Пример: 50% или 100M ++ ++.TP ++.B CPUUSAGE ++Процент использования ЦП, разрешённый для изолированной среды. По умолчанию: 80%. Укажите значение, за которым следует знак процента ("%"). Пример: 50% ++ ++ ++ ++.SH "СМОТРИТЕ ТАКЖЕ" ++.TP ++sandbox(8) ++.PP ++ ++.SH АВТОРЫ ++Эта страница руководства была написана ++.I Thomas Liu . ++Перевод на русский язык выполнила ++.I Герасименко Олеся . +diff --git a/sandbox/ru/sandbox.8 b/sandbox/ru/sandbox.8 +new file mode 100644 +index 000000000000..5e6e0aad57e8 +--- /dev/null ++++ b/sandbox/ru/sandbox.8 +@@ -0,0 +1,100 @@ ++.TH SANDBOX "8" "Май 2010" "sandbox" "Команды пользователя" ++.SH ИМЯ ++sandbox \- выполнить приложение cmd в изолированной среде SELinux ++.SH ОБЗОР ++.B sandbox ++[\-C] [\-s] [ \-d DPI ] [\-l level ] [[\-M | \-X] \-H homedir \-T tempdir ] [\-I includefile ] [ \-W windowmanager ] [ \-w windowsize ] [[\-i file ]...] [ \-t type ] cmd ++ ++.br ++.B sandbox ++[\-C] [\-s] [ \-d DPI ] [\-l level ] [[\-M | \-X] \-H homedir \-T tempdir ] [\-I includefile ] [ \-W windowmanager ] [ \-w windowsize ] [[\-i file ]...] [ \-t type ] \-S ++.br ++.SH ОПИСАНИЕ ++.PP ++Выполнить приложение ++.I cmd ++в строго ограниченном домене SELinux. По умолчанию в домене изолированной среды приложения могут только читать и записывать stdin, stdout и любые другие передаваемые дескрипторы файлов. Открывать другие файлы нельзя. Параметр \-M позволяет смонтировать альтернативные домашний каталог и временный каталог, которые будут использоваться изолированной средой. ++ ++Если установлен пакет ++.I policycoreutils-sandbox, ++можно использовать параметр \-X и параметр \-M. ++.B sandbox \-X ++позволяет запускать приложения X в изолированной среде. Эти приложения запускаются на своём собственном X-сервере и создают временные домашний каталог и каталог /tmp. Политика SELinux по умолчанию не разрешает использовать какие-либо средства для управления привилегиями или осуществлять доступ к сети. Она также предотвращает доступ к другим процессам и файлам пользователей. Указанные в команде файлы, которые находятся в домашнем каталоге или каталоге /tmp, будут скопированы в каталоги изолированной среды. ++ ++Если каталоги указаны с параметром \-H или \-T, их контекст будет изменён chcon(1) (если только с помощью параметра \-l не указан уровень). Если уровень безопасности MLS/MCS указан, пользователь должен установить правильные метки. ++.PP ++.TP ++\fB\-h\ \fB\-\-help\fR ++Показать сведения об использовании ++.TP ++\fB\-H\ \fB\-\-homedir\fR ++Указать альтернативный домашний каталог для монтирования вместо вашего домашнего каталога. По умолчанию используется временный каталог. Требуется \-X или \-M. ++.TP ++\fB\-i\fR \fB\-\-include\fR ++Копировать этот файл в соответствующий временный каталог изолированной среды. Команду можно повторять. ++.TP ++\fB\-I\fR \fB\-\-includefile\fR ++Копировать все файлы, перечисленные во входном файле (inputfile), в соответствующие временные каталоги изолированной среды. ++.TP ++\fB\-l\fR \fB\-\-level\fR ++Указать уровень безопасности MLS/MCS, с которым следует запускать изолированную среду. По умолчанию используется случайное значение. ++.TP ++\fB\-M\fR \fB\-\-mount\fR ++Создать изолированную среду с временными файлами для $HOME и /tmp. ++.TP ++\fB\-s\fR \fB\-\-shred\fR ++Уничтожить временные файлы, созданные в $HOME в /tmp, перед удалением. ++.TP ++\fB\-t\fR \fB\-\-type\fR ++Использовать альтернативный тип изолированной среды. По умолчанию: sandbox_t или sandbox_x_t для \-X. ++ ++\fBПримеры:\fR ++.br ++sandbox_t \- без X, без доступа к сети, без открытия, чтение/запись передаются в дескрипторах файлов. ++.br ++sandbox_min_t \- без доступа к сети ++.br ++sandbox_x_t \- порты для X-приложений, которые следует запустить локально ++.br ++sandbox_web_t \- порты, необходимые для работы в Интернете ++.br ++sandbox_net_t \- сетевые порты (для серверного ПО) ++.br ++sandbox_net_client_t \- все сетевые порты ++ ++.TP ++\fB\-T\fR \fB\-\-tmpdir\fR ++Использовать альтернативный временный каталог для монтирования в /tmp. По умолчанию: tmpfs. Требуется \-X или \-M. ++.TP ++\fB\-S\fR \fB\-\-session\fR ++Запустить полный сеанс рабочего стола. Требуется уровень, домашний каталог и временный каталог. ++.TP ++\fB\-w\fR \fB\-\-windowsize\fR ++Указать размер окна при создании изолированной среды на основе X. По умолчанию: 1000x700. ++.TP ++\fB\-W\fR \fB\-\-windowmanager\fR ++Выбрать альтернативный диспетчер окон для запуска в ++.B sandbox \-X. ++По умолчанию: /usr/bin/openbox. ++.TP ++\fB\-X\fR ++Создать изолированную среду на основе X для приложений графического интерфейса пользователя, временные файлы для $HOME и /tmp, дополнительный X-сервер. По умолчанию: sandbox_x_t ++.TP ++\fB\-d\fR \fB\-\-dpi\fR ++Указать значение разрешения (DPI) для X-сервера изолированной среды. По умолчанию используется значение разрешения текущего X-сервера. ++.TP ++\fB\-C\fR \fB\-\-capabilities\fR ++Использовать средства для управления привилегиями внутри изолированной среды. По умолчанию приложениям, которые выполняются в изолированной среде, запрещено использовать средства для управления привилегиями (setuid apps), но с флагом \-C можно использовать программы, которым необходимы средства для управления привилегиями. ++.PP ++.SH "СМОТРИТЕ ТАКЖЕ" ++.TP ++runcon(1), seunshare(8), selinux(8) ++.PP ++ ++.SH АВТОРЫ ++Эта страница руководства была написана ++.I Dan Walsh ++и ++.I Thomas Liu . ++Перевод на русский язык выполнила ++.I Герасименко Олеся . +diff --git a/sandbox/ru/seunshare.8 b/sandbox/ru/seunshare.8 +new file mode 100644 +index 000000000000..f604b9eb28c5 +--- /dev/null ++++ b/sandbox/ru/seunshare.8 +@@ -0,0 +1,42 @@ ++.TH SEUNSHARE "8" "Май 2010" "seunshare" "Команды пользователя" ++.SH ИМЯ ++seunshare \- выполнить cmd с другим домашним каталогом (homedir), временным каталогом (tmpdir) и/или контекстом SELinux ++.SH ОБЗОР ++.B seunshare ++[ -v ] [ -C ] [ -k ] [ -t tmpdir ] [ -h homedir ] [ -Z context ] -- executable [args] ++.br ++.SH ОПИСАНИЕ ++.PP ++Запустите исполняемый файл ++.I executable ++в указанном контексте, используя альтернативный домашний каталог и каталог /tmp. Команда seunshare отменяет общий доступ из пространства имён по умолчанию, затем монтирует указанные домашний каталог и временный каталог вместо домашнего каталога и временного каталога по умолчанию. После этого команда сообщает ядру, что следует выполнить приложение в указанном контексте SELinux. ++ ++.TP ++\fB\-h homedir\fR ++Альтернативный домашний каталог для использования приложением. Пользователь должен быть владельцем домашнего каталога. ++.TP ++\fB\-t\ tmpdir ++Использовать альтернативный временный каталог для монтирования в /tmp. Пользователь должен быть владельцем временного каталога. ++.TP ++\fB\-C --capabilities\fR ++Разрешить приложениям, исполняемым в пространстве имён, использовать средства для управления привилегиям. По умолчанию использование средств для управления привилегиями запрещено. ++.TP ++\fB\-k --kill\fR ++Завершить все процессы с соответствующим уровнем MCS. ++.TP ++\fB\-Z\ context ++Использовать альтернативный контекст SELinux при запуске исполняемого файла. ++.TP ++\fB\-v\fR ++Подробный вывод ++.SH "СМОТРИТЕ ТАКЖЕ" ++.TP ++runcon(1), sandbox(8), selinux(8) ++.PP ++.SH АВТОРЫ ++Эта страница руководства была написана ++.I Dan Walsh ++и ++.I Thomas Liu . ++Перевод на русский язык выполнила ++.I Герасименко Олеся . +-- +2.41.0 + diff --git a/SOURCES/0012-python-audit2allow-Remove-unused-debug-option.patch b/SOURCES/0012-python-audit2allow-Remove-unused-debug-option.patch deleted file mode 100644 index 493c495..0000000 --- a/SOURCES/0012-python-audit2allow-Remove-unused-debug-option.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 52da97653bd64bcc603ab7e0b5c08cb687b833ab Mon Sep 17 00:00:00 2001 -From: Vit Mojzis -Date: Thu, 4 May 2023 14:04:50 +0200 -Subject: [PATCH] python/audit2allow: Remove unused "debug" option -Content-type: text/plain - -The option is not referenced anywhere in the code and I couldn't figure -out its purpose from the description. - -Signed-off-by: Vit Mojzis ---- - python/audit2allow/audit2allow | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/python/audit2allow/audit2allow b/python/audit2allow/audit2allow -index eafeea88aa21..5587a2dbb006 100644 ---- a/python/audit2allow/audit2allow -+++ b/python/audit2allow/audit2allow -@@ -88,8 +88,6 @@ class AuditToPolicy: - parser.add_option("--interface-info", dest="interface_info", help="file name of interface information") - parser.add_option("-x", "--xperms", action="store_true", dest="xperms", - default=False, help="generate extended permission rules") -- parser.add_option("--debug", dest="debug", action="store_true", default=False, -- help="leave generated modules for -M") - parser.add_option("-w", "--why", dest="audit2why", action="store_true", default=(os.path.basename(sys.argv[0]) == "audit2why"), - help="Translates SELinux audit messages into a description of why the access was denied") - --- -2.41.0 - diff --git a/SOURCES/0013-Revert-restorecond-Remove-the-Russian-translations.patch b/SOURCES/0013-Revert-restorecond-Remove-the-Russian-translations.patch new file mode 100644 index 0000000..7d6f1cc --- /dev/null +++ b/SOURCES/0013-Revert-restorecond-Remove-the-Russian-translations.patch @@ -0,0 +1,62 @@ +From 066b9c9505aa545ea341efc06eb757f2a6000858 Mon Sep 17 00:00:00 2001 +From: Petr Lautrbach +Date: Mon, 13 Nov 2023 13:37:48 +0100 +Subject: [PATCH] Revert "restorecond: Remove the Russian translations" +Content-type: text/plain + +This reverts commit 7021ccd4fbecb8092e2a127944444a8eeb179357. +--- + restorecond/ru/restorecond.8 | 41 ++++++++++++++++++++++++++++++++++++ + 1 file changed, 41 insertions(+) + create mode 100644 restorecond/ru/restorecond.8 + +diff --git a/restorecond/ru/restorecond.8 b/restorecond/ru/restorecond.8 +new file mode 100644 +index 000000000000..72d9119950eb +--- /dev/null ++++ b/restorecond/ru/restorecond.8 +@@ -0,0 +1,41 @@ ++.TH "restorecond" "8" "2002031409" "" "" ++.SH "ИМЯ" ++restorecond \- внутренняя служба, которая отслеживает создание файлов и затем задаёт для них SELinux-контекст по умолчанию ++ ++.SH "ОБЗОР" ++.B restorecond [\-d] [-h] [\-f restorecond_file ] [\-u] [\-v] ++.P ++ ++.SH "ОПИСАНИЕ" ++Эта страница руководства содержит описание программы ++.BR restorecond. ++.P ++Эта внутренняя служба использует inotify для отслеживания файлов, перечисленных в /etc/selinux/restorecond.conf. После создания этих файлов эта служба обеспечивает присвоение им правильного контекста, связанного с политикой. ++ ++.SH "ПАРАМЕТРЫ" ++.TP ++.B \-d ++Включить режим отладки. Приложение останется на переднем плане, будет показано много отладочных сообщений. ++.TP ++. B \-h ++Вывести сведения об использовании. ++.TP ++.B \-f restorecond_file ++Использовать альтернативный файл restorecond.conf. ++.TP ++.B \-u ++Включить пользовательский режим. Запускает restorecond в сеансе пользователя и выполняет чтение /etc/selinux/restorecond_user.conf. Использует dbus, чтобы удостовериться, что в одном сеансе пользователя запущен только один экземпляр restorecond. ++.TP ++.B \-v ++Включить отладку с подробным выводом. (Сообщать об отсутствующих файлах) ++ ++.SH "ФАЙЛЫ" ++/etc/selinux/restorecond.conf ++/etc/selinux/restorecond_user.conf ++ ++.SH "СМОТРИТЕ ТАКЖЕ" ++.BR restorecon (8) ++ ++.SH "АВТОРЫ" ++Эта man-страница и программа были написаны Dan Walsh . ++Перевод на русский язык выполнила Герасименко Олеся . +-- +2.41.0 + diff --git a/SOURCES/0013-policycoreutils-Add-examples-to-man-pages.patch b/SOURCES/0013-policycoreutils-Add-examples-to-man-pages.patch deleted file mode 100644 index 62e3bfd..0000000 --- a/SOURCES/0013-policycoreutils-Add-examples-to-man-pages.patch +++ /dev/null @@ -1,309 +0,0 @@ -From b580a630378623df1c87c5fab1ffd63a41b3501e Mon Sep 17 00:00:00 2001 -From: Vit Mojzis -Date: Thu, 1 Jun 2023 16:39:11 +0200 -Subject: [PATCH] policycoreutils: Add examples to man pages -Content-type: text/plain - -While at it, remove trailing whitespaces. - -Signed-off-by: Vit Mojzis -Acked-by: Petr Lautrbach ---- - policycoreutils/scripts/fixfiles.8 | 34 +++++++++++++-------- - policycoreutils/secon/secon.1 | 12 ++++++-- - policycoreutils/semodule/semodule.8 | 14 ++++----- - policycoreutils/setfiles/restorecon.8 | 9 ++++++ - policycoreutils/setfiles/restorecon_xattr.8 | 7 +++++ - policycoreutils/setfiles/setfiles.8 | 9 ++++++ - policycoreutils/setsebool/setsebool.8 | 16 +++++++--- - 7 files changed, 74 insertions(+), 27 deletions(-) - -diff --git a/policycoreutils/scripts/fixfiles.8 b/policycoreutils/scripts/fixfiles.8 -index 9a317d9181e2..928b82004b1a 100644 ---- a/policycoreutils/scripts/fixfiles.8 -+++ b/policycoreutils/scripts/fixfiles.8 -@@ -14,7 +14,7 @@ fixfiles \- fix file SELinux security contexts. - .B fixfiles - .I [\-v] [\-F] [\-B | \-N time ] [\-T nthreads] { check | restore | verify } - --.B fixfiles -+.B fixfiles - .I [\-v] [\-F] [\-T nthreads] \-R rpmpackagename[,rpmpackagename...] { check | restore | verify } - - .B fixfiles -@@ -31,7 +31,7 @@ This manual page describes the - script. - .P - This script is primarily used to correct the security context --database (extended attributes) on filesystems. -+database (extended attributes) on filesystems. - .P - It can also be run at any time to relabel when adding support for - new policy, or just check whether the file contexts are all -@@ -41,29 +41,29 @@ option. You can use the \-R flag to use rpmpackages as an alternative. - The file /etc/selinux/fixfiles_exclude_dirs can contain a list of directories - excluded from relabeling. - .P --.B fixfiles onboot -+.B fixfiles onboot - will setup the machine to relabel on the next reboot. - - .SH "OPTIONS" --.TP -+.TP - .B \-B - If specified with onboot, this fixfiles will record the current date in the /.autorelabel file, so that it can be used later to speed up labeling. If used with restore, the restore will only affect files that were modified today. - .TP - .B \-F - Force reset of context to match file_context for customizable files - --.TP -+.TP - .B \-f - Clear /tmp directory with out prompt for removal. - --.TP -+.TP - .B \-R rpmpackagename[,rpmpackagename...] - Use the rpm database to discover all files within the specified packages and restore the file contexts. - .TP - .B \-C PREVIOUS_FILECONTEXT - Run a diff on the PREVIOUS_FILECONTEXT file to the currently installed one, and restore the context of all affected files. - --.TP -+.TP - .B \-N time - Only act on files created after the specified date. Date must be specified in - "YYYY\-MM\-DD HH:MM" format. Date field will be passed to find \-\-newermt command. -@@ -83,19 +83,28 @@ Use parallel relabeling, see - - .SH "ARGUMENTS" - One of: --.TP -+.TP - .B check | verify - print any incorrect file context labels, showing old and new context, but do not change them. --.TP -+.TP - .B restore - change any incorrect file context labels. --.TP -+.TP - .B relabel - Prompt for removal of contents of /tmp directory and then change any incorrect file context labels to match the install file_contexts file. --.TP --.B [[dir/file] ... ] -+.TP -+.B [[dir/file] ... ] - List of files or directories trees that you wish to check file context on. - -+.SH EXAMPLE -+.nf -+Relabel the whole filesystem, except paths listed in /etc/selinux/fixfiles_exclude_dirs -+# fixfiles relabel -+Schedule the machine to relabel on the next boot and force relabeling of customizable types -+# fixfiles -F onboot -+Check labeling of all files from the samba package (while not changing any labels) -+# fixfiles -R samba check -+ - .SH "AUTHOR" - This man page was written by Richard Hally . - The script was written by Dan Walsh -@@ -103,4 +112,3 @@ The script was written by Dan Walsh - .SH "SEE ALSO" - .BR setfiles (8), - .BR restorecon (8) -- -diff --git a/policycoreutils/secon/secon.1 b/policycoreutils/secon/secon.1 -index 501b5cb8c410..c0e8b05a6b66 100644 ---- a/policycoreutils/secon/secon.1 -+++ b/policycoreutils/secon/secon.1 -@@ -107,16 +107,24 @@ then the context will be read from stdin. - .br - If there is no argument, - .B secon --will try reading a context from stdin, if that is not a tty, otherwise -+will try reading a context from stdin, if that is not a tty, otherwise - .B secon - will act as though \fB\-\-self\fR had been passed. - .PP - If none of \fB\-\-user\fR, \fB\-\-role\fR, \fB\-\-type\fR, \fB\-\-level\fR or - \fB\-\-mls\-range\fR is passed. - Then all of them will be output. -+ -+.SH EXAMPLE -+.nf -+Show SElinux context of the init process -+# secon --pid 1 -+Parse the type portion of given security context -+# secon -t system_u:object_r:httpd_sys_rw_content_t:s0 -+ - .PP - .SH SEE ALSO - .BR chcon (1) - .SH AUTHORS - .nf --James Antill (james.antill@redhat.com) -+James Antill (james.antill@redhat.com) -diff --git a/policycoreutils/semodule/semodule.8 b/policycoreutils/semodule/semodule.8 -index c56e580f27b8..01757b005e4a 100644 ---- a/policycoreutils/semodule/semodule.8 -+++ b/policycoreutils/semodule/semodule.8 -@@ -1,5 +1,5 @@ - .TH SEMODULE "8" "Nov 2005" "Security Enhanced Linux" NSA --.SH NAME -+.SH NAME - semodule \- Manage SELinux policy modules. - - .SH SYNOPSIS -@@ -8,7 +8,7 @@ semodule \- Manage SELinux policy modules. - .SH DESCRIPTION - .PP - semodule is the tool used to manage SELinux policy modules, --including installing, upgrading, listing and removing modules. -+including installing, upgrading, listing and removing modules. - semodule may also be used to force a rebuild of policy from the - module store and/or to force a reload of policy without performing - any other transaction. semodule acts on module packages created -@@ -39,7 +39,7 @@ install/replace a module package - .B \-u,\-\-upgrade=MODULE_PKG - deprecated, alias for --install - .TP --.B \-b,\-\-base=MODULE_PKG -+.B \-b,\-\-base=MODULE_PKG - deprecated, alias for --install - .TP - .B \-r,\-\-remove=MODULE_NAME -@@ -77,7 +77,7 @@ name of the store to operate on - .B \-n,\-\-noreload,\-N - do not reload policy after commit - .TP --.B \-h,\-\-help -+.B \-h,\-\-help - prints help message and quit - .TP - .B \-P,\-\-preserve_tunables -@@ -92,7 +92,7 @@ Use an alternate path for the policy root - .B \-S,\-\-store-path - Use an alternate path for the policy store root - .TP --.B \-v,\-\-verbose -+.B \-v,\-\-verbose - be verbose - .TP - .B \-c,\-\-cil -@@ -131,8 +131,6 @@ $ semodule \-B - $ semodule \-d alsa - # Install a module at a specific priority. - $ semodule \-X 100 \-i alsa.pp --# List all modules. --$ semodule \-\-list=full - # Set an alternate path for the policy root - $ semodule \-B \-p "/tmp" - # Set an alternate path for the policy store root -@@ -143,6 +141,8 @@ $ semodule \-X 400 \-\-hll \-E puppet \-\-cil \-E wireshark - # Check whether a module in "localmodule.pp" file is same as installed module "localmodule" - $ /usr/libexec/selinux/hll/pp localmodule.pp | sha256sum - $ semodule -l -m | grep localmodule -+# Translate binary module file into CIL (useful for debugging installation errors) -+$ /usr/libexec/selinux/hll/pp alsa.pp > alsa.cil - .fi - - .SH SEE ALSO -diff --git a/policycoreutils/setfiles/restorecon.8 b/policycoreutils/setfiles/restorecon.8 -index dbd55ce7c512..6160aced5922 100644 ---- a/policycoreutils/setfiles/restorecon.8 -+++ b/policycoreutils/setfiles/restorecon.8 -@@ -224,6 +224,15 @@ and provided the - option is NOT set and recursive mode is set, files will be relabeled as - required with the digests then being updated provided there are no errors. - -+.SH EXAMPLE -+.nf -+Fix labeling of /var/www/ including all sub-directories and list all context changes -+# restorecon -rv /var/www/ -+List mislabeled files in user home directory and what the correct label should be -+# restorecon -nvr ~ -+Fix labeling of files listed in file_list file, ignoring any that do not exist -+# restorecon -vif file_list -+ - .SH "AUTHOR" - This man page was written by Dan Walsh . - Some of the content of this man page was taken from the setfiles -diff --git a/policycoreutils/setfiles/restorecon_xattr.8 b/policycoreutils/setfiles/restorecon_xattr.8 -index 4b1ce304d995..09bfd8c40ab4 100644 ---- a/policycoreutils/setfiles/restorecon_xattr.8 -+++ b/policycoreutils/setfiles/restorecon_xattr.8 -@@ -112,6 +112,13 @@ If the option is not specified, then the default file_contexts will be used. - .br - the pathname of the directory tree to be searched. - -+.SH EXAMPLE -+.nf -+List all paths that where assigned a checksum by "restorecon/setfiles -D" -+# restorecon_xattr -r / -+Remove all non-matching checksums -+# restorecon_xattr -rd / -+ - .SH "SEE ALSO" - .BR restorecon (8), - .BR setfiles (8) -diff --git a/policycoreutils/setfiles/setfiles.8 b/policycoreutils/setfiles/setfiles.8 -index 36fe6b369548..6071d9ba3d38 100644 ---- a/policycoreutils/setfiles/setfiles.8 -+++ b/policycoreutils/setfiles/setfiles.8 -@@ -289,6 +289,15 @@ and provided the - option is NOT set, files will be relabeled as required with the digests then - being updated provided there are no errors. - -+.SH EXAMPLE -+.nf -+Fix labeling of /var/www/ including all sub-directories, using targeted policy file context definitions and list all context changes -+# setfiles -v /etc/selinux/targeted/contexts/files/file_contexts /var/www/ -+List mislabeled files in user home directory and what the label should be based on targeted policy file context definitions -+# setfiles -nv /etc/selinux/targeted/contexts/files/file_contexts ~ -+Fix labeling of files listed in file_list file, ignoring any that do not exist -+# setfiles -vif file_list /etc/selinux/targeted/contexts/files/file_contexts -+ - .SH "AUTHOR" - This man page was written by Russell Coker . - The program was written by Stephen Smalley -diff --git a/policycoreutils/setsebool/setsebool.8 b/policycoreutils/setsebool/setsebool.8 -index 52936f5a0ffb..f54664fb5c2a 100644 ---- a/policycoreutils/setsebool/setsebool.8 -+++ b/policycoreutils/setsebool/setsebool.8 -@@ -7,13 +7,13 @@ setsebool \- set SELinux boolean value - .I "[ \-PNV ] boolean value | bool1=val1 bool2=val2 ..." - - .SH "DESCRIPTION" --.B setsebool --sets the current state of a particular SELinux boolean or a list of booleans --to a given value. The value may be 1 or true or on to enable the boolean, or 0 or false or off to disable it. -+.B setsebool -+sets the current state of a particular SELinux boolean or a list of booleans -+to a given value. The value may be 1 or true or on to enable the boolean, or 0 or false or off to disable it. - - Without the \-P option, only the current boolean value is --affected; the boot-time default settings --are not changed. -+affected; the boot-time default settings -+are not changed. - - If the \-P option is given, all pending values are written to - the policy file on disk. So they will be persistent across reboots. -@@ -22,6 +22,12 @@ If the \-N option is given, the policy on disk is not reloaded into the kernel. - - If the \-V option is given, verbose error messages will be printed from semanage libraries. - -+.SH EXAMPLE -+.nf -+Enable container_use_devices boolean (will return to persistent value after reboot) -+# setsebool container_use_devices 1 -+Persistently enable samba_create_home_dirs and samba_enable_home_dirs booleans -+# setsebool -P samba_create_home_dirs=on samba_enable_home_dirs=on - - .SH AUTHOR - This manual page was written by Dan Walsh . --- -2.41.0 - diff --git a/SOURCES/0014-Revert-python-Remove-the-Russian-translations.patch b/SOURCES/0014-Revert-python-Remove-the-Russian-translations.patch new file mode 100644 index 0000000..6280322 --- /dev/null +++ b/SOURCES/0014-Revert-python-Remove-the-Russian-translations.patch @@ -0,0 +1,645 @@ +From 9f8bc9f0bdcd5fffeb1f68a9761ade647b16a504 Mon Sep 17 00:00:00 2001 +From: Petr Lautrbach +Date: Mon, 13 Nov 2023 13:37:50 +0100 +Subject: [PATCH] Revert "python: Remove the Russian translations" +Content-type: text/plain + +This reverts commit cb0b5f3aebbee84924413f8530d4f2c0e2609791. +--- + python/sepolicy/ru/sepolgen.8 | 1 + + python/sepolicy/ru/sepolicy-booleans.8 | 29 ++++ + python/sepolicy/ru/sepolicy-communicate.8 | 40 +++++ + python/sepolicy/ru/sepolicy-generate.8 | 173 ++++++++++++++++++++++ + python/sepolicy/ru/sepolicy-gui.8 | 29 ++++ + python/sepolicy/ru/sepolicy-interface.8 | 41 +++++ + python/sepolicy/ru/sepolicy-manpage.8 | 38 +++++ + python/sepolicy/ru/sepolicy-network.8 | 90 +++++++++++ + python/sepolicy/ru/sepolicy-transition.8 | 34 +++++ + python/sepolicy/ru/sepolicy.8 | 77 ++++++++++ + 10 files changed, 552 insertions(+) + create mode 100644 python/sepolicy/ru/sepolgen.8 + create mode 100644 python/sepolicy/ru/sepolicy-booleans.8 + create mode 100644 python/sepolicy/ru/sepolicy-communicate.8 + create mode 100644 python/sepolicy/ru/sepolicy-generate.8 + create mode 100644 python/sepolicy/ru/sepolicy-gui.8 + create mode 100644 python/sepolicy/ru/sepolicy-interface.8 + create mode 100644 python/sepolicy/ru/sepolicy-manpage.8 + create mode 100644 python/sepolicy/ru/sepolicy-network.8 + create mode 100644 python/sepolicy/ru/sepolicy-transition.8 + create mode 100644 python/sepolicy/ru/sepolicy.8 + +diff --git a/python/sepolicy/ru/sepolgen.8 b/python/sepolicy/ru/sepolgen.8 +new file mode 100644 +index 000000000000..3ecf3eb2969b +--- /dev/null ++++ b/python/sepolicy/ru/sepolgen.8 +@@ -0,0 +1 @@ ++.so man8/sepolicy-generate.8 +diff --git a/python/sepolicy/ru/sepolicy-booleans.8 b/python/sepolicy/ru/sepolicy-booleans.8 +new file mode 100644 +index 000000000000..0f8f8ef68235 +--- /dev/null ++++ b/python/sepolicy/ru/sepolicy-booleans.8 +@@ -0,0 +1,29 @@ ++.TH "sepolicy-booleans" "8" "20121112" "" "" ++.SH "ИМЯ" ++sepolicy-booleans \- запросить описание логических переключателей из политики SELinux ++ ++.SH "ОБЗОР" ++ ++.br ++.B sepolicy booleans [\-h] [ \-a | \-b booleanname ... ] ++ ++.SH "ОПИСАНИЕ" ++Утилита sepolicy booleans показывает все логические переключатели и их описание (либо можно вывести описание для отдельных логических переключателей) ++ ++.SH "ПАРАМЕТРЫ" ++.TP ++.I \-h, \-\-help ++показать справочное сообщение ++.TP ++.I \-a, \-\-all ++показать все описания логических переключателей ++.TP ++.I \-b, \-\-boolean ++логический переключатель, для которого следует получить описание ++ ++.SH "СМОТРИТЕ ТАКЖЕ" ++sepolicy(8), selinux(8), getsebool(8), setsebool(8) ++ ++.SH "АВТОРЫ" ++Эта man-страница была написана Daniel Walsh . ++Перевод на русский язык выполнила Герасименко Олеся . +diff --git a/python/sepolicy/ru/sepolicy-communicate.8 b/python/sepolicy/ru/sepolicy-communicate.8 +new file mode 100644 +index 000000000000..3a8c535cb75a +--- /dev/null ++++ b/python/sepolicy/ru/sepolicy-communicate.8 +@@ -0,0 +1,40 @@ ++.TH "sepolicy-communicate" "8" "20121005" "" "" ++.SH "ИМЯ" ++sepolicy-communicate \- создать отчёт, который покажет, могут ли связываться два домена политики SELinux ++ ++.SH "ОБЗОР" ++ ++.br ++.B sepolicy communicate [\-h] \-s SOURCE \-t TARGET [\-c TCLASS] [\-S SOURCEACCESS] [\-T TARGETACCESS] ++ ++.SH "ОПИСАНИЕ" ++Команда sepolicy communicate позволяет проанализировать политику SELinux, чтобы узнать, может ли исходный домен SELinux связываться с целевым доменом SELinux. ++Команда по умолчанию проверяет, имеются ли какие-либо типы файлов, которые может записывать исходный домен и читать целевой домен. ++ ++.SH "ПАРАМЕТРЫ" ++.TP ++.I \-c, \-\-class ++Указать класс SELinux, который исходный домен попытается использовать для связи с целевым доменом. По умолчанию: file. ++.TP ++.I \-h, \-\-help ++Показать справочное сообщение ++.TP ++.I \-s, \-\-source ++Указать тип исходного домена SELinux ++.TP ++.I \-S, \-\-sourceaccess ++Указать список доступов, используемых типом исходного домена SELinux для связи с целевым доменом. По умолчанию: Open, Write. ++.TP ++.I \-t, \-\-target ++Указать тип целевого домена SELinux ++.TP ++.I \-T, \-\-targetaccess ++Указать список доступов, используемых типом целевого домена SELinux для получения обращений от исходного домена. По умолчанию: Open, Read. ++ ++.SH "СМОТРИТЕ ТАКЖЕ" ++sepolicy(8), selinux(8) ++ ++.SH "АВТОРЫ" ++Эта man-страница была написана Daniel Walsh . ++Перевод на русский язык выполнила Герасименко Олеся . ++ +diff --git a/python/sepolicy/ru/sepolicy-generate.8 b/python/sepolicy/ru/sepolicy-generate.8 +new file mode 100644 +index 000000000000..d2e98861881a +--- /dev/null ++++ b/python/sepolicy/ru/sepolicy-generate.8 +@@ -0,0 +1,173 @@ ++.TH "sepolicy-generate" "8" "20121005" "" "" ++.SH "ИМЯ" ++sepolicy-generate \- создать исходный шаблон модуля политики SELinux. ++ ++.SH "ОБЗОР" ++ ++Общие параметры ++ ++.B sepolicy generate [\-h ] [\-p PATH] ++ ++.br ++ ++Ограниченные приложения ++ ++.br ++.B sepolicy generate \-\-application [\-n NAME] [\-u USER ]command [\-w WRITE_PATH ] ++.br ++.B sepolicy generate \-\-cgi [\-n NAME] command [\-w WRITE_PATH ] ++.br ++.B sepolicy generate \-\-dbus [\-n NAME] command [\-w WRITE_PATH ] ++.br ++.B sepolicy generate \-\-inetd [\-n NAME] command [\-w WRITE_PATH ] ++.br ++.B sepolicy generate \-\-init [\-n NAME] command [\-w WRITE_PATH ] ++ ++Ограниченные пользователи ++ ++.br ++.B sepolicy generate \-\-admin_user [\-r TRANSITION_ROLE] \-n NAME ++.br ++.B sepolicy generate \-\-confined_admin \-n NAME [\-a ADMIN_DOMAIN] [\-u USER] [\-n NAME] [\-w WRITE_PATH] ++.br ++.B sepolicy generate \-\-desktop_user \-n NAME [\-w WRITE_PATH] ++.br ++.B sepolicy generate \-\-term_user \-n NAME [\-w WRITE_PATH] ++.br ++.B sepolicy generate \-\-x_user \-n NAME [\-w WRITE_PATH] ++.br ++ ++Разное ++ ++.br ++.B sepolicy generate \-\-customize \-d DOMAIN \-n NAME [\-a ADMIN_DOMAIN] ++.br ++.B sepolicy generate \-\-newtype \-t type \-n NAME ++.br ++.B sepolicy generate \-\-sandbox \-n NAME ++ ++.SH "ОПИСАНИЕ" ++Используйте команду \fBsepolicy generate\fP для создания модуля политики SELinux. ++ ++.br ++\fBsepolicy generate\fP создаст 5 файлов. ++ ++При указании \fBconfined application\fP необходимо указать путь. Команда \fBsepolicy generate\fP будет использовать полезную нагрузку rpm-пакета приложения вместе с \fBnm \-D APPLICATION\fP, чтобы создать типы и правила политики для ваших файлов политики. ++ ++.B Файл принудительного назначения типов NAME.te ++.br ++Этот файл можно использовать, чтобы определить для конкретного домена все правила типов. ++ ++.I Примечание: ++Политика, созданная с помощью команды \fBsepolicy generate\fP, автоматически добавит разрешительный домен (DOMAIN) в ваш файл .te. Когда вы закончите настройку политики, из файла .te будет необходимо удалить разрешительную строку, чтобы запустить домен в принудительном режиме. ++ ++.B Файл интерфейсов NAME.if ++.br ++Этот файл определяет интерфейсы для созданных в файле .te типов, которые могут использоваться другими доменами политики. ++ ++.B Контексты файлов NAME.fc ++.br ++Этот файл определяет контексты файлов по умолчанию для системы; он берёт типы файлов, созданные в файле .te, и связывает пути файлов с этими типами. Такие утилиты, как restorecon и RPM, будут использовать эти пути для проставления меток. ++ ++.B Файл спецификации RPM NAME_selinux.spec ++.br ++Этот файл - файл СПЕЦИФИКАЦИИ, который можно использовать для установки политики SELinux на компьютеры и настройки проставления меток. Файл спецификации также устанавливает файл интерфейсов и man-страницу с описанием политики. Для создания man-страницы можно использовать команду \fBsepolicy manpage \-d NAME\fP. ++ ++.B Файл оболочки NAME.sh ++.br ++Это вспомогательный сценарий оболочки для компиляции, установки и исправления меток в тестовой системе. Он также создаёт man-страницу на основе установленной политики, компилирует и собирает RPM, который подходит для установки на других компьютерах. ++ ++Если создание возможно, эта утилита выведет на экран все пути создания из исходного домена в целевой домен ++ ++.SH "ПАРАМЕТРЫ" ++.TP ++.I \-h, \-\-help ++Показать справочное сообщение ++.TP ++.I \-d, \-\-domain ++Ввести тип домена, который будет расширен ++.TP ++.I \-n, \-\-name ++Указать альтернативное имя политики. По умолчанию: указанный исполняемый файл или имя. ++.TP ++.I \-p, \-\-path ++Указать каталог для сохранения созданных файлов политики. По умолчанию: текущий рабочий каталог. ++Необязательные аргументы: ++.TP ++.I \-r, \-\-role ++Ввести роль (роли), в которую перейдёт этот администратор ++.TP ++.I \-t, \-\-type ++Ввести тип (типы), для которого создаётся новое определение и правило (правила) ++.TP ++.I \-u, \-\-user ++Пользователь (пользователи) SELinux, который перейдёт в этот домен ++.TP ++.I \-w, \-\-writepath ++Путь (пути), который требуется для записи ограниченным процессам ++.TP ++.I \-a, \-\-admin ++Домен (домены), который будет администрировать ограниченный администратор ++.TP ++.I \-\-admin_user ++Создать политику для роли авторизации администратора ++.TP ++.I \-\-application ++Создать политику для приложения пользователя ++.TP ++.I \-\-cgi ++Создать политику для веб-приложения/сценария (CGI) ++.TP ++.I \-\-confined_admin ++Создать политику для роли ограниченного администратора root ++.TP ++.I \-\-customize ++Создать политику для типа существующего домена ++.TP ++.I \-\-dbus ++Создать политику для системной внутренней службы DBUS ++.TP ++.I \-\-desktop_user ++Создать политику для роли авторизации на рабочем столе ++.TP ++.I \-\-inetd ++Создать политику для внутренней службы Интернет-служб ++.TP ++.I \-\-init ++Создать политику для стандартной внутренней службы init (по умолчанию) ++.TP ++.I \-\-newtype ++Создать политику для новых типов, которые будут добавлены в существующую политику. ++.TP ++.I \-\-sandbox ++Создать политику для изолированной среды ++.TP ++.I \-\-term_user ++Создать политику для минимальной роли авторизации пользователя терминала ++.TP ++.I \-\-x_user ++Создать политику для минимальной роли авторизации пользователя X Windows ++ ++.SH "ПРИМЕР" ++.B > sepolicy generate --init /usr/sbin/rwhod ++.br ++Создание политики для /usr/sbin/rwhod с именем rwhod ++.br ++Созданы следующие файлы: ++.br ++rwhod.te # файл принудительного присвоения типов ++.br ++rwhod.if # файл интерфейсов ++.br ++rwhod.fc # файл контекстов файлов ++.br ++rwhod_selinux.spec # файл спецификации ++.br ++rwhod.sh # сценарий настройки ++ ++.SH "СМОТРИТЕ ТАКЖЕ" ++sepolicy(8), selinux(8) ++ ++.SH "АВТОРЫ" ++Эта man-страница была написана Daniel Walsh . ++Перевод на русский язык выполнила Герасименко Олеся . +diff --git a/python/sepolicy/ru/sepolicy-gui.8 b/python/sepolicy/ru/sepolicy-gui.8 +new file mode 100644 +index 000000000000..1912c58b30e1 +--- /dev/null ++++ b/python/sepolicy/ru/sepolicy-gui.8 +@@ -0,0 +1,29 @@ ++.TH "sepolicy-gui" "8" "20121005" "" "" ++.SH "ИМЯ" ++sepolicy-gui \- графический интерфейс пользователя политики SELinux ++ ++.SH "ОБЗОР" ++ ++Общие параметры ++ ++.B sepolicy gui [\-h ] [ \-d DOMAIN ] ++ ++.br ++ ++.SH "ОПИСАНИЕ" ++Используйте утилиту \fBsepolicy gui\fP для запуска графического интерфейса пользователя, с помощью которого можно посмотреть, как SELinux ограничивает различные домены процессов. ++ ++.SH "ПАРАМЕТРЫ" ++.TP ++.I \-h, \-\-help ++Показать справочное сообщение ++.TP ++.I \-d, \-\-domain ++Инициализировать для выбранного домена графический интерфейс пользователя ++ ++.SH "СМОТРИТЕ ТАКЖЕ" ++sepolicy(8), selinux(8) ++ ++.SH "АВТОРЫ" ++Эта man-страница была написана Daniel Walsh . ++Перевод на русский язык выполнила Герасименко Олеся . +diff --git a/python/sepolicy/ru/sepolicy-interface.8 b/python/sepolicy/ru/sepolicy-interface.8 +new file mode 100644 +index 000000000000..b78a7925fd5e +--- /dev/null ++++ b/python/sepolicy/ru/sepolicy-interface.8 +@@ -0,0 +1,41 @@ ++.TH "sepolicy-interface" "8" "20121222" "" "" ++.SH "ИМЯ" ++sepolicy-interface \- вывести сведения об интерфейсах на основе установленной политики SELinux ++ ++.SH "ОБЗОР" ++ ++.br ++.B sepolicy interface [\-h] [\-c] [\-v] [\-a | \-u | \-l | \-i INTERFACE [INTERFACE ... ]] ++ ++.SH "ОПИСАНИЕ" ++Используйте утилиту sepolicy interface для вывода сведений об интерфейсах на основе политики SELinux. ++ ++.SH "ПАРАМЕТРЫ" ++.TP ++.I \-a, \-\-list_admin ++Вывести список всех доменов с интерфейсом администратора ++.TP ++.I \-c, \-\-compile ++Проверить сборку интерфейсов ++.TP ++.I \-h, \-\-help ++Показать справочное сообщение ++.TP ++.I \-i, \-\-interface ++Интерфейс (интерфейсы), которые следует показать ++.TP ++.I \-l, \-\-list ++Вывести список всех интерфейсов ++.TP ++.I \-u, \-\-list_user ++Вывести список всех доменов с интерфейсом роли пользователя SELinux ++.TP ++.I \-v, \-\-verbose ++Показать расширенные сведения об интерфейсе, включая параметры и описание (если доступно). ++ ++.SH "СМОТРИТЕ ТАКЖЕ" ++sepolicy(8), selinux(8) ++ ++.SH "АВТОРЫ" ++Эта man-страница была написана Daniel Walsh . ++Перевод на русский язык выполнила Герасименко Олеся . +diff --git a/python/sepolicy/ru/sepolicy-manpage.8 b/python/sepolicy/ru/sepolicy-manpage.8 +new file mode 100644 +index 000000000000..35d7c683d9e6 +--- /dev/null ++++ b/python/sepolicy/ru/sepolicy-manpage.8 +@@ -0,0 +1,38 @@ ++.TH "sepolicy-manpage" "8" "20121005" "" "" ++.SH "ИМЯ" ++sepolicy-manpage \- создать man-страницу на основе установленной политики SELinux ++ ++.SH "ОБЗОР" ++ ++.br ++.B sepolicy manpage [\-w] [\-h] [\-p PATH ] [\-r ROOTDIR ] [\-a | \-d ] ++ ++.SH "ОПИСАНИЕ" ++Используйте утилиту sepolicy manpage для создания man-страниц на основе политики SELinux. ++ ++.SH "ПАРАМЕТРЫ" ++.TP ++.I \-a, \-\-all ++Создать man-страницы для всех доменов ++.TP ++.I \-d, \-\-domain ++Создать man-страницу для указанного домена. (Поддерживает несколько команд) ++.TP ++.I \-h, \-\-help ++Показать справочное сообщение ++.TP ++.I \-p, \-\-path ++Указать каталог для сохранения созданных man-страниц. (По умолчанию: /tmp) ++.TP ++.I \-r, \-\-root ++Указать альтернативный корневой каталог для создания man-страниц. (По умолчанию: /) ++.TP ++.I \-w, \-\-web ++Создать дополнительные man-страницы в формате HTML для указанного домена (доменов). ++ ++.SH "СМОТРИТЕ ТАКЖЕ" ++sepolicy(8), selinux(8) ++ ++.SH "АВТОРЫ" ++Эта man-страница была написана Daniel Walsh . ++Перевод на русский язык выполнила Герасименко Олеся . +diff --git a/python/sepolicy/ru/sepolicy-network.8 b/python/sepolicy/ru/sepolicy-network.8 +new file mode 100644 +index 000000000000..ba78eced9d90 +--- /dev/null ++++ b/python/sepolicy/ru/sepolicy-network.8 +@@ -0,0 +1,90 @@ ++.TH "sepolicy-network" "8" "20121005" "" "" ++.SH "ИМЯ" ++sepolicy-network \- проанализировать политику SELinux и создать отчёт о сети ++ ++.SH "ОБЗОР" ++ ++.br ++.B sepolicy network [\-h] (\-l | \-a application [application ...] | \-p PORT [PORT ...] | \-t TYPE [TYPE ...] | \-d DOMAIN [DOMAIN ...]) ++ ++.SH "ОПИСАНИЕ" ++Используйте команду sepolicy network для анализа политики SELinux и создания отчётов о сети. ++ ++.SH "ПАРАМЕТРЫ" ++.TP ++.I \-a, \-\-application ++Создать отчёт с перечнем портов, к которым разрешено подключение и/или привязка указанного приложения инициализации. ++.TP ++.I \-d, \-\-domain ++Создать отчёт с перечнем портов, к которым разрешено подключение и/или привязка указанного домена. ++.TP ++.I \-l, \-\-list ++Вывести список всех типов сетевых портов, определённых в политике SELinux ++.TP ++.I \-h, \-\-help ++Показать справочное сообщение ++.TP ++.I \-t, \-\-type ++Создать отчёт с перечнем номеров портов, связанных с указанным типом портов SELinux. ++.TP ++.I \-p, \-\-port ++Создать отчёт с перечнем типов портов SELinux, связанных с указанным номером порта. ++ ++.SH "ПРИМЕРЫ" ++ ++.B sepolicy network -p 22 ++.br ++22: tcp ssh_port_t 22 ++.br ++22: udp reserved_port_t 1-511 ++.br ++22: tcp reserved_port_t 1-511 ++ ++.B sepolicy network -a /usr/sbin/sshd ++.br ++sshd_t: tcp name_connect ++.br ++ 111 (portmap_port_t) ++.br ++ 53 (dns_port_t) ++.br ++ 88, 750, 4444 (kerberos_port_t) ++.br ++ 9080 (ocsp_port_t) ++.br ++ 9180, 9701, 9443-9447 (pki_ca_port_t) ++.br ++ 32768-61000 (ephemeral_port_t) ++.br ++ all ports < 1024 (reserved_port_type) ++.br ++ all ports with out defined types (port_t) ++.br ++sshd_t: tcp name_bind ++.br ++ 22 (ssh_port_t) ++.br ++ 5900-5983, 5985-5999 (vnc_port_t) ++.br ++ 6000-6020 (xserver_port_t) ++.br ++ 32768-61000 (ephemeral_port_t) ++.br ++ all ports > 500 and < 1024 (rpc_port_type) ++.br ++ all ports with out defined types (port_t) ++.br ++sshd_t: udp name_bind ++.br ++ 32768-61000 (ephemeral_port_t) ++.br ++ all ports > 500 and < 1024 (rpc_port_type) ++.br ++ all ports with out defined types (port_t) ++ ++.SH "СМОТРИТЕ ТАКЖЕ" ++sepolicy(8), selinux(8), semanage(8) ++ ++.SH "АВТОРЫ" ++Эта man-страница была написана Daniel Walsh . ++Перевод на русский язык выполнила Герасименко Олеся . +diff --git a/python/sepolicy/ru/sepolicy-transition.8 b/python/sepolicy/ru/sepolicy-transition.8 +new file mode 100644 +index 000000000000..77c2520376dc +--- /dev/null ++++ b/python/sepolicy/ru/sepolicy-transition.8 +@@ -0,0 +1,34 @@ ++.TH "sepolicy-transition" "8" "20121005" "" "" ++.SH "ИМЯ" ++sepolicy-transition \- проанализировать политику SELinux и создать отчёт о переходах процессов ++ ++.SH "ОБЗОР" ++ ++.br ++.B sepolicy transition [\-h] \-s SOURCE ++ ++.br ++.B sepolicy transition [\-h] \-s SOURCE \-t TARGET ++ ++.SH "ОПИСАНИЕ" ++Утилита sepolicy transition покажет все домены, в которые может перейти указанный исходный домен SELinux, включая точку входа. ++ ++Если указан целевой домен, команда sepolicy transition проанализирует политику на предмет наличия путей перехода из исходного домена в целевой домен и выведет список этих путей. Если переход возможен, эта утилита выведет все пути перехода из исходного домена в целевой домен. ++ ++.SH "ПАРАМЕТРЫ" ++.TP ++.I \-h, \-\-help ++Показать справочное сообщение ++.TP ++.I \-s, \-\-source ++Указать тип исходного домена SELinux ++.TP ++.I \-t, \-\-target ++Указать тип целевого домена SELinux ++ ++.SH "СМОТРИТЕ ТАКЖЕ" ++sepolicy(8), selinux(8) ++ ++.SH "АВТОРЫ" ++Эта man-страница была написана Daniel Walsh . ++Перевод на русский язык выполнила Герасименко Олеся . +diff --git a/python/sepolicy/ru/sepolicy.8 b/python/sepolicy/ru/sepolicy.8 +new file mode 100644 +index 000000000000..1d8d39112e15 +--- /dev/null ++++ b/python/sepolicy/ru/sepolicy.8 +@@ -0,0 +1,77 @@ ++.TH "sepolicy" "8" "20121005" "" "" ++.SH "ИМЯ" ++sepolicy \- утилита анализа политики SELinux ++ ++.SH "ОБЗОР" ++.B sepolicy [-h] [-P policy_path ] {booleans,communicate,generate,interface,manpage,network,transition} OPTIONS ++ ++.br ++Аргументы: ++.br ++ ++.B booleans ++.br ++Отправить запрос к политике SELinux, чтобы просмотреть описание логических переключателей ++.B sepolicy-boolean(8) ++.br ++ ++.B communicate ++.br ++Отправить запрос к политике SELinux, чтобы узнать, могут ли домены связываться друг с другом ++.B sepolicy-communicate(8) ++.br ++ ++.B generate ++.br ++Создать шаблон модуля политики SELinux ++.B sepolicy-generate(8) ++.br ++ ++.B gui ++.br ++Запустить графический интерфейс пользователя политики SELinux (требуется пакет policycoreutils-gui) ++.B sepolicy-gui(8) ++.br ++ ++.B interface ++.br ++.br ++Вывести сведения интерфейса политики SELinux ++.B sepolicy-interface(8) ++.br ++ ++.B manpage ++.br ++Создать man-страницы SELinux ++.B sepolicy-manpage(8) ++.br ++ ++.B network ++.br ++Запросить сведения о сети политики SELinux ++.B sepolicy-network(8) ++.br ++ ++.B transition ++.br ++Отправить запрос к политике SELinux, чтобы узнать, как исходный домен процесса может перейти в целевой домен процесса ++.B sepolicy-transition(8) ++ ++.SH "ОПИСАНИЕ" ++sepolicy - это набор средств, опрашивающих установленную политику SELinux и создающих полезные отчёты, man-страницы или даже новые модули политики. ++Параметры и их описание доступны на man-страницах соответствующих аргументов. ++ ++.SH "ПАРАМЕТРЫ" ++.TP ++.I \-P, \-\-policy ++Альтернативная политика для анализа. (По умолчанию: текущая установленная политика /sys/fs/selinux/policy) ++.TP ++.I \-h, \-\-help ++Показать справочное сообщение ++ ++.SH "СМОТРИТЕ ТАКЖЕ" ++selinux(8), sepolicy-booleans(8), sepolicy-communicate(8), sepolicy-generate(8),sepolicy-gui(8), sepolicy-interface(8), sepolicy-network(8), sepolicy-manpage(8), sepolicy-transition(8) ++ ++.SH "АВТОРЫ" ++Эта man-страница была написана Daniel Walsh . ++Перевод на русский язык выполнила Герасименко Олеся . +-- +2.41.0 + diff --git a/SOURCES/0014-python-sepolicy-Improve-man-pages.patch b/SOURCES/0014-python-sepolicy-Improve-man-pages.patch deleted file mode 100644 index c168c53..0000000 --- a/SOURCES/0014-python-sepolicy-Improve-man-pages.patch +++ /dev/null @@ -1,391 +0,0 @@ -From 72420ec0eb2ca8cf4cc9099dcd495695eeab308b Mon Sep 17 00:00:00 2001 -From: Vit Mojzis -Date: Thu, 1 Jun 2023 16:39:12 +0200 -Subject: [PATCH] python/sepolicy: Improve man pages -Content-type: text/plain - -- Add missing options -- Add examples -- Emphasize keywords -- Remove trailing whitespaces - -Signed-off-by: Vit Mojzis -Acked-by: Petr Lautrbach ---- - python/sepolicy/sepolicy-booleans.8 | 15 +++++++++--- - python/sepolicy/sepolicy-communicate.8 | 14 ++++++++--- - python/sepolicy/sepolicy-generate.8 | 34 ++++++++++++-------------- - python/sepolicy/sepolicy-gui.8 | 4 +-- - python/sepolicy/sepolicy-interface.8 | 18 +++++++++++--- - python/sepolicy/sepolicy-manpage.8 | 25 ++++++++++++++----- - python/sepolicy/sepolicy-network.8 | 17 ++++++------- - python/sepolicy/sepolicy-transition.8 | 19 +++++++++----- - 8 files changed, 96 insertions(+), 50 deletions(-) - -diff --git a/python/sepolicy/sepolicy-booleans.8 b/python/sepolicy/sepolicy-booleans.8 -index f8d8b56d5d4d..7f4b18e75ac8 100644 ---- a/python/sepolicy/sepolicy-booleans.8 -+++ b/python/sepolicy/sepolicy-booleans.8 -@@ -8,12 +8,16 @@ sepolicy-booleans \- Query SELinux Policy to see description of booleans - .B sepolicy booleans [\-h] [ \-a | \-b booleanname ... ] - - .SH "DESCRIPTION" --sepolicy booleans will show all booleans and their descriptions, or you can --choose individual booleans to display -+.B sepolicy booleans -+will show all booleans and their descriptions, or you can -+choose individual booleans to display. -+Please make sure that selinux-policy-devel is present in your system since it contains boolean descriptions extracted from the policy source code. Otherwise -+.B sepolicy booleans -+will only show descriptions generated based on boolean names. - - .SH "OPTIONS" - .TP --.I \-h, \-\-help -+.I \-h, \-\-help - Display help message - .TP - .I \-a, \-\-all -@@ -22,6 +26,11 @@ Display all boolean descriptions - .I \-b, \-\-boolean - boolean to get description - -+.SH EXAMPLE -+.nf -+List descriptions of samba_create_home_dirs and samba_enable_home_dirs booleans -+# sepolicy booleans -b samba_create_home_dirs samba_enable_home_dirs -+ - .SH "AUTHOR" - This man page was written by Daniel Walsh - -diff --git a/python/sepolicy/sepolicy-communicate.8 b/python/sepolicy/sepolicy-communicate.8 -index 050aa475eef1..5ecf6eff0f6b 100644 ---- a/python/sepolicy/sepolicy-communicate.8 -+++ b/python/sepolicy/sepolicy-communicate.8 -@@ -8,7 +8,9 @@ sepolicy-communicate \- Generate a report showing if two SELinux Policy Domains - .B sepolicy communicate [\-h] \-s SOURCE \-t TARGET [\-c TCLASS] [\-S SOURCEACCESS] [\-T TARGETACCESS] - - .SH "DESCRIPTION" --Use sepolicy communicate to examine SELinux Policy to if a source SELinux Domain can communicate with a target SELinux Domain. -+Use -+.B sepolicy communicate -+to examine SELinux Policy and determine if a source SELinux Domain can communicate with a target SELinux Domain. - The default command looks to see if there are any file types that the source domain can write, which the target domain can read. - - .SH "OPTIONS" -@@ -16,7 +18,7 @@ The default command looks to see if there are any file types that the source dom - .I \-c, \-\-class - Specify the SELinux class which the source domain will attempt to communicate with the target domain. (Default file) - .TP --.I \-h, \-\-help -+.I \-h, \-\-help - Display help message - .TP - .I \-s, \-\-source -@@ -31,9 +33,15 @@ Specify the target SELinux domain type. - .I \-T, \-\-targetaccess - Specify the list of accesses used by the target SELinux domain type to receive communications from the source domain. Default Open, Read. - -+.SH EXAMPLE -+.nf -+List types that can be used to communicate between samba daemon and apache server -+# sepolicy communicate -s httpd_t -t smbd_t -+Consider a type to be accessible by the source domain when it can be opened and appended to (as opposed to opened and written to) -+# sepolicy communicate -s httpd_t -t smbd_t -S open,append -+ - .SH "AUTHOR" - This man page was written by Daniel Walsh - - .SH "SEE ALSO" - sepolicy(8), selinux(8) -- -diff --git a/python/sepolicy/sepolicy-generate.8 b/python/sepolicy/sepolicy-generate.8 -index 0c5f998f5412..72d0e8e41b6e 100644 ---- a/python/sepolicy/sepolicy-generate.8 -+++ b/python/sepolicy/sepolicy-generate.8 -@@ -57,32 +57,29 @@ path. \fBsepolicy generate\fP will use the rpm payload of the - application along with \fBnm \-D APPLICATION\fP to help it generate - types and policy rules for your policy files. - --.B Type Enforcing File NAME.te -+.B NAME.te - .br --This file can be used to define all the types rules for a particular domain. -+This file can be used to define all the types enforcement rules for a particular domain. - - .I Note: --Policy generated by \fBsepolicy generate\fP will automatically add a permissive DOMAIN to your te file. When you are satisfied that your policy works, you need to remove the permissive line from the te file to run your domain in enforcing mode. -+Policy generated by \fBsepolicy generate\fP will automatically add a \fIpermissive DOMAIN\fP to your \fB.te\fP file. When you are satisfied that your policy works, you need to remove the permissive line from the \fB.te\fP file to run your domain in enforcing mode. - --.B Interface File NAME.if -+.B NAME.if - .br --This file defines the interfaces for the types generated in the te file, which can be used by other policy domains. -+This file defines the interfaces for the types generated in the \fB.te\fP file, which can be used by other policy domains. - --.B File Context NAME.fc -+.B NAME.fc - .br --This file defines the default file context for the system, it takes the file types created in the te file and associates -+This file defines the default file context for the system, it takes the file types created in the \fB.te\fP file and associates - file paths to the types. Tools like restorecon and RPM will use these paths to put down labels. - --.B RPM Spec File NAME_selinux.spec -+.B NAME_selinux.spec - .br --This file is an RPM SPEC file that can be used to install the SELinux policy on to machines and setup the labeling. The spec file also installs the interface file and a man page describing the policy. You can use \fBsepolicy manpage \-d NAME\fP to generate the man page. -+This file is an RPM SPEC file that can be used to install the SELinux policy on to machines and setup the labeling. The spec file also installs the interface file and a man page describing the policy. You can use \fBsepolicy manpage \-d NAME\fP to generate the man page. - --.B Shell File NAME.sh -+.B NAME.sh - .br --This is a helper shell script to compile, install and fix the labeling on your test system. It will also generate a man page based on the installed policy, and --compile and build an RPM suitable to be installed on other machines -- --If a generate is possible, this tool will print out all generate paths from the source domain to the target domain -+This is a helper shell script to compile, install and fix the labeling on your test system. It will also generate a man page based on the installed policy, and compile and build an RPM suitable to be installed on other machines. - - .SH "OPTIONS" - .TP -@@ -97,10 +94,11 @@ Specify alternate name of policy. The policy will default to the executable or n - .TP - .I \-p, \-\-path - Specify the directory to store the created policy files. (Default to current working directory ) -+.TP - optional arguments: - .TP - .I \-r, \-\-role --Enter role(s) to which this admin user will transition. -+Enter role(s) to which this admin user will transition - .TP - .I \-t, \-\-type - Enter type(s) for which you will generate new definition and rule(s) -@@ -109,12 +107,12 @@ Enter type(s) for which you will generate new definition and rule(s) - SELinux user(s) which will transition to this domain - .TP - .I \-w, \-\-writepath --Path(s) which the confined processes need to write -+Path(s) which the confined processes need to write to - .TP - .I \-a, \-\-admin - Domain(s) which the confined admin will administrate - .TP --.I \-\-admin_user -+.I \-\-admin_user - Generate Policy for Administrator Login User Role - .TP - .I \-\-application -@@ -142,7 +140,7 @@ Generate Policy for Internet Services Daemon - Generate Policy for Standard Init Daemon (Default) - .TP - .I \-\-newtype --Generate new policy for new types to add to an existing policy. -+Generate new policy for new types to add to an existing policy - .TP - .I \-\-sandbox - Generate Policy for Sandbox -diff --git a/python/sepolicy/sepolicy-gui.8 b/python/sepolicy/sepolicy-gui.8 -index ed744cdb914e..65b69faba144 100644 ---- a/python/sepolicy/sepolicy-gui.8 -+++ b/python/sepolicy/sepolicy-gui.8 -@@ -11,7 +11,7 @@ Common options - .br - - .SH "DESCRIPTION" --Use \fBsepolicy gui\fP to run a the graphical user interface, which -+Use \fBsepolicy gui\fP to run the graphical user interface, which - allows you to explore how SELinux confines different process domains. - - .SH "OPTIONS" -@@ -20,7 +20,7 @@ allows you to explore how SELinux confines different process domains. - Display help message - .TP - .I \-d, \-\-domain --Initialize gui to the selected domain. -+Initialize gui to the selected domain - - .SH "AUTHOR" - This man page was written by Daniel Walsh -diff --git a/python/sepolicy/sepolicy-interface.8 b/python/sepolicy/sepolicy-interface.8 -index 3e74ea627a79..a70a930629ea 100644 ---- a/python/sepolicy/sepolicy-interface.8 -+++ b/python/sepolicy/sepolicy-interface.8 -@@ -5,10 +5,10 @@ sepolicy-interface \- Print interface information based on the installed SELinux - .SH "SYNOPSIS" - - .br --.B sepolicy interface [\-h] [\-c] [\-v] [\-a | \-u | \-l | \-i INTERFACE [INTERFACE ... ]] -+.B sepolicy interface [\-h] [\-c] [\-v] [\-f FILE] [\-a | \-u | \-l | \-i INTERFACE [INTERFACE ... ]] - - .SH "DESCRIPTION" --Use sepolicy interface to print interfaces information based on SELinux Policy. -+Use \fBsepolicy interface\fP to print interface information based on SELinux Policy. - - .SH "OPTIONS" - .TP -@@ -18,7 +18,7 @@ List all domains with admin interface - .I \-c, \-\-compile - Test compile of interfaces - .TP --.I \-h, \-\-help -+.I \-h, \-\-help - Display help message - .TP - .I \-i, \-\-interface -@@ -32,6 +32,18 @@ List all domains with SELinux user role interface - .TP - .I \-v, \-\-verbose - Display extended information about the interface including parameters and description if available. -+.TP -+.I \-f, \-\-file -+Interface file to be explored -+ -+.SH EXAMPLE -+.nf -+Show description of given interface -+# sepolicy interface -vi samba_rw_config -+List interfaces in given interface file and show their description -+# sepolicy interface -f my_policy.if -lv -+Run compile test for all interfaces in given file -+# sepolicy interface -f my_policy.if -lc - - .SH "AUTHOR" - This man page was written by Daniel Walsh -diff --git a/python/sepolicy/sepolicy-manpage.8 b/python/sepolicy/sepolicy-manpage.8 -index c05c94305633..4991f645ba38 100644 ---- a/python/sepolicy/sepolicy-manpage.8 -+++ b/python/sepolicy/sepolicy-manpage.8 -@@ -8,27 +8,40 @@ sepolicy-manpage \- Generate a man page based on the installed SELinux Policy - .B sepolicy manpage [\-w] [\-h] [\-p PATH ] [\-r ROOTDIR ] [\-a | \-d ] - - .SH "DESCRIPTION" --Use sepolicy manpage to generate manpages based on SELinux Policy. -+Use \fBsepolicy manpage\fP to generate manpages based on SELinux Policy. - - .SH "OPTIONS" - .TP --.I \-a, \-\-all -+.I \-a, \-\-all - Generate Man Pages for All Domains - .TP --.I \-d, \-\-domain -+.I \-d, \-\-domain - Generate a Man Page for the specified domain. (Supports multiple commands) - .TP --.I \-h, \-\-help -+.I \-h, \-\-help - Display help message - .TP -+.I \-o, \-\-os -+Specify the name of the OS to be used in the man page (only affects HTML man pages) -+.TP - .I \-p, \-\-path - Specify the directory to store the created man pages. (Default to /tmp) - .TP - .I \-r, \-\-root --Specify alternate root directory to generate man pages from. (Default to /) -+Specify alternative root directory to generate man pages from. (Default to /) -+.TP -+.I \-\-source_files -+Use file_contexts and policy.xml files from the specified root directory (the alternative root needs to include both files) - .TP - .I \-w, \-\-web --Generate an additional HTML man pages for the specified domain(s). -+Generate an additional HTML man pages for the specified domain(s) -+ -+.SH EXAMPLE -+.nf -+Generate man pages for all available domains -+# sepolicy manpage -a -+Generate an HTML man page for domain alsa_t, setting the OS name to "My_distro" -+# sepolicy manpage -o My_distro -d alsa_t -w - - .SH "AUTHOR" - This man page was written by Daniel Walsh -diff --git a/python/sepolicy/sepolicy-network.8 b/python/sepolicy/sepolicy-network.8 -index dcddec756774..6faf60ab7a44 100644 ---- a/python/sepolicy/sepolicy-network.8 -+++ b/python/sepolicy/sepolicy-network.8 -@@ -8,27 +8,27 @@ sepolicy-network \- Examine the SELinux Policy and generate a network report - .B sepolicy network [\-h] (\-l | \-a application [application ...] | \-p PORT [PORT ...] | \-t TYPE [TYPE ...] | \-d DOMAIN [DOMAIN ...]) - - .SH "DESCRIPTION" --Use sepolicy network to examine SELinux Policy and generate network reports. -+Use \fBsepolicy network\fP to examine SELinux Policy and generate network reports. - - .SH "OPTIONS" - .TP - .I \-a, \-\-application --Generate a report listing the ports to which the specified init application is allowed to connect and or bind. -+Generate a report listing the ports to which the specified init application is allowed to connect and or bind - .TP --.I \-d, \-\-domain --Generate a report listing the ports to which the specified domain is allowed to connect and or bind. -+.I \-d, \-\-domain -+Generate a report listing the ports to which the specified domain is allowed to connect and or bind - .TP --.I \-l, \-\-list -+.I \-l, \-\-list - List all Network Port Types defined in SELinux Policy - .TP --.I \-h, \-\-help -+.I \-h, \-\-help - Display help message - .TP - .I \-t, \-\-type --Generate a report listing the port numbers associate with the specified SELinux port type. -+Generate a report listing the port numbers associate with the specified SELinux port type - .TP - .I \-p, \-\-port --Generate a report listing the SELinux port types associate with the specified port number. -+Generate a report listing the SELinux port types associate with the specified port number - - .SH "EXAMPLES" - -@@ -88,4 +88,3 @@ This man page was written by Daniel Walsh - - .SH "SEE ALSO" - sepolicy(8), selinux(8), semanage(8) -- -diff --git a/python/sepolicy/sepolicy-transition.8 b/python/sepolicy/sepolicy-transition.8 -index 897f0c4c418e..9f9ff5a52165 100644 ---- a/python/sepolicy/sepolicy-transition.8 -+++ b/python/sepolicy/sepolicy-transition.8 -@@ -11,21 +11,28 @@ sepolicy-transition \- Examine the SELinux Policy and generate a process transit - .B sepolicy transition [\-h] \-s SOURCE \-t TARGET - - .SH "DESCRIPTION" --sepolicy transition will show all domains that a give SELinux source domain can transition to, including the entrypoint. -+\fBsepolicy transition\fP will show all domains that a given SELinux source domain can transition to, including the entrypoint. - --If a target domain is given, sepolicy transition will examine policy for all transition paths from the source domain to the target domain, and will list the --paths. If a transition is possible, this tool will print out all transition paths from the source domain to the target domain -+If a target domain is given, sepolicy transition will examine policy for all transition paths from the source domain to the target domain, and will list the -+paths. - - .SH "OPTIONS" - .TP --.I \-h, \-\-help -+.I \-h, \-\-help - Display help message - .TP - .I \-s, \-\-source --Specify the source SELinux domain type. -+Specify the source SELinux domain type - .TP - .I \-t, \-\-target --Specify the target SELinux domain type. -+Specify the target SELinux domain type -+ -+.SH EXAMPLE -+.nf -+List all domain transition paths from init_t to httpd_t -+# sepolicy transition -s init_t -t httpd_t -+List all transitions available from samba domain, including entry points and booleans controlling each transition -+# sepolicy transition -s smbd_t - - .SH "AUTHOR" - This man page was written by Daniel Walsh --- -2.41.0 - diff --git a/SOURCES/0015-Revert-python-Remove-the-Russian-translations.patch b/SOURCES/0015-Revert-python-Remove-the-Russian-translations.patch new file mode 100644 index 0000000..04fdce5 --- /dev/null +++ b/SOURCES/0015-Revert-python-Remove-the-Russian-translations.patch @@ -0,0 +1,1325 @@ +From 1bf22c0eacdb662b66102646ab916e25643edfe0 Mon Sep 17 00:00:00 2001 +From: Petr Lautrbach +Date: Mon, 13 Nov 2023 13:37:51 +0100 +Subject: [PATCH] Revert "python: Remove the Russian translations" +Content-type: text/plain + +This reverts commit fda3a45903a66cb1e56e06a79e8a0ca91056726e. +--- + python/audit2allow/ru/audit2allow.1 | 210 +++++++++++++++++++++++ + python/audit2allow/ru/audit2why.1 | 1 + + python/chcat/ru/chcat.8 | 57 ++++++ + python/semanage/ru/semanage-boolean.8 | 60 +++++++ + python/semanage/ru/semanage-dontaudit.8 | 32 ++++ + python/semanage/ru/semanage-export.8 | 36 ++++ + python/semanage/ru/semanage-fcontext.8 | 84 +++++++++ + python/semanage/ru/semanage-ibendport.8 | 67 ++++++++ + python/semanage/ru/semanage-ibpkey.8 | 67 ++++++++ + python/semanage/ru/semanage-import.8 | 35 ++++ + python/semanage/ru/semanage-interface.8 | 62 +++++++ + python/semanage/ru/semanage-login.8 | 67 ++++++++ + python/semanage/ru/semanage-module.8 | 61 +++++++ + python/semanage/ru/semanage-node.8 | 59 +++++++ + python/semanage/ru/semanage-permissive.8 | 47 +++++ + python/semanage/ru/semanage-port.8 | 69 ++++++++ + python/semanage/ru/semanage-user.8 | 70 ++++++++ + python/semanage/ru/semanage.8 | 84 +++++++++ + 18 files changed, 1168 insertions(+) + create mode 100644 python/audit2allow/ru/audit2allow.1 + create mode 100644 python/audit2allow/ru/audit2why.1 + create mode 100644 python/chcat/ru/chcat.8 + create mode 100644 python/semanage/ru/semanage-boolean.8 + create mode 100644 python/semanage/ru/semanage-dontaudit.8 + create mode 100644 python/semanage/ru/semanage-export.8 + create mode 100644 python/semanage/ru/semanage-fcontext.8 + create mode 100644 python/semanage/ru/semanage-ibendport.8 + create mode 100644 python/semanage/ru/semanage-ibpkey.8 + create mode 100644 python/semanage/ru/semanage-import.8 + create mode 100644 python/semanage/ru/semanage-interface.8 + create mode 100644 python/semanage/ru/semanage-login.8 + create mode 100644 python/semanage/ru/semanage-module.8 + create mode 100644 python/semanage/ru/semanage-node.8 + create mode 100644 python/semanage/ru/semanage-permissive.8 + create mode 100644 python/semanage/ru/semanage-port.8 + create mode 100644 python/semanage/ru/semanage-user.8 + create mode 100644 python/semanage/ru/semanage.8 + +diff --git a/python/audit2allow/ru/audit2allow.1 b/python/audit2allow/ru/audit2allow.1 +new file mode 100644 +index 000000000000..b631895d277f +--- /dev/null ++++ b/python/audit2allow/ru/audit2allow.1 +@@ -0,0 +1,210 @@ ++.\" Hey, Emacs! This is an -*- nroff -*- source file. ++.\" Copyright (c) 2005 Manoj Srivastava ++.\" Copyright (c) 2010 Dan Walsh ++.\" ++.\" This is free documentation; you can redistribute it and/or ++.\" modify it under the terms of the GNU General Public License as ++.\" published by the Free Software Foundation; either version 2 of ++.\" the License, or (at your option) any later version. ++.\" ++.\" The GNU General Public License's references to "object code" ++.\" and "executables" are to be interpreted as the output of any ++.\" document formatting or typesetting system, including ++.\" intermediate and printed output. ++.\" ++.\" This manual is distributed in the hope that it will be useful, ++.\" but WITHOUT ANY WARRANTY; without even the implied warranty of ++.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++.\" GNU General Public License for more details. ++.\" ++.\" You should have received a copy of the GNU General Public ++.\" License along with this manual; if not, write to the Free ++.\" Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, ++.\" USA. ++.\" ++.\" ++.TH AUDIT2ALLOW "1" "Октябрь 2010" "Security Enhanced Linux" ++.SH ИМЯ ++.BR audit2allow ++\- создаёт правила политики SELinux allow/dontaudit из журналов отклонённых операций ++ ++.BR audit2why ++\- преобразовывает сообщения аудита SELinux в описание причины отказа в доступе (audit2allow \-w) ++ ++.SH ОБЗОР ++.B audit2allow ++.RI [ options "] " ++.SH ПАРАМЕТРЫ ++.TP ++.B "\-a" | "\-\-all" ++Прочитать ввод из журнала аудита и сообщений, конфликтует с \-i ++.TP ++.B "\-b" | "\-\-boot" ++Прочитать ввод из сообщений аудита с момента последней загрузки, конфликтует с \-i ++.TP ++.B "\-d" | "\-\-dmesg" ++Прочитать ввод из вывода ++.I /bin/dmesg. ++Обратите внимание, что с помощью dmesg будут доступны не все сообщения аудита, когда выполняется auditd; в этом случае используйте "ausearch \-m avc | audit2allow" или "\-a". ++.TP ++.B "\-D" | "\-\-dontaudit" ++Создать правила dontaudit (по умолчанию: allow) ++.TP ++.B "\-h" | "\-\-help" ++Вывести краткое сообщение об использовании ++.TP ++.B "\-i " | "\-\-input " ++Прочитать ввод из ++.I ++.TP ++.B "\-l" | "\-\-lastreload" ++Прочитать ввод только после последней перезагрузки политики ++.TP ++.B "\-m " | "\-\-module " ++Создать модуль / запросить вывод ++.TP ++.B "\-M " ++Создать загружаемый пакет модуля, конфликтует с \-o ++.TP ++.B "\-p " | "\-\-policy " ++Файл политики, который следует использовать для анализа ++.TP ++.B "\-o " | "\-\-output " ++Добавить вывод в конец ++.I ++.TP ++.B "\-r" | "\-\-requires" ++Создать вывод в синтаксисе загружаемого модуля ++.TP ++.B "\-N" | "\-\-noreference" ++Не создавать эталонную политику, традиционные разрешительные правила. ++Это поведение по умолчанию. ++.TP ++.B "\-R" | "\-\-reference" ++Создать эталонную политику с помощью установленных макросов. ++Будет предпринята попытка сопоставить отказы в доступе с интерфейсами, это сопоставление может быть неправильным. ++.TP ++.B "\-x" | "\-\-xperms" ++Создать расширенные правила вектора доступа для разрешения ++.TP ++.B "\-w" | "\-\-why" ++Преобразовать сообщения аудита SELinux в описание причин отказа в доступе ++ ++.TP ++.B "\-v" | "\-\-verbose" ++Включить подробный вывод ++ ++.SH ОПИСАНИЕ ++.PP ++Эта утилита ищет в журналах сообщения, которые появляются, когда система не даёт разрешения на операции, и создаёт фрагмент кода правил политики, который (если бы был загружен в политику) мог бы позволить этим операциям успешно завершиться. Однако эта утилита создаёт только разрешительные (allow) правила принудительного присвоения типов. При работе с некоторыми отказами в разрешениях может потребоваться изменить политику как-то иначе, например, добавить атрибут в объявление типа для удовлетворения существующему ограничению, добавить разрешительное правило для роли или изменить ограничение. Утилиту ++.BR audit2why (8) ++можно использовать для диагностики неясных причин отказов в разрешениях. ++.PP ++Использовать вывод этой утилиты необходимо с осторожностью; убедитесь, что разрешаемые операции не представляют угрозы безопасности. Часто лучше определить новые домены и/или типы или выполнить другие структурные изменения, чтобы разрешить успешное выполнение только оптимальному набору операций, а не вслепую применять иногда слишком обширные изменения, которые рекомендуются утилитой. Некоторые запреты на использование разрешений не вызывают критических ошибок в приложении; в этом случае предпочтительным может быть простое подавление журналирования отказов с помощью правила 'dontaudit', а не использование разрешительного правила 'allow'. ++.PP ++.SH ПРИМЕР ++.nf ++.B ПРИМЕЧАНИЕ: эти примеры относятся к системам, использующим пакет аудита. Если вы ++.B не используете пакет аудита, сообщения кэша вектора доступа (AVC) будут находиться в каталоге /var/log/messages. ++.B Замените в примерах /var/log/messages на /var/log/audit/audit.log ++.PP ++.B Использование audit2allow для создания модульной политики ++ ++$ cat /var/log/audit/audit.log | audit2allow \-m local > local.te ++$ cat local.te ++module local 1.0; ++ ++require { ++ class file { getattr open read }; ++ ++ ++ type myapp_t; ++ type etc_t; ++ }; ++ ++ ++allow myapp_t etc_t:file { getattr open read }; ++<просмотреть local.te и настроить требуемым образом> ++ ++.B Использование audit2allow для создания модульной политики с помощью эталонной политики ++ ++$ cat /var/log/audit/audit.log | audit2allow \-R \-m local > local.te ++$ cat local.te ++policy_module(local, 1.0) ++ ++gen_require(` ++ type myapp_t; ++ type etc_t; ++ }; ++ ++files_read_etc_files(myapp_t) ++<просмотреть local.te и настроить требуемым образом> ++ ++.B Сборка модульной политики с помощью Makefile ++ ++# SELinux предоставляет среду разработки политики в ++# /usr/share/selinux/devel, включая все поставляемые ++# файлы интерфейса. ++# Можно создать файл .te и скомпилировать его, выполнив ++ ++$ make \-f /usr/share/selinux/devel/Makefile local.pp ++ ++ ++# Эта команда make скомпилирует файл local.te в текущем ++# каталоге. Если не был указан файл "pp", будут скомпилированы ++# все файлы "te" в текущем каталоге. После компиляции файла ++# .te в файл "pp" его потребуется установить с помощью ++# команды semodule. ++ ++$ semodule \-i local.pp ++ ++.B Сборка модульной политики вручную ++ ++# Скомпилировать модуль ++$ checkmodule \-M \-m \-o local.mod local.te ++ ++# Создать пакет ++$ semodule_package \-o local.pp \-m local.mod ++ ++# Загрузить модуль в ядро ++$ semodule \-i local.pp ++ ++.B Использование audit2allow для создания и сборки модульной политики ++ ++$ cat /var/log/audit/audit.log | audit2allow \-M local ++Создание файла принудительного присвоения типов: local.te ++ ++Компиляция политики: checkmodule \-M \-m \-o local.mod local.te ++Сборка пакета: semodule_package \-o local.pp \-m local.mod ++ ++******************** ВАЖНО *********************** ++ ++Чтобы загрузить созданный пакет политики в ядро, необходимо выполнить ++ ++semodule \-i local.pp ++ ++.B Использование audit2allow для создания монолитной (не модульной) политики ++ ++$ cd /etc/selinux/$SELINUXTYPE/src/policy ++$ cat /var/log/audit/audit.log | audit2allow >> domains/misc/local.te ++$ cat domains/misc/local.te ++allow cupsd_config_t unconfined_t:fifo_file { getattr ioctl }; ++<просмотреть domains/misc/local.te и настроить требуемым образом> ++$ make load ++ ++.fi ++.PP ++.SH АВТОРЫ ++Эта страница руководства была написана ++.I Manoj Srivastava ++для системы Debian GNU/Linux. Она была обновлена Dan Walsh . ++.PP ++В разработке утилиты ++.B audit2allow ++участвовало несколько человек, в том числе ++.I Justin R. Smith, ++.I Yuichi Nakamura ++и ++.I Dan Walsh. ++Перевод на русский язык выполнила ++.I Герасименко Олеся . +diff --git a/python/audit2allow/ru/audit2why.1 b/python/audit2allow/ru/audit2why.1 +new file mode 100644 +index 000000000000..a9e88939990c +--- /dev/null ++++ b/python/audit2allow/ru/audit2why.1 +@@ -0,0 +1 @@ ++.so man1/audit2allow.1 +diff --git a/python/chcat/ru/chcat.8 b/python/chcat/ru/chcat.8 +new file mode 100644 +index 000000000000..9a904ff3573c +--- /dev/null ++++ b/python/chcat/ru/chcat.8 +@@ -0,0 +1,57 @@ ++.TH CHCAT "8" "Сентябрь 2005" "chcat" "Команды пользователя" ++.SH ИМЯ ++chcat \- изменить SELinux-категорию безопасности файла ++.SH ОБЗОР ++.B chcat ++\fIcategory file\fR... ++.br ++.B chcat -l ++\fIcategory user\fR... ++.br ++.B chcat ++\fI[[+|-]category...] file\fR... ++.br ++.B chcat -l ++\fI[[+|-]category...] user\fR... ++.br ++.B chcat ++[\fI-d\fR] \fIfile\fR... ++.br ++.B chcat -l ++[\fI-d\fR] \fIuser\fR... ++.br ++.B chcat ++\fI-L\fR [ \-l ] [ user ... ] ++.br ++.SH ОПИСАНИЕ ++.PP ++Изменить/Удалить категорию безопасности \fIcategory\fR для каждого файла \fIfile\fR или пользователя \fIuser\fR. ++.PP ++Используйте +/- для добавления/удаления категорий из \fIfile\fR или \fIuser\fR. ++.PP ++.B ++Примечание: ++При удалении категории необходимо указать '\-\-' в командной строке перед использованием синтаксиса \-Category. Это сообщает команде, что вы закончили вводить параметры и теперь указываете имя категории. ++ ++.TP ++\fB\-d\fR ++удалить категорию из каждого FILE/USER. ++.TP ++\fB\-L\fR ++вывести список доступных категорий. ++.TP ++\fB\-l\fR ++если используется, chcat будет работать с пользователями, а не с файлами. ++.SH "СМОТРИТЕ ТАКЖЕ" ++.TP ++chcon(1), selinux(8), semanage(8) ++.PP ++.br ++При работе с файлами этот сценарий вызывает команду chcon. ++.SH "FILES" ++/etc/selinux/{SELINUXTYPE}/setrans.conf ++.br ++/etc/selinux/{SELINUXTYPE}/seusers ++ ++.SH "АВТОРЫ" ++Перевод на русский язык выполнила Герасименко Олеся +diff --git a/python/semanage/ru/semanage-boolean.8 b/python/semanage/ru/semanage-boolean.8 +new file mode 100644 +index 000000000000..cc91e70a56e3 +--- /dev/null ++++ b/python/semanage/ru/semanage-boolean.8 +@@ -0,0 +1,60 @@ ++.TH "semanage-boolean" "8" "20130617" "" "" ++.SH "ИМЯ" ++semanage\-boolean \- утилита для управления политикой SELinux, основанная на использовании логических переключателей ++.SH "ОБЗОР" ++.B semanage boolean [\-h] [\-n] [\-N] [\-S STORE] [ \-\-extract | \-\-deleteall | \-\-list [\-C] | \-\-modify ( \-\-on | \-\-off ) boolean ] ++ ++.SH "ОПИСАНИЕ" ++Команда semanage используется для настройки определённых элементов политики ++SELinux без необходимости изменения или перекомпиляции исходного текста политики. Команда semanage boolean управляет настройками логических переключателей в политике SELinux. Логические переключатели - это правила if\-then\-else, записанные в политике SELinux. Их можно использовать для настройки того, как правила политики SELinux влияют на ограниченный домен. ++.SH "ПАРАМЕТРЫ" ++.TP ++.I \-h, \-\-help ++показать это справочное сообщение и выйти ++.TP ++.I \-n, \-\-noheading ++не показывать заголовок при выводе указанного типа объекта ++.TP ++.I \-N, \-\-noreload ++не перезагружать политику после фиксации ++.TP ++.I \-S STORE, \-\-store STORE ++выбрать для управления альтернативное хранилище политики SELinux ++.TP ++.I \-C, \-\-locallist ++вывести список локальных настроек ++.TP ++.I \-m, \-\-modify ++изменить запись указанного типа объекта ++.TP ++.I \-l, \-\-list ++вывести список записей указанного типа объекта ++.TP ++.I \-E, \-\-extract ++извлечь настраиваемые команды для использования в транзакции ++.TP ++.I \-D, \-\-deleteall ++удалить все локальные настройки ++.TP ++.I \-1, \-\-on ++включить логический переключатель ++.TP ++.I \-0, \-\-off ++отключить логический переключатель ++.SH ПРИМЕР ++.nf ++Включить на apache логический переключатель can send mail ++# semanage boolean \-m \-\-on httpd_can_sendmail ++ ++Вывести список настраиваемых логических переключателей ++# semanage boolean \-l \-C ++ ++.SH "СМОТРИТЕ ТАКЖЕ" ++.BR selinux (8), ++.BR semanage (8), ++.BR setsebool (8), ++.BR getsebool (8) ++ ++.SH "АВТОРЫ" ++Эта man-страница была написана Daniel Walsh . ++Перевод на русский язык выполнила Герасименко Олеся . +diff --git a/python/semanage/ru/semanage-dontaudit.8 b/python/semanage/ru/semanage-dontaudit.8 +new file mode 100644 +index 000000000000..4f992ce4e53e +--- /dev/null ++++ b/python/semanage/ru/semanage-dontaudit.8 +@@ -0,0 +1,32 @@ ++.TH "semanage-dontaudit" "8" "20130617" "" "" ++.SH "ИМЯ" ++.B semanage\-dontaudit \- утилита dontaudit для управления политикой SELinux ++.SH "ОБЗОР" ++.B semanage dontaudit [\-h] [\-S STORE] [\-N] {on,off} ++ ++.SH "ОПИСАНИЕ" ++semanage используется для настройки определённых элементов политики SELinux без необходимости изменения или перекомпиляции исходного текста политики. Команда semanage dontaudit определяет, будут ли правила dontaudit присутствовать в политике. Авторы политик применяют правила dontaudit для того, чтобы ограниченные приложения использовали альтернативные пути. При использовании правил dontaudit отказы в доступе выполняются, но не журналируются. Иногда использование правил dontaudit вызывает ошибки в приложениях (но авторы политик не знают о них, так как аудит кэша вектора доступа не выполняется). Отключите правила dontaudit с помощью этой команды, чтобы проверить, блокирует ли ядро доступ. ++ ++.SH "ПАРАМЕТРЫ" ++.TP ++.I \-h, \-\-help ++Показать это справочное сообщение и выйти ++.TP ++.I \-S STORE, \-\-store STORE ++Выбрать для управления альтернативное хранилище политики SELinux ++.TP ++.I \-N, \-\-noreload ++Не перезагружать политику после фиксации ++ ++.SH ПРИМЕР ++.nf ++Отключить правила dontaudit ++# semanage dontaudit off ++ ++.SH "СМОТРИТЕ ТАКЖЕ" ++.BR selinux (8), ++.BR semanage (8) ++ ++.SH "АВТОРЫ" ++Эта man-страница была написана Daniel Walsh . ++Перевод на русский язык выполнила Герасименко Олеся . +diff --git a/python/semanage/ru/semanage-export.8 b/python/semanage/ru/semanage-export.8 +new file mode 100644 +index 000000000000..a4a67e8e6e5b +--- /dev/null ++++ b/python/semanage/ru/semanage-export.8 +@@ -0,0 +1,36 @@ ++.TH "semanage-export" "8" "20130617" "" "" ++.SH "ИМЯ" ++.B semanage\-export \- утилита импорта для управления политикой SELinux ++.SH "ОБЗОР" ++.B semanage export [\-h] [\-S STORE] [\-f OUTPUT_FILE] ++ ++.SH "ОПИСАНИЕ" ++semanage используется для настройки определённых элементов политики SELinux без необходимости изменения или перекомпиляции исходного текста политики. Команды semanage import и semanage export можно использовать, чтобы извлечь изменения SELinux на одном компьютере и применить их к другому. В файл можно поместить целую группу команд semanage и применить их к компьютеру в одной транзакции. ++ ++.SH "ПАРАМЕТРЫ" ++.TP ++.I \-h, \-\-help ++показать это справочное сообщение и выйти ++.TP ++.I \-S STORE, \-\-store STORE ++выбрать для управления альтернативное хранилище политики SELinux ++.TP ++.I \-f OUTPUT_FILE, \-\-output_file OUTPUT_FILE ++выходной файл ++ ++.SH ПРИМЕР ++.nf ++Импортировать изменения semanage с другого компьютера ++# semanage export \-f semanage.mods ++# scp semanage.mod remotemachine: ++# ssh remotemachine ++# semanage import \-f semanage.mods ++ ++.SH "СМОТРИТЕ ТАКЖЕ" ++.BR selinux (8), ++.BR semanage (8), ++.BR semanage-import (8) ++ ++.SH "АВТОРЫ" ++Эта man-страница была написана Daniel Walsh . ++Перевод на русский язык выполнила Герасименко Олеся . +diff --git a/python/semanage/ru/semanage-fcontext.8 b/python/semanage/ru/semanage-fcontext.8 +new file mode 100644 +index 000000000000..243052dac757 +--- /dev/null ++++ b/python/semanage/ru/semanage-fcontext.8 +@@ -0,0 +1,84 @@ ++.TH "semanage-fcontext" "8" "20130617" "" "" ++.SH "ИМЯ" ++semanage\-fcontext \- утилита для управления политикой SELinux, предназначенная для работы с контекстами файлов ++ ++.SH "ОБЗОР" ++.B semanage fcontext [\-h] [\-n] [\-N] [\-S STORE] [ \-\-add ( \-t TYPE \-f FTYPE \-r RANGE \-s SEUSER | \-e EQUAL ) FILE_SPEC ) | \-\-delete ( \-t TYPE \-f FTYPE | \-e EQUAL ) FILE_SPEC ) | \-\-deleteall | \-\-extract | \-\-list [\-C] | \-\-modify ( \-t TYPE \-f FTYPE \-r RANGE \-s SEUSER | \-e EQUAL ) FILE_SPEC ) ] ++ ++.SH "ОПИСАНИЕ" ++semanage используется для настройки определённых элементов политики SELinux без необходимости изменения или перекомпиляции исходного текста политики. Команда semanage fcontext используется для управления проставлением меток по умолчанию в файловой системе в системе SELinux. Эта команда с помощью регулярных выражений сопоставляет пути файлов с метками SELinux. ++ ++.SH "ПАРАМЕТРЫ" ++.TP ++.I \-h, \-\-help ++показать это справочное сообщение и выйти ++.TP ++.I \-n, \-\-noheading ++не показывать заголовок при выводе указанного типа объекта ++.TP ++.I \-N, \-\-noreload ++не перезагружать политику после фиксации ++.TP ++.I \-C, \-\-locallist ++вывести список локальных настроек ++.TP ++.I \-S STORE, \-\-store STORE ++выбрать для управления альтернативное хранилище политики SELinux ++.TP ++.I \-a, \-\-add ++добавить запись указанного типа объекта ++.TP ++.I \-d, \-\-delete ++удалить запись указанного типа объекта ++.TP ++.I \-m, \-\-modify ++изменить запись указанного типа объекта ++.TP ++.I \-l, \-\-list ++вывести список записей указанного типа объекта ++.TP ++.I \-E, \-\-extract ++извлечь настраиваемые команды для использования в транзакции ++.TP ++.I \-D, \-\-deleteall ++удалить все локальные настройки ++.TP ++.I \-e EQUAL, \-\-equal EQUAL ++Заменить путь к цели на путь к источнику при создании меток по умолчанию. Используется с fcontext. Необходимы аргументы путей к источнику и цели. Для целевого поддерева метки контекста будут проставляться тем же образом, который задан для источника. ++.TP ++.I \-f [{a,f,d,c,b,s,l,p}], \-\-ftype [{a,f,d,c,b,s,l,p}] ++Тип файла. Используется с fcontext. Требуется тип файла (показывается в поле режима по команде ls); например, используйте 'd' для соответствия только каталогам или 'f' для соответствия только обычным файлам. Могут передаваться следующие параметры типа файла: f (обычный файл), d (каталог), c (устройство символьного ввода-вывода), b (устройство блочного ввода-вывода), s (сокет), l (символическая ссылка), p (именованный канал). Если вы не укажете тип файла, по умолчанию будет установлен тип "all files" (все файлы). ++ ++.TP ++.I \-s SEUSER, \-\-seuser SEUSER ++имя пользователя SELinux ++.TP ++.I \-t TYPE, \-\-type TYPE ++SELinux-тип для объекта ++.TP ++.I \-r RANGE, \-\-range RANGE ++диапазон безопасности MLS/MCS (только для систем с поддержкой MLS/MCS). По умолчанию SELinux-диапазон для сопоставления имени входа SELinux принимает значение диапазона записи пользователя SELinux. По умолчанию SELinux-диапазон для пользователя SELinux принимает значение s0. ++ ++.SH ПРИМЕР ++.nf ++.I выполните restorecon после установки контекста файлов ++Добавьте контекст файлов для всего, что находится в /web ++# semanage fcontext \-a \-t httpd_sys_content_t "/web(/.*)?" ++# restorecon \-R \-v /web ++ ++Замените /home1 на /home при установке контекста файлов ++# semanage fcontext \-a \-e /home /home1 ++# restorecon \-R \-v /home1 ++ ++Выполните следующие команды для домашних каталогов, находящихся ниже каталога верхнего уровня, например /disk6/home ++# semanage fcontext \-a \-t home_root_t "/disk6" ++# semanage fcontext \-a \-e /home /disk6/home ++# restorecon \-R \-v /disk6 ++ ++.SH "СМОТРИТЕ ТАКЖЕ" ++.BR selinux (8), ++.BR semanage (8) ++ ++.SH "АВТОРЫ" ++Эта man-страница была написана Daniel Walsh . ++Перевод на русский язык выполнила Герасименко Олеся . +diff --git a/python/semanage/ru/semanage-ibendport.8 b/python/semanage/ru/semanage-ibendport.8 +new file mode 100644 +index 000000000000..41c6d7e6e2b2 +--- /dev/null ++++ b/python/semanage/ru/semanage-ibendport.8 +@@ -0,0 +1,67 @@ ++.TH "semanage-ibendport" "8" "20170508" "" "" ++.SH "ИМЯ" ++.B semanage\-ibendport \- утилита для управления политикой SELinux, предназначенная для сопоставления конечных портов infiniband ++.SH "ОБЗОР" ++.B semanage ibendport [\-h] [\-n] [\-N] [\-S STORE] [ \-\-add \-t TYPE \-z IBDEV_NAME \-r RANGE port | \-\-delete \-z IBDEV_NAME port | \-\-deleteall | \-\-extract | \-\-list [\-C] | \-\-modify \-t TYPE \-z IBDEV_NAME \-r RANGE port ] ++ ++.SH "ОПИСАНИЕ" ++semanage используется для настройки определённых элементов политики SELinux без необходимости изменения или перекомпиляции исходного текста политики. semanage ibendport управляет определениями типов ibendport для номеров ibendport. ++ ++.SH "ПАРАМЕТРЫ" ++.TP ++.I \-h, \-\-help ++показать это справочное сообщение и выйти ++.TP ++.I \-n, \-\-noheading ++не показывать заголовок при выводе указанного типа объекта ++.TP ++.I \-N, \-\-noreload ++не перезагружать политику после фиксации ++.TP ++.I \-S STORE, \-\-store STORE ++выбрать для управления альтернативное хранилище политики SELinux ++.TP ++.I \-C, \-\-locallist ++вывести список локальных настроек ++.TP ++.I \-a, \-\-add ++добавить запись указанного типа объекта ++.TP ++.I \-d, \-\-delete ++удалить запись указанного типа объекта ++.TP ++.I \-m, \-\-modify ++изменить запись указанного типа объекта ++.TP ++.I \-l, \-\-list ++вывести список записей указанного типа объекта ++.TP ++.I \-E, \-\-extract ++извлечь настраиваемые команды для использования в транзакции ++.TP ++.I \-D, \-\-deleteall ++удалить все локальные настройки ++.TP ++.I \-t TYPE, \-\-type TYPE ++SELinux-тип для объекта ++.TP ++.I \-r RANGE, \-\-range RANGE ++диапазон безопасности MLS/MCS (только для систем с поддержкой MLS/MCS). По умолчанию SELinux-диапазон для сопоставления имени входа SELinux принимает значение диапазона записи пользователя SELinux. По умолчанию SELinux-диапазон для пользователя SELinux принимает значение s0. ++.TP ++.I \-z IBDEV_NAME, \-\-ibdev_name IBDEV_NAME ++Имя устройства infiniband для порта, для которого следует проставить метку. (например, mlx5_0) ++ ++.SH ПРИМЕР ++.nf ++Вывести список всех определений ibendport ++# semanage ibendport \-l ++Проставить метку 'устройство mlx4_0 порт 2' ++# semanage ibendport \-a \-t allowed_ibendport_t \-z mlx4_0 2 ++ ++.SH "СМОТРИТЕ ТАКЖЕ" ++.BR selinux (8), ++.BR semanage (8) ++ ++.SH "АВТОРЫ" ++Эта man-страница была написана Daniel Jurgens . ++Перевод на русский язык выполнила Герасименко Олеся . +diff --git a/python/semanage/ru/semanage-ibpkey.8 b/python/semanage/ru/semanage-ibpkey.8 +new file mode 100644 +index 000000000000..846d553201df +--- /dev/null ++++ b/python/semanage/ru/semanage-ibpkey.8 +@@ -0,0 +1,67 @@ ++.TH "semanage-ibpkey" "8" "20170508" "" "" ++.SH "ИМЯ" ++.B semanage\-ibpkey \- утилита для управления политикой SELinux, предназначенная для сопоставления ключей разделов infiniband ++.SH "ОБЗОР" ++.B semanage ibpkey [\-h] [\-n] [\-N] [\-S STORE] [ \-\-add \-t TYPE \-x SUBNET_PREFIX \-r RANGE ibpkey_name | ibpkey_range | \-\-delete \-x SUBNET_PREFIX ibpkey_name | ibpkey_range | \-\-deleteall | \-\-extract | \-\-list [\-C] | \-\-modify \-t TYPE \-x SUBNET_PREFIX \-r RANGE ibpkey_name | ibpkey_range ] ++ ++.SH "ОПИСАНИЕ" ++semanage используется для настройки определённых элементов политики SELinux без необходимости изменения или перекомпиляции исходного текста политики. Команда semanage ibpkey управляет определениями типов ibpkey для номеров ibpkey. ++ ++.SH "ПАРАМЕТРЫ" ++.TP ++.I \-h, \-\-help ++показать это справочное сообщение и выйти ++.TP ++.I \-n, \-\-noheading ++не показывать заголовок при выводе указанного типа объекта ++.TP ++.I \-N, \-\-noreload ++не перезагружать политику после фиксации ++.TP ++.I \-S STORE, \-\-store STORE ++выбрать для управления альтернативное хранилище политики SELinux ++.TP ++.I \-C, \-\-locallist ++вывести список локальных настроек ++.TP ++.I \-a, \-\-add ++добавить запись указанного типа объекта ++.TP ++.I \-d, \-\-delete ++удалить запись указанного типа объекта ++.TP ++.I \-m, \-\-modify ++изменить запись указанного типа объекта ++.TP ++.I \-l, \-\-list ++вывести список записей указанного типа объекта ++.TP ++.I \-E, \-\-extract ++извлечь настраиваемые команды для использования в транзакции ++.TP ++.I \-D, \-\-deleteall ++удалить все локальные настройки ++.TP ++.I \-t TYPE, \-\-type TYPE ++SELinux-тип для объекта ++.TP ++.I \-r RANGE, \-\-range RANGE ++диапазон безопасности MLS/MCS (только для систем с поддержкой MLS/MCS). По умолчанию SELinux-диапазон для сопоставления имени входа SELinux принимает значение диапазона записи пользователя SELinux. По умолчанию SELinux-диапазон для пользователя SELinux принимает значение s0. ++.TP ++.I \-x SUBNET_PREFIX, \-\-subnet_prefix SUBNET_PREFIX ++Префикс подсети для указанного ключа раздела (pkey) или диапазона ключей раздела. ++ ++.SH ПРИМЕР ++.nf ++Вывести список всех определений ibpkey ++# semanage ibpkey \-l ++Отметить pkey 0x8FFF (pkey ограниченного участия по умолчанию) как тип pkey по умолчанию ++# semanage ibpkey \-a \-t default_ibpkey_t \-x fe80:: 0x8FFF ++ ++.SH "СМОТРИТЕ ТАКЖЕ" ++.BR selinux (8), ++.BR semanage (8) ++ ++.SH "АВТОРЫ" ++Эта man-страница была написана Daniel Jurgens . ++Перевод на русский язык выполнила Герасименко Олеся . +diff --git a/python/semanage/ru/semanage-import.8 b/python/semanage/ru/semanage-import.8 +new file mode 100644 +index 000000000000..b374c41d53b1 +--- /dev/null ++++ b/python/semanage/ru/semanage-import.8 +@@ -0,0 +1,35 @@ ++.TH "semanage-import" "8" "20130617" "" "" ++.SH "ИМЯ" ++.B semanage\-import \- утилита импорта для управления политикой SELinux ++.SH "ОБЗОР" ++.B semanage import [\-h] [\-N] [\-S STORE] [\-f INPUT_FILE] ++ ++.SH "ОПИСАНИЕ" ++semanage используется для настройки определённых элементов политики SELinux без необходимости изменения или перекомпиляции исходного текста политики. Команды semanage import и semanage export можно использовать, чтобы извлечь изменения SELinux на одном компьютере и применить их к другому. В файл можно поместить целую группу команд semanage и применить их к компьютеру в одной транзакции. ++ ++.SH "ПАРАМЕТРЫ" ++.TP ++.I \-h, \-\-help ++показать это справочное сообщение и выйти ++.TP ++.I \-N, \-\-noreload ++не перезагружать политику после фиксации ++.TP ++.I \-S STORE, \-\-store STORE ++выбрать для управления альтернативное хранилище политики SELinux ++.TP ++.I \-f INPUT_FILE, \-\-input_file INPUT_FILE ++входной файл ++.SH ПРИМЕР ++.nf ++Импортировать изменения semanage с другого компьютера ++# semanage import \-f semanage.mods ++ ++.SH "СМОТРИТЕ ТАКЖЕ" ++.B selinux (8), ++.B semanage (8), ++.B semanage-export (8) ++ ++.SH "АВТОРЫ" ++Эта man-страница была написана Daniel Walsh . ++Перевод на русский язык выполнила Герасименко Олеся . +diff --git a/python/semanage/ru/semanage-interface.8 b/python/semanage/ru/semanage-interface.8 +new file mode 100644 +index 000000000000..62308f397246 +--- /dev/null ++++ b/python/semanage/ru/semanage-interface.8 +@@ -0,0 +1,62 @@ ++.TH "semanage-interface" "8" "20130617" "" "" ++.SH "ИМЯ" ++.B semanage\-interface \- утилита для управления политикой SELinux, предназначенная для работы с сетевыми интерфейсами ++.SH "ОБЗОР" ++.B semanage interface [\-h] [\-n] [\-N] [\-S STORE] [ \-\-add \-t TYPE \-r RANGE interface | \-\-delete interface | \-\-deleteall | \-\-extract | \-\-list [\-C] | \-\-modify \-t TYPE \-r RANGE interface ] ++ ++.SH "ОПИСАНИЕ" ++semanage используется для настройки определённых элементов политики SELinux без необходимости изменения или перекомпиляции исходного текста политики. Команда semanage interface управляет метками, которые назначаются сетевым интерфейсам. ++ ++.SH "ПАРАМЕТРЫ" ++.TP ++.I \-h, \-\-help ++показать это справочное сообщение и выйти ++.TP ++.I \-n, \-\-noheading ++не показывать заголовок при выводе указанного типа объекта ++.TP ++.I \-N, \-\-noreload ++не перезагружать политику после фиксации ++.TP ++.I \-S STORE, \-\-store STORE ++выбрать для управления альтернативное хранилище политики SELinux ++.TP ++.I \-C, \-\-locallist ++вывести список локальных настроек ++.TP ++.I \-a, \-\-add ++добавить запись указанного типа объекта ++.TP ++.I \-d, \-\-delete ++удалить запись указанного типа объекта ++.TP ++.I \-m, \-\-modify ++изменить запись указанного типа объекта ++.TP ++.I \-l, \-\-list ++вывести список записей указанного типа объекта ++.TP ++.I \-E, \-\-extract ++извлечь настраиваемые команды для использования в транзакции ++.TP ++.I \-D, \-\-deleteall ++удалить все локальные настройки ++.TP ++.I \-t TYPE, \-\-type TYPE ++SELinux-тип для объекта ++.TP ++.I \-r RANGE, \-\-range RANGE ++диапазон безопасности MLS/MCS (только для систем с поддержкой MLS/MCS). По умолчанию SELinux-диапазон для сопоставления имени входа SELinux принимает значение диапазона записи пользователя SELinux. По умолчанию SELinux-диапазон для пользователя SELinux принимает значение s0. ++ ++.SH ПРИМЕР ++.nf ++Вывести список всех определений интерфейсов ++# semanage interface \-l ++ ++.SH "СМОТРИТЕ ТАКЖЕ" ++.BR selinux (8), ++.BR semanage (8) ++ ++.SH "AUTHOR" ++Эта man-страница была написана Daniel Walsh . ++Перевод на русский язык выполнила Герасименко Олеся . +diff --git a/python/semanage/ru/semanage-login.8 b/python/semanage/ru/semanage-login.8 +new file mode 100644 +index 000000000000..47bd2193c691 +--- /dev/null ++++ b/python/semanage/ru/semanage-login.8 +@@ -0,0 +1,67 @@ ++.TH "semanage-login" "8" "20130617" "" "" ++.SH "ИМЯ" ++.B semanage\-login \- утилита для управления политикой SELinux, предназначенная для сопоставления пользователей Linux с пользователями SELinux ++.SH "ОБЗОР" ++.B semanage login [\-h] [\-n] [\-N] [\-S STORE] [ \-\-add \-s SEUSER \-r RANGE LOGIN | \-\-delete LOGIN | \-\-deleteall | \-\-extract | \-\-list [\-C] | \-\-modify \-s SEUSER \-r RANGE LOGIN ] ++ ++.SH "ОПИСАНИЕ" ++semanage используется для настройки определённых элементов политики SELinux без необходимости изменения или перекомпиляции исходного текста политики. Команда semanage login управляет сопоставлением пользователей Linux с пользователями SELinux. Её можно использовать для включения ограниченных пользователей. Например, можно определить, что конкретный пользователь или группа пользователей будет входить в систему как пользователь user_u. Чтобы указать имя группы, поставьте перед ним знак '%'. ++ ++.SH "ПАРАМЕТРЫ" ++.TP ++.I \-h, \-\-help ++показать это справочное сообщение и выйти ++.TP ++.I \-n, \-\-noheading ++не показывать заголовок при выводе указанного типа объекта ++.TP ++.I \-N, \-\-noreload ++не перезагружать политику после фиксации ++.TP ++.I \-C, \-\-locallist ++вывести список локальных настроек ++.TP ++.I \-S STORE, \-\-store STORE ++выбрать для управления альтернативное хранилище политики SELinux ++.TP ++.I \-a, \-\-add ++добавить запись указанного типа объекта ++.TP ++.I \-d, \-\-delete ++удалить запись указанного типа объекта ++.TP ++.I \-m, \-\-modify ++изменить запись указанного типа объекта ++.TP ++.I \-l, \-\-list ++вывести список записей указанного типа объекта ++.TP ++.I \-E, \-\-extract ++извлечь настраиваемые команды для использования в транзакции ++.TP ++.I \-D, \-\-deleteall ++удалить все локальные настройки ++.TP ++.I \-s SEUSER, \-\-seuser SEUSER ++имя пользователя SELinux ++.TP ++.I \-r RANGE, \-\-range RANGE ++диапазон безопасности MLS/MCS (только для систем с поддержкой MLS/MCS). По умолчанию SELinux-диапазон для сопоставления имени входа SELinux принимает значение диапазона записи пользователя SELinux. По умолчанию SELinux-диапазон для пользователя SELinux принимает значение s0. ++ ++.SH ПРИМЕР ++.nf ++Изменить пользователя по умолчанию в системе на пользователя guest_u ++# semanage login \-m \-s guest_u __default__ ++Назначить пользователю gijoe на компьютере с поддержкой MLS диапазон и пользователя staff_u ++# semanage login \-a \-s staff_u \-rSystemLow-Secret gijoe ++Назначить всем пользователям в группе engineering пользователя staff_u ++# semanage login \-a \-s staff_u %engineering ++ ++.SH "СМОТРИТЕ ТАКЖЕ" ++.BR selinux (8), ++.BR semanage (8), ++.BR semanage-user (8) ++ ++.SH "АВТОРЫ" ++Эта man-страница была написана Daniel Walsh . ++Перевод на русский язык выполнила Герасименко Олеся . +diff --git a/python/semanage/ru/semanage-module.8 b/python/semanage/ru/semanage-module.8 +new file mode 100644 +index 000000000000..2d8666d6c6f9 +--- /dev/null ++++ b/python/semanage/ru/semanage-module.8 +@@ -0,0 +1,61 @@ ++.TH "semanage-module" "8" "20130617" "" "" ++.SH "ИМЯ" ++.B semanage\-module \- утилита для управления политикой SELinux, предназначенная для сопоставления модулей ++.SH "ОБЗОР" ++.B semanage module [\-h] [\-n] [\-N] [\-S STORE] (\-a | \-r | \-e | \-d | \-\-extract | \-\-list [\-C] | \-\-deleteall) [module_name] ++ ++.SH "ОПИСАНИЕ" ++semanage используется для настройки определённых элементов политики SELinux без необходимости изменения или перекомпиляции исходного текста политики. Команда semanage module позволяет устанавливать, удалять, отключать модули политики SELinux. ++ ++.SH "ПАРАМЕТРЫ" ++.TP ++.I \-h, \-\-help ++показать это справочное сообщение и выйти ++.TP ++.I \-n, \-\-noheading ++не показывать заголовок при выводе указанного типа объекта ++.TP ++.I \-N, \-\-noreload ++не перезагружать политику после фиксации ++.TP ++.I \-S STORE, \-\-store STORE ++выбрать для управления альтернативное хранилище политики SELinux ++.TP ++.I \-a, \-\-add ++установить указанный модуль ++.TP ++.I \-r, \-\-remove ++удалить указанный модуль ++.TP ++.I \-d \-\-disable ++отключить указанный модуль ++.TP ++.I \-e \-\-enable ++включить указанный модуль ++.TP ++.I \-E, \-\-extract ++извлечь настраиваемые команды для использования в транзакции ++.TP ++.I \-l, \-\-list ++вывести список записей указанного типа объекта ++.TP ++.I \-C, \-\-locallist ++вывести список локальных настроек ++ ++.SH ПРИМЕР ++.nf ++Вывести список всех модулей ++# semanage module \-l ++Отключить неограниченный модуль (unconfined) ++# semanage module \-\-disable unconfined ++Установить пользовательский модуль политики apache ++# semanage module \-a myapache ++ ++.SH "СМОТРИТЕ ТАКЖЕ" ++.BR selinux (8), ++.BR semanage (8), ++.BR semodule (8) ++ ++.SH "АВТОРЫ" ++Эта man-страница была написана Daniel Walsh . ++Перевод на русский язык выполнила Герасименко Олеся . +diff --git a/python/semanage/ru/semanage-node.8 b/python/semanage/ru/semanage-node.8 +new file mode 100644 +index 000000000000..1e89eed9c380 +--- /dev/null ++++ b/python/semanage/ru/semanage-node.8 +@@ -0,0 +1,59 @@ ++.TH "semanage-node" "8" "20130617" "" "" ++.SH "ИМЯ" ++.B semanage\-node \- утилита для управления политикой SELinux, предназначенная для сопоставления узлов ++.SH "ОБЗОР" ++.B semanage node [\-h] [\-n] [\-N] [\-S STORE] [ \-\-add \-M NETMASK \-p PROTOCOL \-t TYPE \-r RANGE node | \-\-delete \-M NETMASK \-p PROTOCOL node | \-\-deleteall | \-\-extract | \-\-list [\-C] | \-\-modify \-M NETMASK \-p PROTOCOL \-t TYPE \-r RANGE node ] ++ ++.SH "ОПИСАНИЕ" ++semanage используется для настройки определённых элементов политики SELinux без необходимости изменения или перекомпиляции исходного текста политики. Команда semanage node управляет определениями типов узлов для IP-адресов. ++ ++.SH "ПАРАМЕТРЫ" ++.TP ++.I \-h, \-\-help ++показать это справочное сообщение и выйти ++.TP ++.I \-n, \-\-noheading ++не показывать заголовок при выводе указанного типа объекта ++.TP ++.I \-N, \-\-noreload ++не перезагружать политику после фиксации ++.TP ++.I \-S STORE, \-\-store STORE ++выбрать для управления альтернативное хранилище политики SELinux ++.TP ++.I \-C, \-\-locallist ++вывести список локальных настроек ++.TP ++.I \-a, \-\-add ++добавить запись указанного типа объекта ++.TP ++.I \-d, \-\-delete ++удалить запись указанного типа объекта ++.TP ++.I \-m, \-\-modify ++изменить запись указанного типа объекта ++.TP ++.I \-l, \-\-list ++вывести список записей указанного типа объекта ++.TP ++.I \-E, \-\-extract ++извлечь настраиваемые команды для использования в транзакции ++.TP ++.I \-D, \-\-deleteall ++удалить все локальные настройки ++.TP ++.I \-M NETMASK, \-\-netmask NETMASK ++маска сети ++.TP ++.I \-t TYPE, \-\-type TYPE ++SELinux-тип для объекта ++.TP ++.I \-r RANGE, \-\-range RANGE ++диапазон безопасности MLS/MCS (только для систем с поддержкой MLS/MCS). По умолчанию SELinux-диапазон для сопоставления имени входа SELinux принимает значение диапазона записи пользователя SELinux. По умолчанию SELinux-диапазон для пользователя SELinux принимает значение s0. ++.TP ++.I \-p PROTO, \-\-proto PROTO ++ ++Протокол для указанного порта (tcp|udp) или версия протокола Интернета для указанного узла (ipv4|ipv6). ++ ++.SH "АВТОРЫ" ++Перевод на русский язык выполнила Герасименко Олеся +diff --git a/python/semanage/ru/semanage-permissive.8 b/python/semanage/ru/semanage-permissive.8 +new file mode 100644 +index 000000000000..2fe8e013daca +--- /dev/null ++++ b/python/semanage/ru/semanage-permissive.8 +@@ -0,0 +1,47 @@ ++.TH "semanage-permissive" "8" "20130617" "" "" ++.SH "ИМЯ" ++.B semanage\-permissive \- утилита разрешительного сопоставления для управления политикой SELinux ++.SH "ОБЗОР" ++.B semanage permissive [\-h] (\-a | \-d | \-l) [\-n] [\-N] [\-S STORE] [type] ++ ++.SH "ОПИСАНИЕ" ++semanage используется для настройки определённых элементов политики SELinux без необходимости изменения или перекомпиляции исходного текста политики. Утилита semanage permissive позволяет добавить или удалить разрешительный модуль политики SELinux. ++ ++.SH "ПАРАМЕТРЫ" ++.TP ++.I \-h, \-\-help ++показать это справочное сообщение и выйти ++.TP ++.I \-a, \-\-add ++добавить запись указанного типа объекта ++.TP ++.I \-d, \-\-delete ++удалить запись указанного типа объекта ++.TP ++.I \-l, \-\-list ++вывести список записей указанного типа объекта ++.TP ++.I \-n, \-\-noheading ++не показывать заголовок при выводе указанного типа объекта ++.TP ++.I \-N, \-\-noreload ++не перезагружать политику после фиксации ++.TP ++.I \-S STORE, \-\-store STORE ++выбрать для управления альтернативное хранилище политики SELinux ++.TP ++ ++.SH ПРИМЕР ++.nf ++Вывести список всех разрешительных модулей ++# semanage permissive \-l ++Сделать httpd_t (веб-сервер) разрешительным доменом ++# semanage permissive \-a httpd_t ++ ++.SH "СМОТРИТЕ ТАКЖЕ" ++.BR selinux (8), ++.BR semanage (8) ++ ++.SH "АВТОРЫ" ++Эта man-страница была написана Daniel Walsh . ++Перевод на русский язык выполнила Герасименко Олеся . +diff --git a/python/semanage/ru/semanage-port.8 b/python/semanage/ru/semanage-port.8 +new file mode 100644 +index 000000000000..d0143466d233 +--- /dev/null ++++ b/python/semanage/ru/semanage-port.8 +@@ -0,0 +1,69 @@ ++.TH "semanage-port" "8" "20130617" "" "" ++.SH "ИМЯ" ++.B semanage\-port \- средство сопоставления портов для управления политикой SELinux ++.SH "ОБЗОР" ++.B semanage port [\-h] [\-n] [\-N] [\-S STORE] [ \-\-add \-t TYPE \-p PROTOCOL \-r RANGE port_name | port_range | \-\-delete \-p PROTOCOL port_name | port_range | \-\-deleteall | \-\-extract | \-\-list [\-C] | \-\-modify \-t TYPE \-p PROTOCOL \-r RANGE port_name | port_range ] ++ ++.SH "ОПИСАНИЕ" ++semanage используется для настройки определённых элементов политики SELinux без необходимости изменения или перекомпиляции исходного текста политики. Команда semanage port управляет определениями типов портов для номеров портов. ++ ++.SH "ПАРАМЕТРЫ" ++.TP ++.I \-h, \-\-help ++показать это справочное сообщение и выйти ++.TP ++.I \-n, \-\-noheading ++не показывать заголовок при выводе указанного типа объекта ++.TP ++.I \-N, \-\-noreload ++не перезагружать политику после фиксации ++.TP ++.I \-S STORE, \-\-store STORE ++выбрать для управления альтернативное хранилище политики SELinux ++.TP ++.I \-C, \-\-locallist ++вывести список локальных настроек ++.TP ++.I \-a, \-\-add ++добавить запись указанного типа объекта ++.TP ++.I \-d, \-\-delete ++удалить запись указанного типа объекта ++.TP ++.I \-m, \-\-modify ++изменить запись указанного типа объекта ++.TP ++.I \-l, \-\-list ++вывести список записей указанного типа объекта ++.TP ++.I \-E, \-\-extract ++извлечь настраиваемые команды для использования в транзакции ++.TP ++.I \-D, \-\-deleteall ++удалить все локальные настройки ++.TP ++.I \-t TYPE, \-\-type TYPE ++SELinux-тип для объекта ++.TP ++.I \-r RANGE, \-\-range RANGE ++диапазон безопасности MLS/MCS (только для систем с поддержкой MLS/MCS). По умолчанию SELinux-диапазон для сопоставления имени входа SELinux принимает значение диапазона записи пользователя SELinux. По умолчанию SELinux-диапазон для пользователя SELinux принимает значение s0. ++.TP ++.I \-p PROTO, \-\-proto PROTO ++Протокол для указанного порта (tcp|udp) или версия протокола Интернета для указанного узла (ipv4|ipv6). ++ ++.SH ПРИМЕР ++.nf ++Вывести список всех определений портов ++# semanage port \-l ++Разрешить Apache прослушивать tcp-порт 81 ++# semanage port \-a \-t http_port_t \-p tcp 81 ++Разрешить sshd прослушивать tcp-порт 8991 ++# semanage port \-a \-t ssh_port_t \-p tcp 8991 ++ ++.SH "СМОТРИТЕ ТАКЖЕ" ++.BR selinux (8), ++.BR semanage (8) ++ ++.SH "АВТОРЫ" ++Эта man-страница была написана Daniel Walsh . ++Перевод на русский язык выполнила Герасименко Олеся . +diff --git a/python/semanage/ru/semanage-user.8 b/python/semanage/ru/semanage-user.8 +new file mode 100644 +index 000000000000..06e3fa8a4c78 +--- /dev/null ++++ b/python/semanage/ru/semanage-user.8 +@@ -0,0 +1,70 @@ ++.TH "semanage-user" "8" "20130617" "" "" ++.SH "ИМЯ" ++.B semanage\-user \- утилита для управления политикой SELinux, предназначенная для сопоставления пользователей ++.SH "ОБЗОР" ++.B semanage user [\-h] [\-n] [\-N] [\-S STORE] [ \-\-add ( \-L LEVEL \-R ROLES \-r RANGE SEUSER) | \-\-delete SEUSER | \-\-deleteall | \-\-extract | \-\-list [\-C] | \-\-modify ( \-L LEVEL \-R ROLES \-r RANGE SEUSER ) ] ++ ++.SH "ОПИСАНИЕ" ++semanage используется для настройки определённых элементов политики SELinux без необходимости изменения или перекомпиляции исходного текста политики. Команда semanage user управляет сопоставлением пользователей SELinux с ролями и уровнями MLS/MCS. ++ ++.SH "ПАРАМЕТРЫ" ++.TP ++.I \-h, \-\-help ++показать это справочное сообщение и выйти ++.TP ++.I \-n, \-\-noheading ++не показывать заголовок при выводе указанного типа объекта ++.TP ++.I \-N, \-\-noreload ++не перезагружать политику после фиксации ++.TP ++.I \-S STORE, \-\-store STORE ++выбрать для управления альтернативное хранилище политики SELinux ++.TP ++.I \-C, \-\-locallist ++вывести список локальных настроек ++.TP ++.I \-a, \-\-add ++добавить запись указанного типа объекта ++.TP ++.I \-d, \-\-delete ++удалить запись указанного типа объекта ++.TP ++.I \-m, \-\-modify ++изменить запись указанного типа объекта ++.TP ++.I \-l, \-\-list ++вывести список записей указанного типа объекта ++.TP ++.I \-E, \-\-extract ++извлечь настраиваемые команды для использования в транзакции ++.TP ++.I \-D, \-\-deleteall ++удалить все локальные настройки ++.TP ++.I \-L LEVEL, \-\-level LEVEL ++уровень SELinux по умолчанию для пользователя SELinux, s0 (только для систем с поддержкой MLS/MCS) ++.TP ++.I \-r RANGE, \-\-range RANGE ++диапазон безопасности MLS/MCS (только для систем с поддержкой MLS/MCS). По умолчанию SELinux-диапазон для сопоставления имени входа SELinux принимает значение диапазона записи пользователя SELinux. По умолчанию SELinux-диапазон для пользователя SELinux принимает значение s0. ++.TP ++.I \-R [ROLES], \-\-roles [ROLES] ++роли SELinux. Если ролей несколько, их необходимо перечислить через пробелы и заключить этот перечень в кавычки. Или можно несколько раз указать \-R. ++ ++.SH ПРИМЕР ++.nf ++Вывести список пользователей SELinux ++# semanage user \-l ++Изменить группы для пользователя staff_u ++# semanage user \-m \-R "system_r unconfined_r staff_r" staff_u ++Добавить уровень для пользователей TopSecret ++# semanage user \-a \-R "staff_r" \-rs0\-TopSecret topsecret_u ++ ++.SH "СМОТРИТЕ ТАКЖЕ" ++.BR selinux (8), ++.BR semanage (8), ++.BR semanage\-login (8) ++ ++.SH "АВТОРЫ" ++Эта man-страница была написана Daniel Walsh . ++Перевод на русский язык выполнила Герасименко Олеся . +diff --git a/python/semanage/ru/semanage.8 b/python/semanage/ru/semanage.8 +new file mode 100644 +index 000000000000..f88568ee95bb +--- /dev/null ++++ b/python/semanage/ru/semanage.8 +@@ -0,0 +1,84 @@ ++.TH "semanage" "8" "20100223" "" "" ++.SH "ИМЯ" ++semanage \- средство управления политикой SELinux ++ ++.SH "ОБЗОР" ++.B semanage {import,export,login,user,port,interface,module,node,fcontext,boolean,permissive,dontaudit,ibpkey,ibendport} ++ ... ++.B позиционные аргументы: ++ ++.B import ++Импортировать локальные настройки ++ ++.B export ++Экспортировать локальные настройки ++ ++.B login ++Управлять сопоставлениями имён входа между пользователями Linux и ограниченными пользователями SELinux ++ ++.B user ++Управлять ограниченными пользователями SELinux (роли и уровни для пользователя SELinux) ++ ++.B port ++Управлять определениями типов сетевых портов ++ ++.B interface ++Управлять определениями типов сетевых интерфейсов ++ ++.B module ++Управлять модулями политики SELinux ++ ++.B node ++Управлять определениями типов сетевых узлов ++ ++.B fcontext ++Управлять определениями соответствий контекстов файлов ++ ++.B boolean ++Управлять логическими переключателями для избирательного включения функциональности ++ ++.B permissive ++Управлять режимом принудительного назначения типов процессов ++ ++.B dontaudit ++Отключить/Включить правила dontaudit в политике ++ ++.B ibpkey ++Управлять определениями типов ключей разделов infiniband ++ ++.B ibendport ++Управлять определениями типов конечных портов infiniband ++ ++.SH "ОПИСАНИЕ" ++semanage используется для настройки определённых элементов политики SELinux без необходимости изменения или перекомпиляции исходного текста политики. Это включает сопоставление имён пользователей Linux с пользователями SELinux (что управляет исходным контекстом безопасности, который присваивается пользователям Linux при их входе в систему, и ограничивает доступный им набор ролей). Также это включает сопоставление контекстов безопасности для различных видов объектов, таких как сетевые порты, интерфейсы, ключи разделов (pkeys) и конечные порты (endports) infiniband, сетевые узлы (хосты), а также сопоставление контекстов файлов. Обратите внимание, что при вызове команды semanage login пользователи Linux (logins) сопоставляются с пользователями SELinux, а при вызове команды semanage user пользователи SELinux сопоставляются с доступными наборами ролей. В большинстве случаев администратору требуется настроить только первый тип сопоставлений; второй тип сопоставлений определяется базовой политикой и обычно не требует изменения. ++ ++.SH "ПАРАМЕТРЫ" ++.TP ++.I \-h, \-\-help ++Вывести справочную информацию ++ ++.SH "СМОТРИТЕ ТАКЖЕ" ++.BR selinux (8), ++.BR semanage-boolean (8), ++.BR semanage-dontaudit (8), ++.BR semanage-export (8), ++.BR semanage-fcontext (8), ++.BR semanage-import (8), ++.BR semanage-interface (8), ++.BR semanage-login (8), ++.BR semanage-module (8), ++.BR semanage-node (8), ++.BR semanage-permissive (8), ++.BR semanage-port (8), ++.BR semanage-user (8) ++.BR semanage-ibkey (8), ++.BR semanage-ibendport (8), ++ ++.SH "АВТОРЫ" ++Эта man-страница была написана Daniel Walsh ++.br ++и Russell Coker . ++.br ++Примеры подготовлены Thomas Bleher . ++usage: semanage [\-h] ++Перевод на русский язык выполнила Герасименко Олеся . +-- +2.41.0 + diff --git a/SOURCES/0015-sandbox-Add-examples-to-man-pages.patch b/SOURCES/0015-sandbox-Add-examples-to-man-pages.patch deleted file mode 100644 index ba69beb..0000000 --- a/SOURCES/0015-sandbox-Add-examples-to-man-pages.patch +++ /dev/null @@ -1,129 +0,0 @@ -From 9366d1925db4e095a77125f03f3d1648f4c179f5 Mon Sep 17 00:00:00 2001 -From: Vit Mojzis -Date: Thu, 1 Jun 2023 16:39:13 +0200 -Subject: [PATCH] sandbox: Add examples to man pages -Content-type: text/plain - -While at it, remove trailing whitespaces. - -Signed-off-by: Vit Mojzis -Acked-by: Petr Lautrbach ---- - sandbox/sandbox.8 | 28 ++++++++++++++++++---------- - sandbox/seunshare.8 | 21 ++++++++++++++------- - 2 files changed, 32 insertions(+), 17 deletions(-) - -diff --git a/sandbox/sandbox.8 b/sandbox/sandbox.8 -index 775e4b231204..1c1870190e51 100644 ---- a/sandbox/sandbox.8 -+++ b/sandbox/sandbox.8 -@@ -11,12 +11,12 @@ sandbox \- Run cmd under an SELinux sandbox - .br - .SH DESCRIPTION - .PP --Run the --.I cmd -+Run the -+.I cmd - application within a tightly confined SELinux domain. The default sandbox domain only allows applications the ability to read and write stdin, stdout and any other file descriptors handed to it. It is not allowed to open any other files. The \-M option will mount an alternate homedir and tmpdir to be used by the sandbox. - --If you have the --.I policycoreutils-sandbox -+If you have the -+.I policycoreutils-sandbox - package installed, you can use the \-X option and the \-M option. - .B sandbox \-X - allows you to run X applications within a sandbox. These applications will start up their own X Server and create a temporary home directory and /tmp. The default SELinux policy does not allow any capabilities or network access. It also prevents all access to the users other processes and files. Files specified on the command that are in the home directory or /tmp will be copied into the sandbox directories. -@@ -78,27 +78,35 @@ Run a full desktop session, Requires level, and home and tmpdir. - Specifies the windowsize when creating an X based Sandbox. The default windowsize is 1000x700. - .TP - \fB\-W\fR \fB\-\-windowmanager\fR --Select alternative window manager to run within -+Select alternative window manager to run within - .B sandbox \-X. - Default to /usr/bin/matchbox-window-manager. - .TP --\fB\-X\fR -+\fB\-X\fR - Create an X based Sandbox for gui apps, temporary files for - $HOME and /tmp, secondary Xserver, defaults to sandbox_x_t - .TP - \fB\-d\fR \fB\-\-dpi\fR - Set the DPI value for the sandbox X Server. Defaults to the current X Sever DPI. - .TP --\fB\-C\fR \fB\-\-capabilities\fR Use capabilities within the --sandbox. By default applications executed within the sandbox will not --be allowed to use capabilities (setuid apps), with the \-C flag, you --can use programs requiring capabilities. -+\fB\-C\fR \fB\-\-capabilities\fR -+Use capabilities within the sandbox. By default applications executed within the sandbox will not be allowed to use capabilities (setuid apps), with the \-C flag, you can use programs requiring capabilities. - .PP - .SH "SEE ALSO" - .TP - runcon(1), seunshare(8), selinux(8) - .PP - -+.SH EXAMPLE -+.nf -+Run a graphical application inside the sandbox -+# sandbox -X evince -+Run a graphical application that requires the use of network -+# sandbox ‑X ‑t sandbox_web_t firefox -+Preserve data from one session to the next -+# mkdir -p ~/sandbox/home ~/sandbox/tmp -+# sandbox -H ~/sandbox/home -T ~/sandbox/tmp -X libreoffice --writer -+ - .SH AUTHOR - This manual page was written by - .I Dan Walsh -diff --git a/sandbox/seunshare.8 b/sandbox/seunshare.8 -index 09cf7feae45d..5339a3b1fb20 100644 ---- a/sandbox/seunshare.8 -+++ b/sandbox/seunshare.8 -@@ -9,29 +9,36 @@ seunshare \- Run cmd with alternate homedir, tmpdir and/or SELinux context - .PP - Run the - .I executable --within the specified context, using the alternate home directory and /tmp directory. The seunshare command unshares from the default namespace, then mounts the specified homedir and tmpdir over the default homedir and /tmp. Finally it tells the kernel to execute the application under the specified SELinux context. -+within the specified context, using custom home directory and /tmp directory. The seunshare command unshares from the default namespace, then mounts the specified homedir and tmpdir over the default homedir and /tmp. Finally it tells the kernel to execute the application under the specified SELinux context. - - .TP - \fB\-h homedir\fR --Alternate homedir to be used by the application. Homedir must be owned by the user. -+Alternate homedir to be used by the application. Homedir must be owned by the user - .TP - \fB\-t\ tmpdir --Use alternate temporary directory to mount on /tmp. tmpdir must be owned by the user. -+Use alternate temporary directory to mount on /tmp. tmpdir must be owned by the user - .TP - \fB\-r\ runuserdir --Use alternate temporary directory to mount on XDG_RUNTIME_DIR (/run/user/$UID). runuserdir must be owned by the user. -+Use alternate temporary directory to mount on XDG_RUNTIME_DIR (/run/user/$UID). runuserdir must be owned by the user - .TP - \fB\-C --capabilities\fR --Allow apps executed within the namespace to use capabilities. Default is no capabilities. -+Allow apps executed within the namespace to use capabilities. Default is no capabilities - .TP - \fB\-k --kill\fR --Kill all processes with matching MCS level. -+Kill all processes with matching MCS level - .TP - \fB\-Z\ context --Use alternate SELinux context while running the executable. -+Use alternate SELinux context while running the executable - .TP - \fB\-v\fR - Verbose output -+ -+.SH EXAMPLE -+.nf -+Run bash with temporary /home and /tmp directory -+# USERHOMEDIR=`mktemp -d /tmp/home.XXXXXX`; USERTEMPDIR=`mktemp -d /tmp/temp.XXXXXX` -+# seunshare -v -h ${USERHOMEDIR} -t ${USERTEMPDIR} -- /bin/bash -+ - .SH "SEE ALSO" - .TP - runcon(1), sandbox(8), selinux(8) --- -2.41.0 - diff --git a/SOURCES/0016-Revert-policycoreutils-Remove-the-Russian-translatio.patch b/SOURCES/0016-Revert-policycoreutils-Remove-the-Russian-translatio.patch new file mode 100644 index 0000000..039eab9 --- /dev/null +++ b/SOURCES/0016-Revert-policycoreutils-Remove-the-Russian-translatio.patch @@ -0,0 +1,1591 @@ +From e52ae9a0e65f472ce406bd87b5bbddf5b392bd23 Mon Sep 17 00:00:00 2001 +From: Petr Lautrbach +Date: Mon, 13 Nov 2023 13:37:53 +0100 +Subject: [PATCH] Revert "policycoreutils: Remove the Russian translations" +Content-type: text/plain + +This reverts commit 5c3312e0afb552dd87458dd396007ead6bd08fbe. +--- + policycoreutils/load_policy/ru/load_policy.8 | 41 ++++ + policycoreutils/man/ru/man5/selinux_config.5 | 136 +++++++++++ + policycoreutils/newrole/ru/newrole.1 | 109 +++++++++ + policycoreutils/run_init/ru/open_init_pty.8 | 42 ++++ + policycoreutils/run_init/ru/run_init.8 | 26 +++ + policycoreutils/scripts/ru/fixfiles.8 | 94 ++++++++ + policycoreutils/secon/ru/secon.1 | 120 ++++++++++ + policycoreutils/semodule/ru/genhomedircon.8 | 25 ++ + policycoreutils/semodule/ru/semodule.8 | 133 +++++++++++ + policycoreutils/sestatus/ru/sestatus.8 | 79 +++++++ + policycoreutils/sestatus/ru/sestatus.conf.5 | 97 ++++++++ + policycoreutils/setfiles/ru/restorecon.8 | 193 +++++++++++++++ + .../setfiles/ru/restorecon_xattr.8 | 115 +++++++++ + policycoreutils/setfiles/ru/setfiles.8 | 221 ++++++++++++++++++ + policycoreutils/setsebool/ru/setsebool.8 | 27 +++ + 15 files changed, 1458 insertions(+) + create mode 100644 policycoreutils/load_policy/ru/load_policy.8 + create mode 100644 policycoreutils/man/ru/man5/selinux_config.5 + create mode 100644 policycoreutils/newrole/ru/newrole.1 + create mode 100644 policycoreutils/run_init/ru/open_init_pty.8 + create mode 100644 policycoreutils/run_init/ru/run_init.8 + create mode 100644 policycoreutils/scripts/ru/fixfiles.8 + create mode 100644 policycoreutils/secon/ru/secon.1 + create mode 100644 policycoreutils/semodule/ru/genhomedircon.8 + create mode 100644 policycoreutils/semodule/ru/semodule.8 + create mode 100644 policycoreutils/sestatus/ru/sestatus.8 + create mode 100644 policycoreutils/sestatus/ru/sestatus.conf.5 + create mode 100644 policycoreutils/setfiles/ru/restorecon.8 + create mode 100644 policycoreutils/setfiles/ru/restorecon_xattr.8 + create mode 100644 policycoreutils/setfiles/ru/setfiles.8 + create mode 100644 policycoreutils/setsebool/ru/setsebool.8 + +diff --git a/policycoreutils/load_policy/ru/load_policy.8 b/policycoreutils/load_policy/ru/load_policy.8 +new file mode 100644 +index 000000000000..6c29e30a32a7 +--- /dev/null ++++ b/policycoreutils/load_policy/ru/load_policy.8 +@@ -0,0 +1,41 @@ ++.TH LOAD_POLICY "8" "Май 2003" "Security Enhanced Linux" ++.SH ИМЯ ++load_policy \- загрузить новую политику SELinux в ядро ++ ++.SH ОБЗОР ++.B load_policy ++[\-qi] ++.br ++.SH ОПИСАНИЕ ++.PP ++load_policy загружает установленный файл политики в ядро. ++Существующие значения логических переключателей политики автоматически сохраняются при перезагрузках политики, а не сбрасываются на установленные в файле политики значения по умолчанию. ++ ++.SH "ПАРАМЕТРЫ" ++.TP ++.B \-q ++Отменить предупредительные сообщения. ++.TP ++.B \-i ++Начальная загрузка политики. Следует использовать, только если политика загружается впервые с момента запуска (обычно вызывается из initramfs). ++ ++.SH "СОСТОЯНИЕ ВЫХОДА" ++.TP ++.B 0 ++Успешно ++.TP ++.B 1 ++Недействительный параметр ++.TP ++.B 2 ++Не удалось загрузить политику ++.TP ++.B 3 ++Не удалось выполнить начальную загрузку политики, запрошен принудительный режим ++.SH СМОТРИТЕ ТАКЖЕ ++.BR booleans (8) ++.SH АВТОРЫ ++.nf ++Эта страница руководства была написана Dan Walsh . ++Программа была написана Stephen Smalley . ++Перевод на русский язык выполнила Герасименко Олеся . +diff --git a/policycoreutils/man/ru/man5/selinux_config.5 b/policycoreutils/man/ru/man5/selinux_config.5 +new file mode 100644 +index 000000000000..8c0db9ae7a3e +--- /dev/null ++++ b/policycoreutils/man/ru/man5/selinux_config.5 +@@ -0,0 +1,136 @@ ++.TH "selinux_config" "5" "18 ноября 2011" "Security Enhanced Linux" "Файл конфигурации SELinux" ++ ++.SH "ИМЯ" ++config \- файл конфигурации подсистемы SELinux. ++ ++.SH "ОПИСАНИЕ" ++Файл \fIconfig\fR SELinux управляет состоянием SELinux, определяя: ++.RS ++.IP "1." 4 ++Состояние применения политики \- \fIenforcing\fR (принудительный режим), \fIpermissive\fR (разрешительный режим) или \fIdisabled\fR (отключена). ++.IP "2." 4 ++Имя политики или тип, формирующий путь к политике, которую следует загрузить, и её вспомогательным файлам конфигурации. ++.IP "3." 4 ++Способ управления локальными пользователями и логическими переключателями после загрузки политики (обратите внимание, что эта возможность использовалась в предыдущих версиях SELinux, сейчас она устарела). ++.IP "4." 4 ++Поведение поддерживающих SELinux приложений при отсутствии настроенных действительных пользователей SELinux. ++.IP "5." 4 ++Следует ли повторно проставлять метки в системе. ++.RE ++ ++Описание записей, которые управляют этими возможностями, приводится в разделе \fBФОРМАТ ФАЙЛА\fR. ++.sp ++Полный путь к файлу конфигурации SELinux: \fI/etc/selinux/config\fR. ++.sp ++Если файл \fIconfig\fR отсутствует или повреждён, политика SELinux не будет загружена (то есть SELinux будет отключён). ++.sp ++Команда \fBsestatus\fR (8) и функция libselinux \fBselinux_path\fR (3) возвращают расположение файла \fIconfig\fR. ++ ++.SH "ФОРМАТ ФАЙЛА" ++Файл \fIconfig\fR поддерживает следующие параметры: ++.sp ++.RS ++\fBSELINUX = \fIenforcing\fR | \fIpermissive\fR | \fIdisabled\fR ++.br ++\fBSELINUXTYPE = \fIpolicy_name\fR ++.br ++\fBREQUIRESEUSERS = \fI0\fR | \fI1\fR ++.br ++\fBAUTORELABEL = \fI0\fR | \fI1\fR ++.RE ++.sp ++Где: ++.br ++.B SELINUX ++.RS ++Эта запись может содержать одно из трёх значений: ++.RS ++.IP \fIenforcing\fR 4 ++Политика безопасности SELinux применяется. ++.IP \fIpermissive\fR 4 ++Политика безопасности SELinux не применяется, но ведётся журналирование предупреждений (то есть действиям разрешено продолжать выполняться). ++.IP \fIdisabled\fR ++SELinux отключён, политика не загружена. ++.RE ++.sp ++Значение записи можно узнать с помощью команды \fBsestatus\fR(8) или \fBselinux_getenforcemode\fR(3). ++.RE ++.sp ++.B SELINUXTYPE ++.RS ++Запись \fIpolicy_name\fR используется для идентификации типа политики и становится именем каталога, в котором располагаются политика и её файлы конфигурации. ++.sp ++Значение записи можно узнать с помощью команды \fBsestatus\fR(8) или \fBselinux_getpolicytype\fR(3). ++.sp ++\fIpolicy_name\fR относится к пути, который определён внутри подсистемы SELinux и может быть получен с помощью \fBselinux_path\fR(3). Пример записи, полученной с помощью \fBselinux_path\fR(3): ++.br ++.RS ++.I /etc/selinux/ ++.RE ++.sp ++Затем к концу этой записи добавляется \fIpolicy_name\fR, и она становится корневым расположением политики, которое может быть получено с помощью \fBselinux_policy_root_path\fR(3). Пример полученной записи: ++.RS ++.I /etc/selinux/targeted ++.RE ++.sp ++Фактическая двоичная политика расположена относительно этого каталога и также имеет предварительно выделенное имя политики. Эту информацию можно получить с помощью \fBselinux_binary_policy_path\fR(3). Пример записи, полученной с помощью \fBselinux_binary_policy_path\fR(3): ++.br ++.RS ++.I /etc/selinux/targeted/policy/policy ++.RE ++.sp ++По соглашению к концу имени двоичной политики добавляется версия политики SELinux, которую она поддерживает. Максимальную версию политики, поддерживаемую ядром, можно определить с помощью команды \fBsestatus\fR(8) или \fBsecurity_policyvers\fR(3). Пример файла двоичной политики с версией: ++.br ++.RS ++.I /etc/selinux/targeted/policy/policy.24 ++.RE ++.RE ++.sp ++.B REQUIRESEUSERS ++.RS ++Эта необязательная запись позволяет сделать попытку входа неудачной, если в файле ++.BR seusers "(5) нет соответствующей записи или записи по умолчанию или отсутствует сам файл " seusers ". " ++.sp ++Она проверяется функцией \fBgetseuserbyname\fR(3), которая вызывается поддерживающими SELinux приложениями для входа, например, \fBPAM\fR(8). ++.sp ++Если задано значение \fI0\fR или отсутствует запись: ++.RS ++.BR getseuserbyname "(3) вернёт имя пользователя GNU / Linux в качестве пользователя SELinux." ++.RE ++.sp ++Если задано значение \fI1\fR: ++.RS ++.BR getseuserbyname "(3) не удастся выполнить." ++.RE ++.sp ++Описание работы \fBgetseuserbyname\fR(3) содержится на соответствующей man-странице. Формат файла \fIseusers\fR показан в \fBseusers\fR(5). ++.sp ++.RE ++.sp ++.B AUTORELABEL ++.RS ++Эта необязательная запись позволяет повторно проставлять метки в файловой системе. ++.sp ++Если задано значение \fI0\fR и в корневом каталоге имеется файл с именем \fI.autorelabel\fR, при перезагрузке загрузчик перейдёт в оболочку, запрашивающую вход в качестве пользователя root. Затем администратор сможет вручную проставить метки в файловой системе. ++.sp ++Если задано значение \fI1\fR или запись отсутствует (состояние по умолчанию) и в корневом каталоге имеется файл \fI.autorelabel\fR, в файловой системе с помощью \fBfixfiles \-F restore\fR будут автоматически повторно проставлены метки. ++.sp ++В обоих случаях файл \fI/.autorelabel\fR будет удалён, чтобы предотвратить последующее повторное проставление меток. ++.RE ++.sp ++ ++.SH "ПРИМЕР" ++В этом примере показано минимальное содержимое файла \fIconfig\fR, которое обеспечит запуск SELinux в системе в принудительном режиме, со значением \fIpolicy_name\fR 'targeted': ++.sp ++.RS ++SELINUX = enforcing ++.br ++SELINUXTYPE = targeted ++.RE ++ ++.SH "СМОТРИТЕ ТАКЖЕ" ++.BR selinux "(8), " sestatus "(8), " selinux_path "(3), " selinux_policy_root_path "(3), " selinux_binary_policy_path "(3), " getseuserbyname "(3), " PAM "(8), " fixfiles "(8), " selinux_mkload_policy "(3), " selinux_getpolicytype "(3), " security_policyvers "(3), " selinux_getenforcemode "(3), " seusers "(5) " ++ ++ ++.SH АВТОРЫ ++Перевод на русский язык выполнила Герасименко Олеся . +diff --git a/policycoreutils/newrole/ru/newrole.1 b/policycoreutils/newrole/ru/newrole.1 +new file mode 100644 +index 000000000000..6d9c6dd04356 +--- /dev/null ++++ b/policycoreutils/newrole/ru/newrole.1 +@@ -0,0 +1,109 @@ ++.TH NEWROLE "1" "Октябрь 2000" "Security Enhanced Linux" ++.SH ИМЯ ++newrole \- запустить оболочку с новой ролью SELinux ++.SH ОБЗОР ++.B newrole ++[\fB-r\fR|\fB--role\fR] ++\fIROLE\fR ++[\fB-t\fR|\fB--type\fR] ++\fITYPE\fR ++[\fB-l\fR|\fB--level\fR] ++[\fB-p\fR|\fB--preserve-environment\fR] ++\fILEVEL\fR [-- [\fIARGS\fR]...] ++.SH ОПИСАНИЕ ++.PP ++Запустить новую оболочку в новом контексте. Новый контекст берётся из старого контекста, в котором изначально исполнялась ++.B newrole. ++Если указан параметр ++.B -r ++или ++.B --role ++, новый контекст будет иметь роль, заданную ++\fIROLE\fR. ++Если указан параметр ++.B -t ++или ++.B --type ++, новый контекст будет иметь тип (домен), заданный ++\fITYPE\fR. ++Если указана роль, но не указан тип, тип по умолчанию берётся из указанной роли. Если указан параметр ++.B -l ++или ++.B --level ++, новый контекст будет иметь уровень конфиденциальности, заданный ++\fILEVEL\fR. ++Если ++\fILEVEL\fR ++является диапазоном, новый контекст будет иметь уровень конфиденциальности и допуск, заданные этим диапазоном. Если указан параметр ++.B -p ++или ++.B --preserve-environment ++, оболочка с новым контекстом SELinux сохранит переменные среды, в ином случае будет создана новая минимальная среда. ++.PP ++Дополнительные аргументы ++.I ARGS ++могут присутствовать после параметра --, ++в этом случае они передаются в новую оболочку. ++В частности, при использовании аргумента \-\- \-c следующий аргумент будет обрабатываться как команда большинством интерпретаторов команд. ++.PP ++Если для newrole указан аргумент команды и имя команды найдено в /etc/selinux/newrole_pam.conf, будет использована служба pam, указанная в этом файле для команды, а не обычная конфигурация pam для newrole. Это позволяет устанавливать конфигурацию pam для каждой команды при вызове через newrole, например, чтобы пропустить этап интерактивной повторной аутентификации. ++.PP ++Новой оболочкой будет оболочка, указанная в записи пользователя в файле ++.I /etc/passwd. ++.PP ++.B -V ++или ++.B --version ++показывает текущую версию newrole ++.PP ++.SH ПРИМЕР ++.br ++Смена роли: ++ # id \-Z ++ staff_u:staff_r:staff_t:SystemLow-SystemHigh ++ # newrole \-r sysadm_r ++ # id \-Z ++ staff_u:sysadm_r:sysadm_t:SystemLow-SystemHigh ++ ++Смена только уровня конфиденциальности: ++ # id \-Z ++ staff_u:sysadm_r:sysadm_t:Unclassified-SystemHigh ++ # newrole \-l Secret ++ # id \-Z ++ staff_u:sysadm_r:sysadm_t:Secret-SystemHigh ++ ++.PP ++Смена уровня конфиденциальности и допуска: ++ # id \-Z ++ staff_u:sysadm_r:sysadm_t:Unclassified-SystemHigh ++ # newrole \-l Secret-Secret ++ # id \-Z ++ staff_u:sysadm_r:sysadm_t:Secret ++ ++.PP ++Запуск программы с указанной ролью или уровнем: ++ # newrole \-r sysadm_r \-\- \-c "/path/to/app arg1 arg2..." ++ # newrole \-l Secret \-\- \-c "/path/to/app arg1 arg2..." ++ ++.SH ФАЙЛЫ ++/etc/passwd - информация об учётных записях пользователей ++.br ++/etc/shadow - зашифрованные пароли и информация об устаревании паролей ++.br ++/etc/selinux//contexts/default_type - типы по умолчанию для ролей ++.br ++/etc/selinux//contexts/securetty_types - типы securetty для изменений уровня ++.br ++/etc/selinux/newrole_pam.conf - необязательное сопоставление команд с отдельными службами pam ++.br ++.SH СМОТРИТЕ ТАКЖЕ ++.BR runcon (1) ++.SH АВТОРЫ ++.nf ++Anthony Colatrella ++Tim Fraser ++Steve Grubb ++Darrel Goeddel ++Michael Thompson ++Dan Walsh ++Перевод на русский язык выполнила Герасименко Олеся +diff --git a/policycoreutils/run_init/ru/open_init_pty.8 b/policycoreutils/run_init/ru/open_init_pty.8 +new file mode 100644 +index 000000000000..143941e174d0 +--- /dev/null ++++ b/policycoreutils/run_init/ru/open_init_pty.8 +@@ -0,0 +1,42 @@ ++.\" Hey, Emacs! This is an -*- nroff -*- source file. ++.\" Copyright (c) 2005 Manoj Srivastava ++.\" ++.\" This is free documentation; you can redistribute it and/or ++.\" modify it under the terms of the GNU General Public License as ++.\" published by the Free Software Foundation; either version 2 of ++.\" the License, or (at your option) any later version. ++.\" ++.\" The GNU General Public License's references to "object code" ++.\" and "executables" are to be interpreted as the output of any ++.\" document formatting or typesetting system, including ++.\" intermediate and printed output. ++.\" ++.\" This manual is distributed in the hope that it will be useful, ++.\" but WITHOUT ANY WARRANTY; without even the implied warranty of ++.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++.\" GNU General Public License for more details. ++.\" ++.\" You should have received a copy of the GNU General Public ++.\" License along with this manual; if not, write to the Free ++.\" Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, ++.\" USA. ++.\" ++.\" ++.TH OPEN_INIT_PTY "8" "Январь 2005" "Security Enhanced Linux" ++.SH ИМЯ ++open_init_pty \- запустить программу под псевдотерминалом ++.SH ОБЗОР ++.B open_init_pty ++\fISCRIPT\fR [[\fIARGS\fR]...] ++.br ++.SH ОПИСАНИЕ ++.PP ++Запуск программы под псевдотерминалом. Эта возможность используется ++.B run_init ++для фактического запуска программы после настройки подходящего контекста. Эта программа получает новый псевдотерминал, ответвляет дочерний процесс, который привязывается к псевдотерминалу, а затем соединяет физический терминал, на котором она была вызвана, с псевдотерминалом, передавая ввод клавиатуры в дочерний процесс и передавая вывод дочернего процесса физическому терминалу. ++.PP ++Она надлежащим образом настраивает псевдотерминал на основе атрибутов физического терминала, а затем устанавливает терминал пользователя в режим RAW (при выходе этот режим сбрасывается). ++.SH АВТОРЫ ++Эта страница руководства была написана Manoj Srivastava ++для системы Debian GNU/Linux. ++Перевод на русский язык выполнила Герасименко Олеся . +diff --git a/policycoreutils/run_init/ru/run_init.8 b/policycoreutils/run_init/ru/run_init.8 +new file mode 100644 +index 000000000000..26b767ce5f72 +--- /dev/null ++++ b/policycoreutils/run_init/ru/run_init.8 +@@ -0,0 +1,26 @@ ++.TH RUN_INIT "8" "Май 2003" "Security Enhanced Linux" ++.SH ИМЯ ++run_init \- запустить сценарий init в правильном контексте SELinux ++.SH ОБЗОР ++.B run_init ++\fISCRIPT\fR [[\fIARGS\fR]...] ++.br ++.SH ОПИСАНИЕ ++.PP ++Запуск сценария init в правильном контексте, который указан в ++/etc/selinux/POLICYTYPE/contexts/initrc_context. ++Обычно эта возможность используется интерактивно, так как она требует аутентификации shadow или пользователя PAM (в зависимости от параметров при компиляции). PAM можно настроить таким образом, что интерактивный ввод не потребуется. Обратитесь к документации по PAM. ++.SH ФАЙЛЫ ++/etc/passwd - информация об учётных записях пользователей ++.br ++/etc/shadow - зашифрованные пароли и информация об устаревании паролей ++.br ++/etc/selinux/POLICYTYPE/contexts/initrc_context - содержит контекст для запуска сценариев init ++.SH СМОТРИТЕ ТАКЖЕ ++.BR newrole (1), ++.BR runcon (1) ++.SH АВТОРЫ ++.nf ++Wayne Salamon (wsalamon@tislabs.com) ++Dan Walsh (dwalsh@redhat.com) ++Перевод на русский язык выполнила Герасименко Олеся +diff --git a/policycoreutils/scripts/ru/fixfiles.8 b/policycoreutils/scripts/ru/fixfiles.8 +new file mode 100644 +index 000000000000..13829441a1ab +--- /dev/null ++++ b/policycoreutils/scripts/ru/fixfiles.8 +@@ -0,0 +1,94 @@ ++.TH "fixfiles" "8" "2002031409" "" "" ++.SH "ИМЯ" ++fixfiles \- исправить SELinux-контексты безопасности файлов. ++ ++.SH "ОБЗОР" ++.na ++ ++.B fixfiles ++.I [\-v] [\-F] [\-f] relabel ++ ++.B fixfiles ++.I [\-v] [\-F] { check | restore | verify } dir/file ... ++ ++.B fixfiles ++.I [\-v] [\-F] [\-B | \-N time ] { check | restore | verify } ++ ++.B fixfiles ++.I [\-v] [\-F] \-R rpmpackagename[,rpmpackagename...] { check | restore | verify } ++ ++.B fixfiles ++.I [\-v] [\-F] \-C PREVIOUS_FILECONTEXT { check | restore | verify } ++ ++.B fixfiles ++.I [-F] [-B] onboot ++ ++.ad ++ ++.SH "ОПИСАНИЕ" ++На этой странице руководства приводится описание сценария ++.BR fixfiles. ++.P ++Этот сценарий в основном используется для исправления базы данных контекстов безопасности (расширенных атрибутов) в файловых системах. ++.P ++Его также можно запустить в любой момент, чтобы повторно проставить метки при добавлении поддержки новой политики или просто проверить, соответствуют ли контексты файлов ожиданиям пользователя. По умолчанию он повторно проставит метки во всех смонтированных файловых системах ext2, ext3, xfs и ++jfs, даже если у них нет параметра монтирования с контекстом безопасности. Флаг \-R позволяет использовать rpm-пакеты в качестве альтернативы. ++Файл etc/selinux/fixfiles_exclude_dirs может содержать список каталогов, исключённых из повторного проставления меток. ++.P ++.B fixfiles onboot ++При следующей перезагрузке компьютера метки будет проставлены повторно. ++ ++.SH "ПАРАМЕТРЫ" ++.TP ++.B \-B ++При использовании с onboot сценарий fixfiles запишет текущую дату в файл /.autorelabel, чтобы потом её можно было использовать для ускорения проставления меток. При использовании с restore будут затронуты только те файлы, которые были изменены сегодня. ++.TP ++.B \-F ++Принудительно сбросить контекст, чтобы он соответствовал file_context для настраиваемых файлов. ++ ++.TP ++.B \-f ++Очистить каталог /tmp, не запрашивая подтверждение удаления у пользователя. ++ ++.TP ++.B \-R rpmpackagename[,rpmpackagename...] ++Использовать базу данных rpm, чтобы найти все файлы в указанных пакетах и восстановить их контексты. ++.TP ++.B \-C PREVIOUS_FILECONTEXT ++Выполнить diff, чтобы сравнить файл PREVIOUS_FILECONTEXT с текущим установленным файлом, и восстановить контекст всех затронутых файлов. ++ ++.TP ++.B \-N time ++Применять изменения только к файлам, созданным после указанной даты. Дата должна быть указана в формате "ГГГГ\-ММ\-ДД ЧЧ:ММ". Поле даты будет передано в команду find \-\-newermt. ++ ++.TP ++.B -v ++Изменить уровень детализации с показа хода выполнения на показ подробных сведений. (Запуск restorecon с \-v вместо \-p.) ++ ++.SH "АРГУМЕНТЫ" ++Одно из: ++.TP ++.B check ++Вывести все некорректные метки контекста файлов, показывая старый и новый контекст, но не изменяя его. ++.TP ++.B restore ++Изменить все некорректные метки контекста файлов. ++.TP ++.B relabel ++Запросить у пользователя подтверждение удаления содержимого каталога /tmp и затем изменить все некорректные метки контекста файлов, чтобы привести их в соответствие с файлом file_contexts. ++.TP ++.B verify ++Вывести список файлов с некорректными метками контекста, но не изменять их. ++.TP ++.B [[dir/file] ... ] ++Список файлов или каталогов, для которых следует проверить контекст. ++ ++.SH "СМОТРИТЕ ТАКЖЕ" ++.BR setfiles (8), ++.BR restorecon (8) ++ ++.SH "АВТОРЫ" ++Эта man-страница была написана Richard Hally . ++Сценарий был написан Dan Walsh . ++Перевод на русский язык выполнила Герасименко Олеся . ++ +diff --git a/policycoreutils/secon/ru/secon.1 b/policycoreutils/secon/ru/secon.1 +new file mode 100644 +index 000000000000..3c9aa535848b +--- /dev/null ++++ b/policycoreutils/secon/ru/secon.1 +@@ -0,0 +1,120 @@ ++.TH SECON "1" "Апрель 2006" "Security Enhanced Linux" ++.SH ИМЯ ++secon \- показать контекст SELinux для файла, программы или ввода пользователя. ++.SH ОБЗОР ++.B secon ++[\fB-hVurtscmPRfLp\fR] ++[\fICONTEXT\fR] ++.br ++[\fB--file\fR] ++\fIFILE\fR ++.br ++[\fB--link\fR] ++\fIFILE\fR ++.br ++[\fB--pid\fR] ++\fIPID\fR ++.SH ОПИСАНИЕ ++.PP ++Просмотр части контекста. Контекст берётся из файла, идентификатора процесса, ввода пользователя или контекста, в котором была изначально запущена команда ++.B secon. ++.TP ++\fB\-V\fR, \fB\-\-version\fR ++показать текущую версию secon ++.TP ++\fB\-h\fR, \fB\-\-help\fR ++показать сведения об использовании secon ++.TP ++\fB\-P\fR, \fB\-\-prompt\fR ++вывести данные в формате, подходящем для запроса ++.TP ++\fB\-C\fR, \fB\-\-color\fR ++вывести данные с назначенными цветовыми кодами ANSI (требуется \-P) ++.TP ++\fB\-u\fR, \fB\-\-user\fR ++показать пользователя контекста безопасности ++.TP ++\fB\-r\fR, \fB\-\-role\fR ++показать роль контекста безопасности ++.TP ++\fB\-t\fR, \fB\-\-type\fR ++показать тип контекста безопасности ++.TP ++\fB\-s\fR, \fB\-\-sensitivity\fR ++показать уровень конфиденциальности контекста безопасности ++.TP ++\fB\-c\fR, \fB\-\-clearance\fR ++показать уровень допуска контекста безопасности ++.TP ++\fB\-m\fR, \fB\-\-mls-range\fR ++показать для контекста безопасности в виде диапазона уровень конфиденциальности и уровень допуска ++.TP ++\fB\-R\fR, \fB\-\-raw\fR ++вывести уровень конфиденциальности и уровень допуска в непреобразованном формате ++.TP ++\fB\-f\fR, \fB\-\-file\fR ++получить контекст из указанного файла FILE ++.TP ++\fB\-L\fR, \fB\-\-link\fR ++получить контекст из указанного файла FILE (не выполнять переход по символическим ссылкам) ++.TP ++\fB\-p\fR, \fB\-\-pid\fR ++получить контекст из указанного идентификатора процесса PID ++.TP ++\fB\-\-pid\-exec\fR ++получить контекст exec из указанного идентификатора процесса PID ++.TP ++\fB\-\-pid\-fs\fR ++получить контекст fscreate из указанного идентификатора процесса PID ++.TP ++\fB\-\-pid\-key\fR ++получить контекст key из указанного идентификатора процесса PID ++.TP ++\fB\-\-current\fR, \fB\-\-self\fR ++получить контекст из текущего процесса ++.TP ++\fB\-\-current\-exec\fR, \fB\-\-self\-exec\fR ++получить контекст exec из текущего процесса ++.TP ++\fB\-\-current\-fs\fR, \fB\-\-self\-fs\fR ++получить контекст fscreate из текущего процесса ++.TP ++\fB\-\-current\-key\fR, \fB\-\-self\-key\fR ++получить контекст key из текущего процесса ++.TP ++\fB\-\-parent\fR ++получить контекст из родителя текущего процесса ++.TP ++\fB\-\-parent\-exec\fR ++получить контекст exec из родителя текущего процесса ++.TP ++\fB\-\-parent\-fs\fR ++получить контекст fscreate из родителя текущего процесса ++.TP ++\fB\-\-parent\-key\fR ++получить контекст key из родителя текущего процесса ++.PP ++Можно предоставить дополнительный аргумент ++.I CONTEXT ++- он будет использоваться, если не заданы параметры, согласно которым ++.B secon ++получает контекст из другого источника. ++Если этим аргументом является ++.I - ++(знак дефиса), контекст будет прочтён из stdin. ++.br ++Если аргумент отсутствует, ++.B secon ++попытается прочитать контекст из stdin, если это не tty; в ином случае ++.B secon ++будет действовать так, как если бы был передан параметр \fB\-\-self\fR. ++.PP ++Если не передан ни один из параметров \fB\-\-user\fR, \fB\-\-role\fR, \fB\-\-type\fR, \fB\-\-level\fR или ++\fB\-\-mls\-range\fR, будут выведены все они. ++.PP ++.SH СМОТРИТЕ ТАКЖЕ ++.BR chcon (1) ++.SH АВТОРЫ ++.nf ++James Antill (james.antill@redhat.com). ++Перевод на русский язык выполнила Герасименко Олеся . +diff --git a/policycoreutils/semodule/ru/genhomedircon.8 b/policycoreutils/semodule/ru/genhomedircon.8 +new file mode 100644 +index 000000000000..dbf27bcc8f15 +--- /dev/null ++++ b/policycoreutils/semodule/ru/genhomedircon.8 +@@ -0,0 +1,25 @@ ++.TH GENHOMEDIRCON "8" "Сентябрь 2011" "Security Enhanced Linux" "SELinux" ++.SH ИМЯ ++genhomedircon \- создать записи конфигурации контекста файлов SELinux для домашних каталогов пользователей ++.SH ОПИСАНИЕ ++.B genhomedircon ++- сценарий, который исполняет ++.B semodule ++для пересборки текущей активной политики SELinux (без её перезагрузки) и создания меток для домашних каталогов пользователей на основе путей к каталогам, возвращённых вызовами функции getpwent(). ++ ++Последняя возможность будет работать, если для параметра "usepasswd" установлено значение "true" (по умолчанию) ++в /etc/selinux/semanage.conf. ++ ++Этот сценарий обычно исполняется ++.B semanage, ++хотя это поведение по умолчанию можно изменить, установив для "disable-genhomedircon" значение "true" ++в /etc/selinux/semanage.conf. ++ ++.SH "СМОТРИТЕ ТАКЖЕ" ++semanage.conf(5), semodule(8), semanage(8), getpwent(3), getpwent_r(3) ++ ++.SH АВТОРЫ ++Эта страница руководства была написана ++.I Dan Walsh . ++Перевод на русский язык выполнила ++.I Герасименко Олеся . +diff --git a/policycoreutils/semodule/ru/semodule.8 b/policycoreutils/semodule/ru/semodule.8 +new file mode 100644 +index 000000000000..d7ff9b567702 +--- /dev/null ++++ b/policycoreutils/semodule/ru/semodule.8 +@@ -0,0 +1,133 @@ ++.TH SEMODULE "8" "Ноябрь 2005" "Security Enhanced Linux" ++.SH ИМЯ ++semodule \- управление модулями политики SELinux. ++ ++.SH ОБЗОР ++.B semodule [option]... MODE... ++.br ++.SH ОПИСАНИЕ ++.PP ++semodule - это утилита, которая используется для управления модулями политики SELinux, включая установку, обновление, вывод списка и удаление модулей. semodule также можно использовать для принудительной пересборки политики из хранилища модулей и/или для принудительной перезагрузки политики без выполнения других транзакций. semodule применяется к пакетам модулей, созданным с помощью semodule_package. По соглашению эти файлы имеют суффикс .pp (пакет политики), хотя это никак не регламентируется. ++ ++.SH "MODES" ++.TP ++.B \-R, \-\-reload ++принудительно перезагрузить политику ++.TP ++.B \-B, \-\-build ++принудительно пересобрать политику (также выполнит перезагрузку, если не используется \-n) ++.TP ++.B \-D, \-\-disable_dontaudit ++временно удалить правила dontaudit из политики (изменения отменяются при пересборке политики) ++.TP ++.B \-i,\-\-install=MODULE_PKG ++установить/заменить пакет модуля ++.TP ++.B \-u,\-\-upgrade=MODULE_PKG ++устарел, псевдоним для --install ++.TP ++.B \-b,\-\-base=MODULE_PKG ++устарел, псевдоним для --install ++.TP ++.B \-r,\-\-remove=MODULE_NAME ++удалить существующий модуль с указанным приоритетом (по умолчанию: -X 400) ++.TP ++.B \-l[KIND],\-\-list-modules[=KIND] ++вывести список установленных модулей (отличных от базовых) ++.TP ++.B KIND: ++.TP ++standard ++вывести модули с высшим приоритетом, включённые, небазовые ++.TP ++full ++вывести все модули ++.TP ++.B \-X,\-\-priority=PRIORITY ++установить приоритет для следующих операций (1-999) ++.TP ++.B \-e,\-\-enable=MODULE_NAME ++включить модуль ++.TP ++.B \-d,\-\-disable=MODULE_NAME ++отключить модуль ++.TP ++.B \-E,\-\-extract=MODULE_PKG ++извлечь модуль из хранилища в текущий каталог как файл HLL или CIL. ++По умолчанию модуль извлекается как файл HLL. Имя записываемого модуля - . ++.SH "ПАРАМЕТРЫ" ++.TP ++.B \-s,\-\-store ++имя хранилища, над которым следует выполнить операцию ++.TP ++.B \-n,\-\-noreload,\-N ++не перезагружать политику после фиксации ++.TP ++.B \-h,\-\-help ++вывести справочное сообщение и выйти ++.TP ++.B \-P,\-\-preserve_tunables ++сохранить настраиваемые параметры в политике ++.TP ++.B \-C,\-\-ignore-module-cache ++перекомпилировать модули CIL, собранные из файлов HLL ++.TP ++.B \-p,\-\-path ++использовать альтернативный путь для корневого расположения политики ++.TP ++.B \-S,\-\-store-path ++использовать альтернативный путь для корневого расположения хранилища политики ++.TP ++.B \-v,\-\-verbose ++подробно ++.TP ++.B \-c,\-\-cil ++извлечь модуль как файл CIL. Это влияет только на параметр \-\-extract и модули, перечисленные в \-\-extract после этого параметра. ++.TP ++.B \-H,\-\-hll ++извлечь модуль как файл HLL. Это влияет только на параметр \-\-extract и модули, перечисленные в \-\-extract после этого параметра. ++ ++.SH ПРИМЕР ++.nf ++# Установить или заменить базовый пакет политики. ++$ semodule \-b base.pp ++# Установить или заменить небазовый пакет политики. ++$ semodule \-i httpd.pp ++# Установить или заменить все небазовые модули в текущем каталоге. ++# Этот синтаксис можно использовать с -i/u/r/E, но после имён модулей нельзя вводить какие-либо другие параметры. ++$ semodule \-i *.pp ++# Установить или заменить все модули в текущем каталоге. ++$ ls *.pp | grep \-Ev "base.pp|enableaudit.pp" | xargs /usr/sbin/semodule \-b base.pp \-i ++# Вывести список небазовых модулей. ++$ semodule \-l ++# Вывести список всех модулей, включая их приоритет. ++$ semodule \-lfull ++# Удалить модуль с приоритетом 100. ++$ semodule \-X 100 \-r wireshark ++# Включить все сообщения кэша вектора доступа (AVC), для которых SELinux сейчас использует правила "dontaudit". ++$ semodule \-DB ++# Включить правила "dontaudit" обратно. ++$ semodule \-B ++# Отключить модуль (будут отключены все экземпляры данного модуля независимо от их приоритета). ++$ semodule \-d alsa ++# Установить модуль с указанным приоритетом. ++$ semodule \-X 100 \-i alsa.pp ++# Вывести список всех модулей. ++$ semodule \-\-list=full ++# Установить альтернативный путь для корневого расположения политики. ++$ semodule \-B \-p "/tmp" ++# Установить альтернативный путь для корневого расположения хранилища политики. ++$ semodule \-B \-S "/tmp/var/lib/selinux" ++# Записать HLL-версию модуля puppet и CIL-версию модуля wireshark ++# с приоритетом 400 в текущий рабочий каталог ++$ semodule \-X 400 \-\-hll \-E puppet \-\-cil \-E wireshark ++.fi ++ ++.SH СМОТРИТЕ ТАКЖЕ ++.BR checkmodule (8), ++.BR semodule_package (8) ++.SH АВТОРЫ ++.nf ++Эта страница руководства была написана Dan Walsh . ++Программа была написана Karl MacMillan , Joshua Brindle , Jason Tang . ++Перевод на русский язык выполнила Герасименко Олеся +diff --git a/policycoreutils/sestatus/ru/sestatus.8 b/policycoreutils/sestatus/ru/sestatus.8 +new file mode 100644 +index 000000000000..56fcd23e27a9 +--- /dev/null ++++ b/policycoreutils/sestatus/ru/sestatus.8 +@@ -0,0 +1,79 @@ ++.TH "sestatus" "8" "26 ноября 2011" "Security Enhanced Linux" "Документация по командной строке SELinux" ++.SH "ИМЯ" ++sestatus \- утилита для просмотра состояния SELinux ++ ++.SH "ОБЗОР" ++.B sestatus ++.I [\-v] [\-b] ++.P ++Эта утилита используется для получения состояния системы, в которой работает SELinux. ++ ++.SH "ОПИСАНИЕ" ++Эта страница руководства содержит описание программы ++.BR sestatus. ++.sp ++Эта утилита используется для получения состояния системы, в которой работает SELinux. Она показывает сведения о том, включён или отключён SELinux, расположение ключевых каталогов, а также загруженную политику и её состояние. Пример: ++.RS ++> sestatus ++.br ++SELinux status: enabled ++.br ++SELinuxfs mount: /selinux ++.br ++SELinux root directory: /etc/selinux ++.br ++Loaded policy name: targeted ++.br ++Current mode: permissive ++.br ++Mode from config file: enforcing ++.br ++Policy MLS status: enabled ++.br ++Policy deny_unknown status: allow ++.br ++Memory protection checking: actual (secure) ++.br ++Max kernel policy version: 26 ++.RE ++.sp ++\fBsestatus\fR также можно использовать, чтобы просмотреть: ++.RS ++.IP "-" 4 ++Контексты безопасности файлов и процессов, перечисленные в файле \fI/etc/sestatus.conf\fR. Описание формата этого файла содержится в \fBsestatus.conf\fR(5). ++.IP "-" 4 ++Состояние логических переключателей. ++.RE ++ ++.SH "ПАРАМЕТРЫ" ++.B \-v ++.RS ++Показать контексты файлов и процессов, перечисленные в файле \fI/etc/sestatus.conf\fR. Также проверяет, является ли файл символической ссылкой (если является, то также будет показан контекст целевого файла). ++.sp ++Всегда будут показаны следующие контексты: ++.RS ++Контекст текущего процесса ++.br ++Контекст процесса init ++.br ++Контекст файла управляющего терминала ++.RE ++.RE ++.sp ++.B \-b ++.RS ++Показать текущее состояние логических переключателей. ++.RE ++ ++.SH "ФАЙЛЫ" ++.I /etc/sestatus.conf ++ ++.SH "СМОТРИТЕ ТАКЖЕ" ++.BR selinux "(8), " sestatus.conf "(5) ++ ++.SH "АВТОРЫ" ++Эта страница руководства была написана Daniel Walsh . ++.br ++Программа была написана Chris PeBenito . ++.br ++Перевод на русский язык выполнила Герасименко Олеся . +diff --git a/policycoreutils/sestatus/ru/sestatus.conf.5 b/policycoreutils/sestatus/ru/sestatus.conf.5 +new file mode 100644 +index 000000000000..60ebeab96b43 +--- /dev/null ++++ b/policycoreutils/sestatus/ru/sestatus.conf.5 +@@ -0,0 +1,97 @@ ++.TH "sestatus.conf" "5" "26 ноября 2011" "Security Enhanced Linux" "Файл конфигурации sestatus" ++ ++.SH "ИМЯ" ++sestatus.conf \- файл конфигурации \fBsestatus\fR(8). ++ ++.SH "ОПИСАНИЕ" ++Файл \fIsestatus.conf\fR используется командой \fBsestatus\fR(8) с параметром \fB\-v\fR, чтобы определить, какие контексты безопасности файлов и процессов следует показать. ++.sp ++Полный путь к файлу конфигурации: ++.RS ++\fI/etc/sestatus.conf\fR ++.RE ++.RE ++.sp ++Файл состоит из двух необязательных разделов (описание содержится в разделе \fBФОРМАТ ФАЙЛА\fR). Независимо от того, существуют ли эти разделы, всегда показывается следующее: ++.RS ++Контекст текущего процесса ++.br ++Контекст процесса init ++.br ++Контекст файла управляющего терминала ++.RE ++ ++.SH "ФОРМАТ ФАЙЛА" ++Формат состоит из двух необязательных разделов (пример далее): ++.RS ++.B [files] ++.br ++.I file_name ++.br ++.I [file_name] ++.br ++.I ... ++.sp ++.B [process] ++.br ++.I executable_file_name ++.br ++.I [executable_file_name] ++.br ++.I ... ++.RE ++.sp ++Где: ++.RS ++.B [files] ++.RS ++Начало блока списка файлов. ++.RE ++.I file_name ++.RS ++Одно или несколько полных имён файлов (каждое на новой строке), контекст которых будет показан. Если файл не существует, он игнорируется. Если файл является символической ссылкой, \fBsestatus \-v\fR также покажет контекст целевого файла. ++.RE ++.sp ++.B [process] ++.RS ++Начало блока списка процессов. ++.RE ++.I executable_file_name ++.RS ++Одно или несколько полных имён исполняемых файлов; будет показан контекст соответствующих активных процессов. Каждая запись находится на новой строке. ++.RE ++.RE ++ ++.SH "ПРИМЕР" ++# /etc/sestatus.conf ++.br ++[files] ++.br ++/etc/passwd ++.br ++/etc/shadow ++.br ++/bin/bash ++.br ++/bin/login ++.br ++/lib/libc.so.6 ++.br ++/lib/ld-linux.so.2 ++.br ++/lib/ld.so.1 ++.sp ++[process] ++.br ++/sbin/mingetty ++.br ++/sbin/agetty ++.br ++/usr/sbin/sshd ++.RE ++ ++.SH "СМОТРИТЕ ТАКЖЕ" ++.BR selinux "(8), " sestatus "(8) " ++ ++.SH "СМОТРИТЕ ТАКЖЕ" ++Перевод на русский язык выполнила Герасименко Олеся +diff --git a/policycoreutils/setfiles/ru/restorecon.8 b/policycoreutils/setfiles/ru/restorecon.8 +new file mode 100644 +index 000000000000..9be3a63db356 +--- /dev/null ++++ b/policycoreutils/setfiles/ru/restorecon.8 +@@ -0,0 +1,193 @@ ++.TH "restorecon" "8" "10 июня 2016" "" "Команда пользователя SELinux" ++.SH "ИМЯ" ++restorecon \- восстановить SELinux-контексты безопасности файлов по умолчанию. ++ ++.SH "ОБЗОР" ++.B restorecon ++.RB [ \-r | \-R ] ++.RB [ \-m ] ++.RB [ \-n ] ++.RB [ \-p ] ++.RB [ \-v ] ++.RB [ \-i ] ++.RB [ \-F ] ++.RB [ \-W ] ++.RB [ \-I | \-D ] ++.RB [ \-e ++.IR directory ] ++.IR pathname \ ... ++.P ++.B restorecon ++.RB [ \-f ++.IR infilename ] ++.RB [ \-e ++.IR directory ] ++.RB [ \-r | \-R ] ++.RB [ \-m ] ++.RB [ \-n ] ++.RB [ \-p ] ++.RB [ \-v ] ++.RB [ \-i ] ++.RB [ \-F ] ++.RB [ \-W ] ++.RB [ \-I | \-D ] ++ ++.SH "ОПИСАНИЕ" ++Эта страница руководства содержит описание программы ++.BR restorecon. ++.P ++Эта программа используется в основном для установки контекста безопасности (расширенных атрибутов) для одного или нескольких файлов. ++.P ++Также можно запустить её в любой момент, чтобы исправить некорректные метки, добавить поддержку недавно установленной политики или, используя параметр ++.B \-n ++, пассивно проверить, соответствуют ли установленные контексты файлов тем контекстам, которые указаны в активной политике (поведение по умолчанию). ++.P ++Если объект файла не имеет контекста, ++.B restorecon ++запишет контекст по умолчанию в расширенные атрибуты объекта файла. Если объект файла имеет контекст, ++.B restorecon ++изменит только ту часть контекста безопасности, которая относится к типу. ++Параметр ++.B \-F ++позволяет принудительно заменить контекст целиком. ++.P ++Если у файла имеется метка настраиваемого типа SELinux ++.BR customizable ++(список настраиваемых типов: /etc/selinux/{SELINUXTYPE}/contexts/customizable_types), restorecon ++выполнит сброс метки только при условии использования параметра \-F. ++.P ++Эта программа аналогична ++.BR setfiles, ++но действует немного другим образом в зависимости от значения argv[0]. ++ ++.SH "ПАРАМЕТРЫ" ++.TP ++.BI \-e \ directory ++исключить каталог (чтобы исключить более одного каталога, этот параметр необходимо использовать соответствующее количество раз; необходимо указывать полный путь). ++.TP ++.BI \-f \ infilename ++.I infilename ++содержит список файлов для обработки. Используйте ++.RB \*(lq \- \*(rq ++для ++.BR stdin. ++.TP ++.B \-F ++принудительно сбросить контекст, чтобы обеспечить соответствие file_context для настраиваемых файлов и соответствие контексту файлов по умолчанию для остальных файлов (меняются части контекста, связанные с пользователем, ролью, диапазоном, а также тип). ++.TP ++.B \-h, \-? ++показать сведения об использовании и выйти. ++.TP ++.B \-i ++игнорировать файлы, которые не существуют. ++.TP ++.B \-I ++игнорировать дайджест, чтобы принудительно проверить метки, даже если хранимый дайджест SHA1 соответствует дайджесту SHA1 файлов спецификации. Затем (при условии отсутствия ошибок) дайджест будет обновлён. Более подробные сведения доступны в разделе ++.B ПРИМЕЧАНИЯ. ++.TP ++.B \-D ++установить или обновить дайджесты SHA1 для любых каталогов. Используйте этот параметр, чтобы включить использование расширенного атрибута ++.IR security.restorecon_last. ++.TP ++.B \-m ++не выполнять чтение ++.B /proc/mounts ++для получения списка монтирований без seclabel, которые следует исключить из проверок с повторным проставлением меток. Установка этого параметра полезна при наличии смонтированной файловой системы без seclabel, в которой в расположенном ниже каталоге смонтирована файловая система с seclabel. ++.TP ++.B \-n ++не изменять метки файлов (пассивная проверка). Чтобы просмотреть файлы, метки которых были бы изменены, добавьте ++.BR \-v. ++.TP ++.BI \-o \ outfilename ++этот параметр устарел и больше не поддерживается. ++.TP ++.B \-p ++показывать ход выполнения, выводя количество обработанных файлов (единица измерения - блок размером 1 КБ (то есть 1000 файлов)). Если выполняется повторное проставление меток во всей ОС, будет показан примерный процент выполнения. Обратите внимание, что параметры ++.B \-p ++и ++.B \-v ++являются взаимоисключающими. ++.TP ++.B \-R, \-r ++рекурсивно изменить метки файлов для файлов и каталогов (спускаться по каталогам). ++.br ++.TP ++.B \-v ++показать изменения в метках файлов. Использование нескольких параметров -v увеличивает уровень детализации. Обратите внимание, что параметры ++.B \-v ++и ++.B \-p ++являются взаимоисключающими. ++.TP ++.B \-W ++показать предупреждения о записях, для которых не обнаружены соответствующие файлы, с помощью вывода результатов ++.BR selabel_stats (3). ++.TP ++.B \-0 ++предполагается, что разделителем для элементов ввода является символ нуля ++(вместо пробела). Символы кавычек и обратной косой черты также считаются обычными символами, которые могут формировать допустимый ввод. ++Этот параметр также отключает строку конца файла (end-of-file string), она обрабатывается, как любой другой аргумент. Это полезно, если элементы ввода содержат пробелы, кавычки или обратные косые черты. Параметр ++.B \-print0 ++GNU ++.B find ++производит ввод, подходящий для этого режима. ++.TP ++.SH "АРГУМЕНТЫ" ++.IR pathname \ ... ++Путь к файлу (файлам), для которых следует повторно проставить метки. ++.SH "ПРИМЕЧАНИЯ" ++.IP "1." 4 ++.B restorecon ++не переходит по символическим ссылкам и по умолчанию не работает с каталогами рекурсивно. ++.IP "2." 4 ++Если в ++.I pathname ++указан корневой каталог, установлен параметр ++.B \-vR ++или ++.B \-vr, ++а также запущена система аудита, в журнал с меткой сообщения ++.BR FS_RELABEL ++автоматически записывается событие аудита, которое содержит сообщение о том, что произошло "массовое повторное проставление меток". ++.IP "3." 4 ++Для повышения производительности при рекурсивном повторном проставлении меток в файловых системах (то есть тогда, когда установлен параметр ++.B \-R ++или ++.B \-r ++), ++параметр ++.B \-D ++команды ++.B restorecon ++обеспечит сохранение дайджеста SHA1 файлов спецификации по умолчанию в расширенном атрибуте с именем ++.IR security.restorecon_last ++для каталогов, указанных в соответствующих путях ++.IR pathname \ ... ++, после успешного завершения повторного проставления меток. Этот дайджест будет проверен, если команда ++.B restorecon ++.B \-D ++будет перезапущена с теми же параметрами ++.I pathname. ++Подробные сведения доступны в ++.BR selinux_restorecon (3). ++.sp ++Параметр ++.B \-I ++позволяет игнорировать дайджест SHA1 из каждого каталога, указанного в ++.IR pathname \ ... ++, и, при условии, что НЕ установлен параметр ++.B \-n ++и установлен рекурсивный режим, для файлов будут необходимым образом повторно проставлены метки, а дайджест затем будет обновлён (если не будет ошибок). ++ ++.SH "СМОТРИТЕ ТАКЖЕ" ++.BR setfiles (8), ++.BR fixfiles (8), ++.BR load_policy (8), ++.BR checkpolicy (8), ++.BR customizable_types (5) ++ ++.SH "АВТОРЫ" ++Эта man-страница была написана Dan Walsh . ++Некоторая часть содержимого этой man-страницы была взята из man-страницы setfiles, написанной Russell Coker . ++Программа была написана Dan Walsh . ++Перевод на русский язык выполнила Герасименко Олеся . +diff --git a/policycoreutils/setfiles/ru/restorecon_xattr.8 b/policycoreutils/setfiles/ru/restorecon_xattr.8 +new file mode 100644 +index 000000000000..41c441b8c5c2 +--- /dev/null ++++ b/policycoreutils/setfiles/ru/restorecon_xattr.8 +@@ -0,0 +1,115 @@ ++.TH "restorecon_xattr" "8" "24 сентября 2016" "" "Команда пользователя SELinux" ++.SH "ИМЯ" ++restorecon_xattr \- управление записями расширенных атрибутов ++.I security.restorecon_last, ++добавленными с помощью ++.BR setfiles (8) ++или ++.BR restorecon (8). ++ ++.SH "ОБЗОР" ++.B restorecon_xattr ++.RB [ \-d ] ++.RB [ \-D ] ++.RB [ \-m ] ++.RB [ \-n ] ++.RB [ \-r ] ++.RB [ \-v ] ++.RB [ \-e ++.IR directory ] ++.RB [ \-f ++.IR specfile ] ++.I pathname ++ ++.SH "ОПИСАНИЕ" ++.B restorecon_xattr ++покажет дайджесты SHA1, добавленные в расширенные атрибуты ++.I security.restorecon_last, ++или полностью удалит эти атрибуты. Эти атрибуты устанавливаются командой ++.BR restorecon (8) ++или ++.BR setfiles (8) ++для указанных каталогов при рекурсивном повторном проставлении меток. ++.sp ++.B restorecon_xattr ++полезно использовать для управления записями расширенных атрибутов, в частности, когда пользователи забывают, из каких каталогов они запускали ++.BR restorecon (8) ++или ++.BR setfiles (8). ++.sp ++Файловые системы ++.B RAMFS ++и ++.B TMPFS ++не поддерживают расширенные атрибуты ++.I security.restorecon_last ++и автоматически исключаются из поиска. ++.sp ++По умолчанию ++.B restorecon_xattr ++показывает дайджесты SHA1, добавляя в конце "Match", если они соответствуют установленному по умолчанию файлу спецификации или файлу спецификации ++.I specfile, ++который установлен с помощью параметра ++.B \-f. ++Несоответствующие дайджесты SHA1 будут показаны с добавлением "No Match" в конце. ++Эту возможность можно отключить с помощью параметра ++.B \-n. ++ ++.SH "ПАРАМЕТРЫ" ++.TP ++.B \-d ++удалить все несоответствующие записи дайджеста каталога ++.I security.restorecon_last. ++.TP ++.B \-D ++удалить все записи дайджеста каталога ++.I security.restorecon_last. ++.TP ++.B \-m ++не выполнять чтение ++.B /proc/mounts ++для получения списка монтирований без seclabel, которые следует исключить из проверок с повторным проставлением меток. ++.br ++установка параметра ++.B \-m ++полезна при наличии смонтированной файловой системы без seclabel, в которой в расположенном ниже каталоге смонтирована файловая система с seclabel. ++.TP ++.B \-n ++не добавлять "Match" или "No Match" в конце отображаемых дайджестов. ++.TP ++.B \-r ++рекурсивно спускаться по каталогам. ++.TP ++.B \-v ++показать дайджест SHA1, созданный установленным файлом спецификации. ++.TP ++.B \-e ++.I directory ++.br ++каталог, который следует исключить (чтобы исключить более одного каталога, этот параметр необходимо использовать соответствующее количество раз). ++.TP ++.B \-f ++.I specfile ++.br ++необязательный файл спецификации ++.I specfile, ++который содержит записи контекстов файлов в соответствии с описанием в ++.BR file_contexts (5). ++Он будет использоваться ++.BR selabel_open (3) ++для получения набора записей меток; получение дайджеста SHA1 выполняется с помощью ++.BR selabel_digest (3). ++Если этот параметр не указан, будет использоваться файл file_contexts по умолчанию. ++ ++.SH "АРГУМЕНТЫ" ++.TP ++.I pathname ++.br ++путь к дереву каталогов, в котором следует выполнить поиск. ++ ++.SH "СМОТРИТЕ ТАКЖЕ" ++.BR restorecon (8), ++.BR setfiles (8) ++ ++.SH "АВТОРЫ" ++Перевод на русский язык выполнила Герасименко Олеся +diff --git a/policycoreutils/setfiles/ru/setfiles.8 b/policycoreutils/setfiles/ru/setfiles.8 +new file mode 100644 +index 000000000000..730b634b7a99 +--- /dev/null ++++ b/policycoreutils/setfiles/ru/setfiles.8 +@@ -0,0 +1,221 @@ ++.TH "setfiles" "8" "10 июня 2016" "" "Команда пользователя SELinux" ++.SH "ИМЯ" ++setfiles \- установить SELinux-контексты безопасности файлов. ++ ++.SH "ОБЗОР" ++.B setfiles ++.RB [ \-c ++.IR policy ] ++.RB [ \-d ] ++.RB [ \-l ] ++.RB [ \-m ] ++.RB [ \-n ] ++.RB [ \-e ++.IR directory ] ++.RB [ \-p ] ++.RB [ \-s ] ++.RB [ \-v ] ++.RB [ \-W ] ++.RB [ \-F ] ++.RB [ \-I | \-D ] ++.I spec_file ++.IR pathname \ ... ++ ++.SH "ОПИСАНИЕ" ++На этой странице руководства приводится описание программы ++.BR setfiles. ++.P ++Эта программа используется в основном для инициализации полей контекста безопасности (расширенных атрибутов) в одной или нескольких файловых системах (или их частях). Обычно она впервые запускается как часть процесса установки SELinux (этап, который называется проставлением меток). ++.P ++Также можно запустить её в любой другой момент, чтобы исправить некорректные метки, добавить поддержку для недавно установленной политики или, используя параметр ++.B \-n ++, пассивно проверить, соответствуют ли установленные контексты файлов тем контекстам, которые указаны в активной политике (поведение по умолчанию) или в какой-либо другой политике (см. параметр ++.B \-c ++). ++.P ++Если объект файла не имеет контекста, ++.B setfiles ++запишет контекст по умолчанию в расширенные атрибуты объекта файла. Если объект файла имеет контекст, ++.B setfiles ++изменит только ту часть контекста безопасности, которая относится к типу. ++Параметр ++.B \-F ++позволяет принудительно заменить контекст целиком. ++.SH "ПАРАМЕТРЫ" ++.TP ++.B \-c ++проверить действительность контекстов относительно указанной двоичной политики. ++.TP ++.B \-d ++показать, какая спецификация соответствует каждому из файлов. ++.TP ++.BI \-e \ directory ++исключить каталог (чтобы исключить более одного каталога, этот параметр необходимо использовать соответствующее количество раз). ++.TP ++.BI \-f \ infilename ++.I infilename ++содержит список файлов для обработки. Используйте ++.RB \*(lq \- \*(rq ++для ++.BR stdin . ++.TP ++.B \-F ++принудительно сбросить контекст, чтобы обеспечить соответствие file_context для настраиваемых файлов и соответствие контексту файлов по умолчанию для остальных файлов (меняются части контекста, связанные с пользователем, ролью, диапазоном, а также тип). ++.TP ++.B \-h, \-? ++показать сведения об использовании и выйти. ++.TP ++.B \-i ++игнорировать файлы, которые не существуют. ++.TP ++.B \-I ++игнорировать дайджест, чтобы принудительно проверить метки, даже если хранимый дайджест SHA1 соответствует дайджесту SHA1 файлов спецификации. Затем (при условии отсутствия ошибок) дайджест будет обновлён. Более подробные сведения доступны в разделе ++.B ПРИМЕЧАНИЯ. ++.TP ++.B \-D ++установить или обновить дайджесты SHA1 для любых каталогов. Используйте этот параметр, чтобы включить использование расширенного атрибута ++.IR security.restorecon_last. ++.TP ++.B \-l ++записывать изменения меток файлов в системный журнал. ++.TP ++.B \-m ++не выполнять чтение ++.B /proc/mounts ++для получения списка монтирований без seclabel, которые следует исключить из проверок с повторным проставлением меток. Установка этого параметра полезна при наличии смонтированной файловой системы без seclabel, в которой в расположенном ниже каталоге смонтирована файловая система с seclabel. ++.TP ++.B \-n ++не изменять метки файлов (пассивная проверка). ++.TP ++.BI \-o \ outfilename ++этот параметр устарел и больше не поддерживается. ++.TP ++.B \-p ++показывать ход выполнения, выводя количество обработанных файлов (единица измерения - блок размером 1 КБ (то есть 1000 файлов)). Если выполняется повторное проставление меток во всей ОС, будет показан примерный процент выполнения. Обратите внимание, что параметры ++.B \-p ++и ++.B \-v ++являются взаимоисключающими. ++.TP ++.B \-q ++этот параметр устарел, ранее использовался для прекращения вывода параметров ассоциаций индексных дескрипторов (inode). ++.TP ++.BI \-r \ rootpath ++использовать альтернативный корневой путь. Используется в meta-selinux для сборок OpenEmbedded/Yocto, чтобы проставить метки для файлов в каталоге ++.I rootpath ++таким образом, как если бы они были в ++.B / ++.TP ++.B \-s ++взять список файлов из стандартного ввода, а не использовать путь из командной строки (эквивалентно ++.RB \*(lq "\-f \-" \*(rq ++). ++.TP ++.B \-v ++показать изменения меток для файлов и вывести параметры ассоциаций индексных дескрипторов (inode). ++Обратите внимание, что параметры ++.B \-v ++и ++.B \-p ++являются взаимоисключающими. ++.TP ++.B \-W ++показать предупреждения о записях, для которых не обнаружены соответствующие файлы, с помощью вывода результатов ++.BR selabel_stats (3). ++.TP ++.B \-0 ++предполагается, что разделителем для элементов ввода является символ нуля ++(вместо пробела). Символы кавычек и обратной косой черты также считаются обычными символами, которые могут формировать допустимый ввод. ++Этот параметр также отключает строку конца файла (end-of-file string), она обрабатывается, как любой другой аргумент. Это полезно, если элементы ввода содержат пробелы, кавычки или обратные косые черты. Параметр ++.B -print0 ++GNU ++.B find ++производит ввод, подходящий для этого режима. ++ ++.SH "АРГУМЕНТЫ" ++.TP ++.I spec_file ++Файл спецификации, содержащий строки следующего вида: ++.sp ++.RS ++.I regexp ++.RI [ type ] ++.IR context \ | ++.B <> ++.RS ++Регулярное выражение привязывается с обоих концов. Необязательное поле ++.I type ++указывает тип файла (показывается в поле режима по команде ++.BR ls (1) ++), например, ++.B \-\- ++для соответствия только обычным файлам или ++.B \-d ++для соответствия только каталогам. ++.I context ++может быть обычным контекстом безопасности или строкой ++.B <> ++(чтобы указать, что контекст файла не следует изменять). ++.br ++Используется последняя соответствующая спецификация. Если на файл имеется несколько жёстких ссылок, которые соответствуют разным спецификациям, и эти спецификации означают разные контексты безопасности, будет показано предупреждение, но для файла всё равно будет проставлена метка на основе последней соответствующей спецификации, отличной от ++.BR <> \|. ++.RE ++.RE ++.TP ++.IR pathname \ ... ++Путь к корневому каталогу каждой файловой системы, в которой следует повторно проставить метки, или конкретный каталог в файловой системе, по которому следует рекурсивно спуститься и повторно проставить метки, или путь к файлу, для которого следует повторно проставить метку. ++Не используется, если используется параметр ++.B \-f ++или ++.B \-s . ++ ++.SH "ПРИМЕЧАНИЯ" ++.IP "1." 4 ++.B setfiles ++следует по символическим ссылкам и рекурсивно применяется к каталогам. ++.IP "2." 4 ++Если в ++.I pathname ++указан корневой каталог, установлен параметр ++.B \-v ++, а также запущена система аудита, в журнал с меткой сообщения ++.BR FS_RELABEL ++автоматически записывается событие аудита, которое содержит сообщение о том, что произошло "массовое повторное проставление меток". ++.IP "3." 4 ++Для повышения производительности при рекурсивном повторном проставлении меток в файловых системах используется параметр ++.B \-D ++команды ++.B setfiles . ++Он обеспечивает сохранение дайджеста SHA1 файла спецификации ++.B spec_file ++в расширенном атрибуте с именем ++.IR security.restorecon_last ++для каталога, указанного в соответствующем пути ++.IR pathname \ ... ++, после успешного завершения повторного проставления меток. Этот дайджест будет проверен, если команда ++.B setfiles ++.B \-D ++будет перезапущена с теми же параметрами ++.I spec_file ++и ++.I pathname ++Подробные сведения доступны в ++.BR selinux_restorecon (3). ++.sp ++Параметр ++.B \-I ++позволяет игнорировать дайджест SHA1 из каждого каталога, указанного в ++.IR pathname \ ... ++, и, при условии, что НЕ установлен параметр ++.B \-n ++, для файлов будут необходимым образом повторно проставлены метки, а дайджест затем будет обновлён (если не будет ошибок). ++ ++.SH "СМОТРИТЕ ТАКЖЕ" ++.BR restorecon (8), ++.BR load_policy (8), ++.BR checkpolicy (8) ++ ++.SH "АВТОРЫ" ++Эта man-страница была написана Russell Coker . ++Программа была написана Stephen Smalley . ++Перевод на русский язык выполнила Герасименко Олеся +diff --git a/policycoreutils/setsebool/ru/setsebool.8 b/policycoreutils/setsebool/ru/setsebool.8 +new file mode 100644 +index 000000000000..8a97b8abf7d4 +--- /dev/null ++++ b/policycoreutils/setsebool/ru/setsebool.8 +@@ -0,0 +1,27 @@ ++.TH "setsebool" "8" "11 августа 2004" "dwalsh@redhat.com" "Документация по командной строке SELinux" ++.SH "ИМЯ" ++setsebool \- установить значение логического переключателя SELinux ++ ++.SH "ОБЗОР" ++.B setsebool ++.I "[ \-PNV ] boolean value | bool1=val1 bool2=val2 ..." ++ ++.SH "ОПИСАНИЕ" ++.B setsebool ++устанавливает текущее состояние отдельного логического переключателя SELinux или списка логических переключателей в указанное значение. Это значение может быть либо 1, true или on (включает логический переключатель), либо 0, false или off (отключает логический переключатель). ++ ++Если параметр \-P не указан, будет изменено только текущее значение логического переключателя; параметры загрузки по умолчанию останутся без изменений. ++ ++Если параметр \-P указан, все ожидающие значения записываются в файл политики на диске. Поэтому они не будут сбрасываться после перезагрузок. ++ ++Если параметр \-N указан, политика на диске не перезагружается в ядро. ++ ++Если параметр \-V указан, показываются подробные сообщения об ошибках из библиотек semanage. ++ ++.SH "СМОТРИТЕ ТАКЖЕ" ++getsebool(8), booleans(8), togglesebool(8), semanage(8) ++ ++.SH АВТОРЫ ++Эта страница руководства была написана Dan Walsh . ++Программа была написана Tresys Technology. ++Перевод на русский язык выполнила Герасименко Олеся . +-- +2.41.0 + diff --git a/SOURCES/0016-python-sepolicy-Fix-template-for-confined-user-polic.patch b/SOURCES/0016-python-sepolicy-Fix-template-for-confined-user-polic.patch deleted file mode 100644 index f60f839..0000000 --- a/SOURCES/0016-python-sepolicy-Fix-template-for-confined-user-polic.patch +++ /dev/null @@ -1,94 +0,0 @@ -From cf06052cc5fece8ec1ae655aecf941420385bf4d Mon Sep 17 00:00:00 2001 -From: Vit Mojzis -Date: Thu, 1 Jun 2023 18:34:30 +0200 -Subject: [PATCH] python/sepolicy: Fix template for confined user policy - modules -Content-type: text/plain - -The following commit -https://github.com/SELinuxProject/refpolicy/commit/330b0fc3331d3b836691464734c96f3da3044490 -changed the userdom_base_user_template, which now requires a role -corresponding to the user being created to be defined outside of the -template. -Similar change was also done to fedora-selinux/selinux-policy -https://github.com/fedora-selinux/selinux-policy/commit/e1e216b25df1bdb4eb7dbb8f73f32927ad6f3d1f - -Although I believe the template should define the role (just as it -defines the new user), that will require extensive changes to refpolicy. -In the meantime the role needs to be defined separately. - -Fixes: - # sepolicy generate --term_user -n newuser - Created the following files: - /root/a/test/newuser.te # Type Enforcement file - /root/a/test/newuser.if # Interface file - /root/a/test/newuser.fc # File Contexts file - /root/a/test/newuser_selinux.spec # Spec file - /root/a/test/newuser.sh # Setup Script - - # ./newuser.sh - Building and Loading Policy - + make -f /usr/share/selinux/devel/Makefile newuser.pp - Compiling targeted newuser module - Creating targeted newuser.pp policy package - rm tmp/newuser.mod tmp/newuser.mod.fc - + /usr/sbin/semodule -i newuser.pp - Failed to resolve roleattributeset statement at /var/lib/selinux/targeted/tmp/modules/400/newuser/cil:8 - Failed to resolve AST - /usr/sbin/semodule: Failed! - -Signed-off-by: Vit Mojzis -Acked-by: Petr Lautrbach ---- - python/sepolicy/sepolicy/templates/user.py | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/python/sepolicy/sepolicy/templates/user.py b/python/sepolicy/sepolicy/templates/user.py -index 1ff9d2ce8e75..7081fbaec496 100644 ---- a/python/sepolicy/sepolicy/templates/user.py -+++ b/python/sepolicy/sepolicy/templates/user.py -@@ -28,6 +28,8 @@ policy_module(TEMPLATETYPE, 1.0.0) - # - # Declarations - # -+role TEMPLATETYPE_r; -+ - userdom_unpriv_user_template(TEMPLATETYPE) - """ - -@@ -38,6 +40,8 @@ policy_module(TEMPLATETYPE, 1.0.0) - # - # Declarations - # -+role TEMPLATETYPE_r; -+ - userdom_admin_user_template(TEMPLATETYPE) - """ - -@@ -48,6 +52,7 @@ policy_module(TEMPLATETYPE, 1.0.0) - # - # Declarations - # -+role TEMPLATETYPE_r; - - userdom_restricted_user_template(TEMPLATETYPE) - """ -@@ -59,6 +64,7 @@ policy_module(TEMPLATETYPE, 1.0.0) - # - # Declarations - # -+role TEMPLATETYPE_r; - - userdom_restricted_xwindows_user_template(TEMPLATETYPE) - """ -@@ -89,6 +95,7 @@ gen_tunable(TEMPLATETYPE_manage_user_files, false) - # - # Declarations - # -+role TEMPLATETYPE_r; - - userdom_base_user_template(TEMPLATETYPE) - """ --- -2.41.0 - diff --git a/SOURCES/0017-Revert-gui-Remove-the-Russian-translations.patch b/SOURCES/0017-Revert-gui-Remove-the-Russian-translations.patch new file mode 100644 index 0000000..eb640d5 --- /dev/null +++ b/SOURCES/0017-Revert-gui-Remove-the-Russian-translations.patch @@ -0,0 +1,100 @@ +From c22c5bfc40dd572e18352ba418570a12aa335796 Mon Sep 17 00:00:00 2001 +From: Petr Lautrbach +Date: Mon, 13 Nov 2023 13:38:04 +0100 +Subject: [PATCH] Revert "gui: Remove the Russian translations" +Content-type: text/plain + +This reverts commit fb58fa97359c9206bccdb1088f92245d6fa0095e. +--- + gui/ru/selinux-polgengui.8 | 35 +++++++++++++++++++++++++++++++++ + gui/ru/system-config-selinux.8 | 36 ++++++++++++++++++++++++++++++++++ + 2 files changed, 71 insertions(+) + create mode 100644 gui/ru/selinux-polgengui.8 + create mode 100644 gui/ru/system-config-selinux.8 + +diff --git a/gui/ru/selinux-polgengui.8 b/gui/ru/selinux-polgengui.8 +new file mode 100644 +index 000000000000..a8e692a64d38 +--- /dev/null ++++ b/gui/ru/selinux-polgengui.8 +@@ -0,0 +1,35 @@ ++.TH "selinux-polgengui" "8" "8 апреля 2013" "Руководство по утилитам настройки системы" ++ ++.SH ИМЯ ++selinux\-polgengui \- утилита для создания политики SELinux ++ ++.SH ОБЗОР ++.B selinux-polgengui ++ ++.SH ОПИСАНИЕ ++\fBselinux-polgengui\fP - графическая утилита, которую можно использовать, чтобы создать платформу для сборки политики SELinux. ++.SH ПАРАМЕТРЫ ++Нет ++ ++.SH ФАЙЛЫ ++\fi/usr/bin/selinux-polgengui\fP ++ ++.SH Примеры ++Чтобы запустить программу, введите: ++ ++selinux-polgengui ++ ++.PP ++.SH "СМОТРИТЕ ТАКЖЕ" ++.TP ++selinux(1), sepolicy(8), sepolicy-generate(8) ++.PP ++ ++.SH СООБЩЕНИЯ ОБ ОШИБКАХ ++Отправляйте сообщения об ошибках по адресу . ++ ++.SH ЛИЦЕНЗИЯ И АВТОРЫ ++\fBselinux-polgengui\fP распространяется на условиях Стандартной Общественной Лицензии ++GNU, авторские права принадлежат Red Hat, Inc. ++.br ++Эта man-страница была написана Daniel Walsh . Перевод на русский язык выполнила Герасименко Олеся . +diff --git a/gui/ru/system-config-selinux.8 b/gui/ru/system-config-selinux.8 +new file mode 100644 +index 000000000000..0b91a3bd62fc +--- /dev/null ++++ b/gui/ru/system-config-selinux.8 +@@ -0,0 +1,36 @@ ++.TH "system-config-selinux" "8" "8 апреля 2013" "Руководство по утилитам настройки системы" ++ ++.SH ИМЯ ++system\-config\-selinux \- утилита для управления SELinux ++ ++.SH ОБЗОР ++.B system-config-selinux ++ ++.SH ОПИСАНИЕ ++Утилита \fBsystem-config-selinux\fP предоставляет графический интерфейс для управления конфигурацией SELinux. ++ ++.SH ПАРАМЕТРЫ ++Нет ++ ++.SH ФАЙЛЫ ++\fi/usr/bin/system-config-selinux\fP ++ ++.SH Примеры ++Чтобы запустить программу, введите: ++ ++system-config-selinux ++ ++.PP ++.SH "СМОТРИТЕ ТАКЖЕ" ++.TP ++selinux(1), semanage(8) ++.PP ++ ++.SH СООБЩЕНИЯ ОБ ОШИБКАХ ++Отправляйте сообщения об ошибках по адресу . ++ ++.SH ЛИЦЕНЗИЯ И АВТОРЫ ++\fBsystem-config-selinux\fP распространяется на условиях Стандартной Общественной Лицензии ++GNU, авторские права принадлежат Red Hat, Inc. ++.br ++Эта man-страница была написана Daniel Walsh . Перевод на русский язык выполнила Герасименко Олеся . +-- +2.41.0 + diff --git a/SOURCES/0018-python-improve-format-strings-for-proper-localizatio.patch b/SOURCES/0018-python-improve-format-strings-for-proper-localizatio.patch deleted file mode 100644 index d43a7a5..0000000 --- a/SOURCES/0018-python-improve-format-strings-for-proper-localizatio.patch +++ /dev/null @@ -1,455 +0,0 @@ -From 9bef6943871822d82a3428dda13a871e1848acad Mon Sep 17 00:00:00 2001 -From: Petr Lautrbach -Date: Tue, 16 May 2023 15:45:05 +0200 -Subject: [PATCH] python: improve format strings for proper localization -Content-type: text/plain - -If a string contains more than one unnamed argument it's hard for -translators to proper localize as they don't know which value is -represented by a unnamed argument. It also blocks them to use a -different order of arguments which would make better sense in other -languages. - -Fixes: - - $ xgettext --default-domain=python -L Python --keyword=_ --keyword=N_ ../audit2allow/audit2allow ../chcat/chcat ../semanage/semanage ../semanage/seobject.py ../sepolgen/src/sepolgen/interfaces.py ../sepolicy/sepolicy/generate.py ../sepolicy/sepolicy/gui.py ../sepolicy/sepolicy/__init__.py ../sepolicy/sepolicy/interface.py ../sepolicy/sepolicy.py - ../chcat/chcat:220: warning: 'msgid' format string with unnamed arguments cannot be properly localized: - The translator cannot reorder the arguments. - Please consider using a format string with named arguments, - and a mapping instead of a tuple for the arguments. - ../semanage/seobject.py:1178: warning: 'msgid' format string with unnamed arguments cannot be properly localized: - The translator cannot reorder the arguments. - Please consider using a format string with named arguments, - and a mapping instead of a tuple for the arguments. - ... - -Signed-off-by: Petr Lautrbach ---- - python/chcat/chcat | 6 +- - python/semanage/seobject.py | 130 ++++++++++++++++++------------------ - 2 files changed, 68 insertions(+), 68 deletions(-) - -diff --git a/python/chcat/chcat b/python/chcat/chcat -index 68718ec5f102..c4f592291821 100755 ---- a/python/chcat/chcat -+++ b/python/chcat/chcat -@@ -125,7 +125,7 @@ def chcat_add(orig, newcat, objects, login_ind): - - if len(clist) > 1: - if cat in clist[1:]: -- print(_("%s is already in %s") % (f, orig)) -+ print(_("{target} is already in {category}").format(target=f, category=orig)) - continue - clist.append(cat) - cats = clist[1:] -@@ -207,7 +207,7 @@ def chcat_remove(orig, newcat, objects, login_ind): - - if len(clist) > 1: - if cat not in clist[1:]: -- print(_("%s is not in %s") % (f, orig)) -+ print(_("{target} is not in {category}").format(target=f, category=orig)) - continue - clist.remove(cat) - if len(clist) > 1: -@@ -217,7 +217,7 @@ def chcat_remove(orig, newcat, objects, login_ind): - else: - cat = "" - else: -- print(_("%s is not in %s") % (f, orig)) -+ print(_("{target} is not in {category}").format(target=f, category=orig)) - continue - - if len(cat) == 0: -diff --git a/python/semanage/seobject.py b/python/semanage/seobject.py -index d82da4942987..2b1eb44ce8a3 100644 ---- a/python/semanage/seobject.py -+++ b/python/semanage/seobject.py -@@ -843,7 +843,7 @@ class seluserRecords(semanageRecords): - for r in roles: - rc = semanage_user_add_role(self.sh, u, r) - if rc < 0: -- raise ValueError(_("Could not add role %s for %s") % (r, name)) -+ raise ValueError(_("Could not add role {role} for {name}").format(role=r, name=name)) - - if is_mls_enabled == 1: - rc = semanage_user_set_mlsrange(self.sh, u, serange) -@@ -855,7 +855,7 @@ class seluserRecords(semanageRecords): - raise ValueError(_("Could not set MLS level for %s") % name) - rc = semanage_user_set_prefix(self.sh, u, prefix) - if rc < 0: -- raise ValueError(_("Could not add prefix %s for %s") % (r, prefix)) -+ raise ValueError(_("Could not add prefix {prefix} for {role}").format(role=r, prefix=prefix)) - (rc, key) = semanage_user_key_extract(self.sh, u) - if rc < 0: - raise ValueError(_("Could not extract key for %s") % name) -@@ -1088,7 +1088,7 @@ class portRecords(semanageRecords): - - (rc, k) = semanage_port_key_create(self.sh, low, high, proto_d) - if rc < 0: -- raise ValueError(_("Could not create a key for %s/%s") % (proto, port)) -+ raise ValueError(_("Could not create a key for {proto}/{port}").format(proto=proto, port=port)) - return (k, proto_d, low, high) - - def __add(self, port, proto, serange, type): -@@ -1110,44 +1110,44 @@ class portRecords(semanageRecords): - - (rc, exists) = semanage_port_exists(self.sh, k) - if rc < 0: -- raise ValueError(_("Could not check if port %s/%s is defined") % (proto, port)) -+ raise ValueError(_("Could not check if port {proto}/{port} is defined").format(proto=proto, port=port)) - if exists: -- raise ValueError(_("Port %s/%s already defined") % (proto, port)) -+ raise ValueError(_("Port {proto}/{port} already defined").format(proto=proto, port=port)) - - (rc, p) = semanage_port_create(self.sh) - if rc < 0: -- raise ValueError(_("Could not create port for %s/%s") % (proto, port)) -+ raise ValueError(_("Could not create port for {proto}/{port}").format(proto=proto, port=port)) - - semanage_port_set_proto(p, proto_d) - semanage_port_set_range(p, low, high) - (rc, con) = semanage_context_create(self.sh) - if rc < 0: -- raise ValueError(_("Could not create context for %s/%s") % (proto, port)) -+ raise ValueError(_("Could not create context for {proto}/{port}").format(proto=proto, port=port)) - - rc = semanage_context_set_user(self.sh, con, "system_u") - if rc < 0: -- raise ValueError(_("Could not set user in port context for %s/%s") % (proto, port)) -+ raise ValueError(_("Could not set user in port context for {proto}/{port}").format(proto=proto, port=port)) - - rc = semanage_context_set_role(self.sh, con, "object_r") - if rc < 0: -- raise ValueError(_("Could not set role in port context for %s/%s") % (proto, port)) -+ raise ValueError(_("Could not set role in port context for {proto}/{port}").format(proto=proto, port=port)) - - rc = semanage_context_set_type(self.sh, con, type) - if rc < 0: -- raise ValueError(_("Could not set type in port context for %s/%s") % (proto, port)) -+ raise ValueError(_("Could not set type in port context for {proto}/{port}").format(proto=proto, port=port)) - - if (is_mls_enabled == 1) and (serange != ""): - rc = semanage_context_set_mls(self.sh, con, serange) - if rc < 0: -- raise ValueError(_("Could not set mls fields in port context for %s/%s") % (proto, port)) -+ raise ValueError(_("Could not set mls fields in port context for {proto}/{port}").format(proto=proto, port=port)) - - rc = semanage_port_set_con(self.sh, p, con) - if rc < 0: -- raise ValueError(_("Could not set port context for %s/%s") % (proto, port)) -+ raise ValueError(_("Could not set port context for {proto}/{port}").format(proto=proto, port=port)) - - rc = semanage_port_modify_local(self.sh, k, p) - if rc < 0: -- raise ValueError(_("Could not add port %s/%s") % (proto, port)) -+ raise ValueError(_("Could not add port {proto}/{port}").format(proto=proto, port=port)) - - semanage_context_free(con) - semanage_port_key_free(k) -@@ -1175,13 +1175,13 @@ class portRecords(semanageRecords): - - (rc, exists) = semanage_port_exists(self.sh, k) - if rc < 0: -- raise ValueError(_("Could not check if port %s/%s is defined") % (proto, port)) -+ raise ValueError(_("Could not check if port {proto}/{port} is defined").format(proto=proto, port=port)) - if not exists: -- raise ValueError(_("Port %s/%s is not defined") % (proto, port)) -+ raise ValueError(_("Port {proto}/{port} is not defined").format(proto=proto, port=port)) - - (rc, p) = semanage_port_query(self.sh, k) - if rc < 0: -- raise ValueError(_("Could not query port %s/%s") % (proto, port)) -+ raise ValueError(_("Could not query port {proto}/{port}").format(proto=proto, port=port)) - - con = semanage_port_get_con(p) - -@@ -1195,7 +1195,7 @@ class portRecords(semanageRecords): - - rc = semanage_port_modify_local(self.sh, k, p) - if rc < 0: -- raise ValueError(_("Could not modify port %s/%s") % (proto, port)) -+ raise ValueError(_("Could not modify port {proto}/{port}").format(proto=proto, port=port)) - - semanage_port_key_free(k) - semanage_port_free(p) -@@ -1241,19 +1241,19 @@ class portRecords(semanageRecords): - (k, proto_d, low, high) = self.__genkey(port, proto) - (rc, exists) = semanage_port_exists(self.sh, k) - if rc < 0: -- raise ValueError(_("Could not check if port %s/%s is defined") % (proto, port)) -+ raise ValueError(_("Could not check if port {proto}/{port} is defined").format(proto=proto, port=port)) - if not exists: -- raise ValueError(_("Port %s/%s is not defined") % (proto, port)) -+ raise ValueError(_("Port {proto}/{port} is not defined").format(proto=proto, port=port)) - - (rc, exists) = semanage_port_exists_local(self.sh, k) - if rc < 0: -- raise ValueError(_("Could not check if port %s/%s is defined") % (proto, port)) -+ raise ValueError(_("Could not check if port {proto}/{port} is defined").format(proto=proto, port=port)) - if not exists: -- raise ValueError(_("Port %s/%s is defined in policy, cannot be deleted") % (proto, port)) -+ raise ValueError(_("Port {proto}/{port} is defined in policy, cannot be deleted").format(proto=proto, port=port)) - - rc = semanage_port_del_local(self.sh, k) - if rc < 0: -- raise ValueError(_("Could not delete port %s/%s") % (proto, port)) -+ raise ValueError(_("Could not delete port {proto}/{port}").format(proto=proto, port=port)) - - semanage_port_key_free(k) - -@@ -1362,7 +1362,7 @@ class ibpkeyRecords(semanageRecords): - - (rc, k) = semanage_ibpkey_key_create(self.sh, subnet_prefix, low, high) - if rc < 0: -- raise ValueError(_("Could not create a key for %s/%s") % (subnet_prefix, pkey)) -+ raise ValueError(_("Could not create a key for {subnet_prefix}/{pkey}").format(subnet_prefix=subnet_prefix, pkey=pkey)) - return (k, subnet_prefix, low, high) - - def __add(self, pkey, subnet_prefix, serange, type): -@@ -1384,44 +1384,44 @@ class ibpkeyRecords(semanageRecords): - - (rc, exists) = semanage_ibpkey_exists(self.sh, k) - if rc < 0: -- raise ValueError(_("Could not check if ibpkey %s/%s is defined") % (subnet_prefix, pkey)) -+ raise ValueError(_("Could not check if ibpkey {subnet_prefix}/{pkey} is defined").formnat(subnet_prefix=subnet_prefix, pkey=pkey)) - if exists: -- raise ValueError(_("ibpkey %s/%s already defined") % (subnet_prefix, pkey)) -+ raise ValueError(_("ibpkey {subnet_prefix}/{pkey} already defined").format(subnet_prefix=subnet_prefix, pkey=pkey)) - - (rc, p) = semanage_ibpkey_create(self.sh) - if rc < 0: -- raise ValueError(_("Could not create ibpkey for %s/%s") % (subnet_prefix, pkey)) -+ raise ValueError(_("Could not create ibpkey for {subnet_prefix}/{pkey}").format(subnet_prefix=subnet_prefix, pkey=pkey)) - - semanage_ibpkey_set_subnet_prefix(self.sh, p, subnet_prefix) - semanage_ibpkey_set_range(p, low, high) - (rc, con) = semanage_context_create(self.sh) - if rc < 0: -- raise ValueError(_("Could not create context for %s/%s") % (subnet_prefix, pkey)) -+ raise ValueError(_("Could not create context for {subnet_prefix}/{pkey}").format(subnet_prefix=subnet_prefix, pkey=pkey)) - - rc = semanage_context_set_user(self.sh, con, "system_u") - if rc < 0: -- raise ValueError(_("Could not set user in ibpkey context for %s/%s") % (subnet_prefix, pkey)) -+ raise ValueError(_("Could not set user in ibpkey context for {subnet_prefix}/{pkey}").format(subnet_prefix=subnet_prefix, pkey=pkey)) - - rc = semanage_context_set_role(self.sh, con, "object_r") - if rc < 0: -- raise ValueError(_("Could not set role in ibpkey context for %s/%s") % (subnet_prefix, pkey)) -+ raise ValueError(_("Could not set role in ibpkey context for {subnet_prefix}/{pkey}").format(subnet_prefix=subnet_prefix, pkey=pkey)) - - rc = semanage_context_set_type(self.sh, con, type) - if rc < 0: -- raise ValueError(_("Could not set type in ibpkey context for %s/%s") % (subnet_prefix, pkey)) -+ raise ValueError(_("Could not set type in ibpkey context for {subnet_prefix}/{pkey}").format(subnet_prefix=subnet_prefix, pkey=pkey)) - - if (is_mls_enabled == 1) and (serange != ""): - rc = semanage_context_set_mls(self.sh, con, serange) - if rc < 0: -- raise ValueError(_("Could not set mls fields in ibpkey context for %s/%s") % (subnet_prefix, pkey)) -+ raise ValueError(_("Could not set mls fields in ibpkey context for {subnet_prefix}/{pkey}").format(subnet_prefix=subnet_prefix, pkey=pkey)) - - rc = semanage_ibpkey_set_con(self.sh, p, con) - if rc < 0: -- raise ValueError(_("Could not set ibpkey context for %s/%s") % (subnet_prefix, pkey)) -+ raise ValueError(_("Could not set ibpkey context for {subnet_prefix}/{pkey}").format(subnet_prefix=subnet_prefix, pkey=pkey)) - - rc = semanage_ibpkey_modify_local(self.sh, k, p) - if rc < 0: -- raise ValueError(_("Could not add ibpkey %s/%s") % (subnet_prefix, pkey)) -+ raise ValueError(_("Could not add ibpkey {subnet_prefix}/{pkey}").format(subnet_prefix=subnet_prefix, pkey=pkey)) - - semanage_context_free(con) - semanage_ibpkey_key_free(k) -@@ -1448,13 +1448,13 @@ class ibpkeyRecords(semanageRecords): - - (rc, exists) = semanage_ibpkey_exists(self.sh, k) - if rc < 0: -- raise ValueError(_("Could not check if ibpkey %s/%s is defined") % (subnet_prefix, pkey)) -+ raise ValueError(_("Could not check if ibpkey {subnet_prefix}/{pkey} is defined").format(subnet_prefix=subnet_prefix, pkey=pkey)) - if not exists: -- raise ValueError(_("ibpkey %s/%s is not defined") % (subnet_prefix, pkey)) -+ raise ValueError(_("ibpkey {subnet_prefix}/{pkey} is not defined").format(subnet_prefix=subnet_prefix, pkey=pkey)) - - (rc, p) = semanage_ibpkey_query(self.sh, k) - if rc < 0: -- raise ValueError(_("Could not query ibpkey %s/%s") % (subnet_prefix, pkey)) -+ raise ValueError(_("Could not query ibpkey {subnet_prefix}/{pkey}").format(subnet_prefix=subnet_prefix, pkey=pkey)) - - con = semanage_ibpkey_get_con(p) - -@@ -1465,7 +1465,7 @@ class ibpkeyRecords(semanageRecords): - - rc = semanage_ibpkey_modify_local(self.sh, k, p) - if rc < 0: -- raise ValueError(_("Could not modify ibpkey %s/%s") % (subnet_prefix, pkey)) -+ raise ValueError(_("Could not modify ibpkey {subnet_prefix}/{pkey}").format(subnet_prefix=subnet_prefix, pkey=pkey)) - - semanage_ibpkey_key_free(k) - semanage_ibpkey_free(p) -@@ -1502,19 +1502,19 @@ class ibpkeyRecords(semanageRecords): - (k, subnet_prefix, low, high) = self.__genkey(pkey, subnet_prefix) - (rc, exists) = semanage_ibpkey_exists(self.sh, k) - if rc < 0: -- raise ValueError(_("Could not check if ibpkey %s/%s is defined") % (subnet_prefix, pkey)) -+ raise ValueError(_("Could not check if ibpkey {subnet_prefix}/{pkey} is defined").format(subnet_prefix=subnet_prefix, pkey=pkey)) - if not exists: -- raise ValueError(_("ibpkey %s/%s is not defined") % (subnet_prefix, pkey)) -+ raise ValueError(_("ibpkey {subnet_prefix}/{pkey} is not defined").format(subnet_prefix=subnet_prefix, pkey=pkey)) - - (rc, exists) = semanage_ibpkey_exists_local(self.sh, k) - if rc < 0: -- raise ValueError(_("Could not check if ibpkey %s/%s is defined") % (subnet_prefix, pkey)) -+ raise ValueError(_("Could not check if ibpkey {subnet_prefix}/{pkey} is defined").format(subnet_prefix=subnet_prefix, pkey=pkey)) - if not exists: -- raise ValueError(_("ibpkey %s/%s is defined in policy, cannot be deleted") % (subnet_prefix, pkey)) -+ raise ValueError(_("ibpkey {subnet_prefix}/{pkey} is defined in policy, cannot be deleted").format(subnet_prefix=subnet_prefix, pkey=pkey)) - - rc = semanage_ibpkey_del_local(self.sh, k) - if rc < 0: -- raise ValueError(_("Could not delete ibpkey %s/%s") % (subnet_prefix, pkey)) -+ raise ValueError(_("Could not delete ibpkey {subnet_prefix}/{pkey}").format(subnet_prefix=subnet_prefix, pkey=pkey)) - - semanage_ibpkey_key_free(k) - -@@ -1617,7 +1617,7 @@ class ibendportRecords(semanageRecords): - - (rc, k) = semanage_ibendport_key_create(self.sh, ibdev_name, port) - if rc < 0: -- raise ValueError(_("Could not create a key for ibendport %s/%s") % (ibdev_name, ibendport)) -+ raise ValueError(_("Could not create a key for ibendport {ibdev_name}/{ibendport}").format(ibdev_name=ibdev_name, ibendport=ibendport)) - return (k, ibdev_name, port) - - def __add(self, ibendport, ibdev_name, serange, type): -@@ -1638,44 +1638,44 @@ class ibendportRecords(semanageRecords): - - (rc, exists) = semanage_ibendport_exists(self.sh, k) - if rc < 0: -- raise ValueError(_("Could not check if ibendport %s/%s is defined") % (ibdev_name, port)) -+ raise ValueError(_("Could not check if ibendport {ibdev_name}/{port} is defined").format(ibdev_name=ibdev_name, port=port)) - if exists: -- raise ValueError(_("ibendport %s/%s already defined") % (ibdev_name, port)) -+ raise ValueError(_("ibendport {ibdev_name}/{port} already defined").format(ibdev_name=ibdev_name, port=port)) - - (rc, p) = semanage_ibendport_create(self.sh) - if rc < 0: -- raise ValueError(_("Could not create ibendport for %s/%s") % (ibdev_name, port)) -+ raise ValueError(_("Could not create ibendport for {ibdev_name}/{port}").format(ibdev_name=ibdev_name, port=port)) - - semanage_ibendport_set_ibdev_name(self.sh, p, ibdev_name) - semanage_ibendport_set_port(p, port) - (rc, con) = semanage_context_create(self.sh) - if rc < 0: -- raise ValueError(_("Could not create context for %s/%s") % (ibdev_name, port)) -+ raise ValueError(_("Could not create context for {ibendport}/{port}").format(ibdev_name=ibdev_name, port=port)) - - rc = semanage_context_set_user(self.sh, con, "system_u") - if rc < 0: -- raise ValueError(_("Could not set user in ibendport context for %s/%s") % (ibdev_name, port)) -+ raise ValueError(_("Could not set user in ibendport context for {ibdev_name}/{port}").format(ibdev_name=ibdev_name, port=port)) - - rc = semanage_context_set_role(self.sh, con, "object_r") - if rc < 0: -- raise ValueError(_("Could not set role in ibendport context for %s/%s") % (ibdev_name, port)) -+ raise ValueError(_("Could not set role in ibendport context for {ibdev_name}/{port}").format(ibdev_name=ibdev_name, port=port)) - - rc = semanage_context_set_type(self.sh, con, type) - if rc < 0: -- raise ValueError(_("Could not set type in ibendport context for %s/%s") % (ibdev_name, port)) -+ raise ValueError(_("Could not set type in ibendport context for {ibdev_name}/{port}").format(ibdev_name=ibdev_name, port=port)) - - if (is_mls_enabled == 1) and (serange != ""): - rc = semanage_context_set_mls(self.sh, con, serange) - if rc < 0: -- raise ValueError(_("Could not set mls fields in ibendport context for %s/%s") % (ibdev_name, port)) -+ raise ValueError(_("Could not set mls fields in ibendport context for {ibdev_name}/{port}").format(ibdev_name=ibdev_name, port=port)) - - rc = semanage_ibendport_set_con(self.sh, p, con) - if rc < 0: -- raise ValueError(_("Could not set ibendport context for %s/%s") % (ibdev_name, port)) -+ raise ValueError(_("Could not set ibendport context for {ibdev_name}/{port}").format(ibdev_name=ibdev_name, port=port)) - - rc = semanage_ibendport_modify_local(self.sh, k, p) - if rc < 0: -- raise ValueError(_("Could not add ibendport %s/%s") % (ibdev_name, port)) -+ raise ValueError(_("Could not add ibendport {ibdev_name}/{port}").format(ibdev_name=ibdev_name, port=port)) - - semanage_context_free(con) - semanage_ibendport_key_free(k) -@@ -1702,13 +1702,13 @@ class ibendportRecords(semanageRecords): - - (rc, exists) = semanage_ibendport_exists(self.sh, k) - if rc < 0: -- raise ValueError(_("Could not check if ibendport %s/%s is defined") % (ibdev_name, ibendport)) -+ raise ValueError(_("Could not check if ibendport {ibdev_name}/{ibendport} is defined").format(ibdev_name=ibdev_name, ibendport=ibendport)) - if not exists: -- raise ValueError(_("ibendport %s/%s is not defined") % (ibdev_name, ibendport)) -+ raise ValueError(_("ibendport {ibdev_name}/{ibendport} is not defined").format(ibdev_name=ibdev_name, ibendport=ibendport)) - - (rc, p) = semanage_ibendport_query(self.sh, k) - if rc < 0: -- raise ValueError(_("Could not query ibendport %s/%s") % (ibdev_name, ibendport)) -+ raise ValueError(_("Could not query ibendport {ibdev_name}/{ibendport}").format(ibdev_name=ibdev_name, ibendport=ibendport)) - - con = semanage_ibendport_get_con(p) - -@@ -1719,7 +1719,7 @@ class ibendportRecords(semanageRecords): - - rc = semanage_ibendport_modify_local(self.sh, k, p) - if rc < 0: -- raise ValueError(_("Could not modify ibendport %s/%s") % (ibdev_name, ibendport)) -+ raise ValueError(_("Could not modify ibendport {ibdev_name}/{ibendport}").format(ibdev_name=ibdev_name, ibendport=ibendport)) - - semanage_ibendport_key_free(k) - semanage_ibendport_free(p) -@@ -1741,11 +1741,11 @@ class ibendportRecords(semanageRecords): - port = semanage_ibendport_get_port(ibendport) - (k, ibdev_name, port) = self.__genkey(str(port), ibdev_name) - if rc < 0: -- raise ValueError(_("Could not create a key for %s/%d") % (ibdevname, port)) -+ raise ValueError(_("Could not create a key for {ibdev_name}/{port}").format(ibdev_name=ibdev_name, port=port)) - - rc = semanage_ibendport_del_local(self.sh, k) - if rc < 0: -- raise ValueError(_("Could not delete the ibendport %s/%d") % (ibdev_name, port)) -+ raise ValueError(_("Could not delete the ibendport {ibdev_name}/{port}").format(ibdev_name=ibdev_name, port=port)) - semanage_ibendport_key_free(k) - - self.commit() -@@ -1754,19 +1754,19 @@ class ibendportRecords(semanageRecords): - (k, ibdev_name, port) = self.__genkey(ibendport, ibdev_name) - (rc, exists) = semanage_ibendport_exists(self.sh, k) - if rc < 0: -- raise ValueError(_("Could not check if ibendport %s/%s is defined") % (ibdev_name, ibendport)) -+ raise ValueError(_("Could not check if ibendport {ibdev_name}/{ibendport} is defined").format(ibdev_name=ibdev_name, ibendport=ibendport)) - if not exists: -- raise ValueError(_("ibendport %s/%s is not defined") % (ibdev_name, ibendport)) -+ raise ValueError(_("ibendport {ibdev_name}/{ibendport} is not defined").format(ibdev_name=ibdev_name, ibendport=ibendport)) - - (rc, exists) = semanage_ibendport_exists_local(self.sh, k) - if rc < 0: -- raise ValueError(_("Could not check if ibendport %s/%s is defined") % (ibdev_name, ibendport)) -+ raise ValueError(_("Could not check if ibendport {ibdev_name}/{ibendport} is defined").format(ibdev_name=ibdev_name, ibendport=ibendport)) - if not exists: -- raise ValueError(_("ibendport %s/%s is defined in policy, cannot be deleted") % (ibdev_name, ibendport)) -+ raise ValueError(_("ibendport {ibdev_name}/{ibendport} is defined in policy, cannot be deleted").format(ibdev_name=ibdev_name, ibendport=ibendport)) - - rc = semanage_ibendport_del_local(self.sh, k) - if rc < 0: -- raise ValueError(_("Could not delete ibendport %s/%s") % (ibdev_name, ibendport)) -+ raise ValueError(_("Could not delete ibendport {ibdev_name}/{ibendport}").format(ibdev_name=ibdev_name, ibendport=ibendport)) - - semanage_ibendport_key_free(k) - -@@ -2765,7 +2765,7 @@ class booleanRecords(semanageRecords): - try: - boolname, val = b.split("=") - except ValueError: -- raise ValueError(_("Bad format %s: Record %s" % (name, b))) -+ raise ValueError(_("Bad format {filename}: Record {record}").format(filename=name, record=b)) - self.__mod(boolname.strip(), val.strip()) - fd.close() - else: --- -2.41.0 - diff --git a/SOURCES/0018-python-semanage-Allow-modifying-records-on-add.patch b/SOURCES/0018-python-semanage-Allow-modifying-records-on-add.patch new file mode 100644 index 0000000..68e5efb --- /dev/null +++ b/SOURCES/0018-python-semanage-Allow-modifying-records-on-add.patch @@ -0,0 +1,396 @@ +From 78e4c9f2c2e97d23a67254647339d3c75bb7986d Mon Sep 17 00:00:00 2001 +From: Vit Mojzis +Date: Wed, 14 Feb 2024 13:08:40 +0100 +Subject: [PATCH] python/semanage: Allow modifying records on "add" +Content-type: text/plain + +When trying to add a record with a key that already exists, modify +the existing record instead. + +Also, fix "semanage -m -e" (add_equal was called instead of +modify_equal), which meant that existing local equivalency couldn't be +modified (though a user could remove it and add a modified +equivalency). + +Fixes: + https://github.com/SELinuxProject/selinux/issues/412 + When a port or login definition present in the policy is modified + using "semanage port -m", "semanage export" exports the command as + "port -a" instead of "port -m". This results in "semanage import" + failing (port already defined). The same is true for port, user, + login, ibpkey, ibendport, node, interface and fcontext. + +Signed-off-by: Vit Mojzis +--- + python/semanage/semanage | 2 +- + python/semanage/seobject.py | 208 +++++++++++++++++++++++++----------- + 2 files changed, 147 insertions(+), 63 deletions(-) + +diff --git a/python/semanage/semanage b/python/semanage/semanage +index 4fdb490f7df4..b269b9fca65b 100644 +--- a/python/semanage/semanage ++++ b/python/semanage/semanage +@@ -322,7 +322,7 @@ def handleFcontext(args): + OBJECT.add(args.file_spec, args.type, args.ftype, args.range, args.seuser) + if args.action == "modify": + if args.equal: +- OBJECT.add_equal(args.file_spec, args.equal) ++ OBJECT.modify_equal(args.file_spec, args.equal) + else: + OBJECT.modify(args.file_spec, args.type, args.ftype, args.range, args.seuser) + if args.action == "delete": +diff --git a/python/semanage/seobject.py b/python/semanage/seobject.py +index cc944ae202c9..12133b53fe91 100644 +--- a/python/semanage/seobject.py ++++ b/python/semanage/seobject.py +@@ -557,11 +557,6 @@ class loginRecords(semanageRecords): + if rc < 0: + raise ValueError(_("Could not create a key for %s") % name) + +- (rc, exists) = semanage_seuser_exists(self.sh, k) +- if rc < 0: +- raise ValueError(_("Could not check if login mapping for %s is defined") % name) +- if exists: +- raise ValueError(_("Login mapping for %s is already defined") % name) + if name[0] == '%': + try: + grp.getgrnam(name[1:]) +@@ -600,11 +595,29 @@ class loginRecords(semanageRecords): + def add(self, name, sename, serange): + try: + self.begin() +- self.__add(name, sename, serange) ++ # Add a new mapping, or modify an existing one ++ if self.__exists(name): ++ print(_("Login mapping for %s is already defined, modifying instead") % name) ++ self.__modify(name, sename, serange) ++ else: ++ self.__add(name, sename, serange) + self.commit() + except ValueError as error: + raise error + ++ # check if login mapping for given user exists ++ def __exists(self, name): ++ (rc, k) = semanage_seuser_key_create(self.sh, name) ++ if rc < 0: ++ raise ValueError(_("Could not create a key for %s") % name) ++ ++ (rc, exists) = semanage_seuser_exists(self.sh, k) ++ if rc < 0: ++ raise ValueError(_("Could not check if login mapping for %s is defined") % name) ++ semanage_seuser_key_free(k) ++ ++ return exists ++ + def __modify(self, name, sename="", serange=""): + rec, self.oldsename, self.oldserange = selinux.getseuserbyname(name) + if sename == "" and serange == "": +@@ -821,12 +834,6 @@ class seluserRecords(semanageRecords): + if rc < 0: + raise ValueError(_("Could not create a key for %s") % name) + +- (rc, exists) = semanage_user_exists(self.sh, k) +- if rc < 0: +- raise ValueError(_("Could not check if SELinux user %s is defined") % name) +- if exists: +- raise ValueError(_("SELinux user %s is already defined") % name) +- + (rc, u) = semanage_user_create(self.sh) + if rc < 0: + raise ValueError(_("Could not create SELinux user for %s") % name) +@@ -866,12 +873,28 @@ class seluserRecords(semanageRecords): + def add(self, name, roles, selevel, serange, prefix): + try: + self.begin() +- self.__add(name, roles, selevel, serange, prefix) ++ if self.__exists(name): ++ print(_("SELinux user %s is already defined, modifying instead") % name) ++ self.__modify(name, roles, selevel, serange, prefix) ++ else: ++ self.__add(name, roles, selevel, serange, prefix) + self.commit() + except ValueError as error: + self.mylog.commit(0) + raise error + ++ def __exists(self, name): ++ (rc, k) = semanage_user_key_create(self.sh, name) ++ if rc < 0: ++ raise ValueError(_("Could not create a key for %s") % name) ++ ++ (rc, exists) = semanage_user_exists(self.sh, k) ++ if rc < 0: ++ raise ValueError(_("Could not check if SELinux user %s is defined") % name) ++ semanage_user_key_free(k) ++ ++ return exists ++ + def __modify(self, name, roles=[], selevel="", serange="", prefix=""): + oldserole = "" + oldserange = "" +@@ -1103,12 +1126,6 @@ class portRecords(semanageRecords): + + (k, proto_d, low, high) = self.__genkey(port, proto) + +- (rc, exists) = semanage_port_exists(self.sh, k) +- if rc < 0: +- raise ValueError(_("Could not check if port {proto}/{port} is defined").format(proto=proto, port=port)) +- if exists: +- raise ValueError(_("Port {proto}/{port} already defined").format(proto=proto, port=port)) +- + (rc, p) = semanage_port_create(self.sh) + if rc < 0: + raise ValueError(_("Could not create port for {proto}/{port}").format(proto=proto, port=port)) +@@ -1152,9 +1169,23 @@ class portRecords(semanageRecords): + + def add(self, port, proto, serange, type): + self.begin() +- self.__add(port, proto, serange, type) ++ if self.__exists(port, proto): ++ print(_("Port {proto}/{port} already defined, modifying instead").format(proto=proto, port=port)) ++ self.__modify(port, proto, serange, type) ++ else: ++ self.__add(port, proto, serange, type) + self.commit() + ++ def __exists(self, port, proto): ++ (k, proto_d, low, high) = self.__genkey(port, proto) ++ ++ (rc, exists) = semanage_port_exists(self.sh, k) ++ if rc < 0: ++ raise ValueError(_("Could not check if port {proto}/{port} is defined").format(proto=proto, port=port)) ++ semanage_port_key_free(k) ++ ++ return exists ++ + def __modify(self, port, proto, serange, setype): + if serange == "" and setype == "": + if is_mls_enabled == 1: +@@ -1377,12 +1408,6 @@ class ibpkeyRecords(semanageRecords): + + (k, subnet_prefix, low, high) = self.__genkey(pkey, subnet_prefix) + +- (rc, exists) = semanage_ibpkey_exists(self.sh, k) +- if rc < 0: +- raise ValueError(_("Could not check if ibpkey {subnet_prefix}/{pkey} is defined").formnat(subnet_prefix=subnet_prefix, pkey=pkey)) +- if exists: +- raise ValueError(_("ibpkey {subnet_prefix}/{pkey} already defined").format(subnet_prefix=subnet_prefix, pkey=pkey)) +- + (rc, p) = semanage_ibpkey_create(self.sh) + if rc < 0: + raise ValueError(_("Could not create ibpkey for {subnet_prefix}/{pkey}").format(subnet_prefix=subnet_prefix, pkey=pkey)) +@@ -1424,9 +1449,23 @@ class ibpkeyRecords(semanageRecords): + + def add(self, pkey, subnet_prefix, serange, type): + self.begin() +- self.__add(pkey, subnet_prefix, serange, type) ++ if self.__exists(pkey, subnet_prefix): ++ print(_("ibpkey {subnet_prefix}/{pkey} already defined, modifying instead").format(subnet_prefix=subnet_prefix, pkey=pkey)) ++ self.__modify(pkey, subnet_prefix, serange, type) ++ else: ++ self.__add(pkey, subnet_prefix, serange, type) + self.commit() + ++ def __exists(self, pkey, subnet_prefix): ++ (k, subnet_prefix, low, high) = self.__genkey(pkey, subnet_prefix) ++ ++ (rc, exists) = semanage_ibpkey_exists(self.sh, k) ++ if rc < 0: ++ raise ValueError(_("Could not check if ibpkey {subnet_prefix}/{pkey} is defined").formnat(subnet_prefix=subnet_prefix, pkey=pkey)) ++ semanage_ibpkey_key_free(k) ++ ++ return exists ++ + def __modify(self, pkey, subnet_prefix, serange, setype): + if serange == "" and setype == "": + if is_mls_enabled == 1: +@@ -1631,12 +1670,6 @@ class ibendportRecords(semanageRecords): + raise ValueError(_("Type %s is invalid, must be an ibendport type") % type) + (k, ibendport, port) = self.__genkey(ibendport, ibdev_name) + +- (rc, exists) = semanage_ibendport_exists(self.sh, k) +- if rc < 0: +- raise ValueError(_("Could not check if ibendport {ibdev_name}/{port} is defined").format(ibdev_name=ibdev_name, port=port)) +- if exists: +- raise ValueError(_("ibendport {ibdev_name}/{port} already defined").format(ibdev_name=ibdev_name, port=port)) +- + (rc, p) = semanage_ibendport_create(self.sh) + if rc < 0: + raise ValueError(_("Could not create ibendport for {ibdev_name}/{port}").format(ibdev_name=ibdev_name, port=port)) +@@ -1678,9 +1711,23 @@ class ibendportRecords(semanageRecords): + + def add(self, ibendport, ibdev_name, serange, type): + self.begin() +- self.__add(ibendport, ibdev_name, serange, type) ++ if self.__exists(ibendport, ibdev_name): ++ print(_("ibendport {ibdev_name}/{port} already defined, modifying instead").format(ibdev_name=ibdev_name, port=port)) ++ self.__modify(ibendport, ibdev_name, serange, type) ++ else: ++ self.__add(ibendport, ibdev_name, serange, type) + self.commit() + ++ def __exists(self, ibendport, ibdev_name): ++ (k, ibendport, port) = self.__genkey(ibendport, ibdev_name) ++ ++ (rc, exists) = semanage_ibendport_exists(self.sh, k) ++ if rc < 0: ++ raise ValueError(_("Could not check if ibendport {ibdev_name}/{port} is defined").format(ibdev_name=ibdev_name, port=port)) ++ semanage_ibendport_key_free(k) ++ ++ return exists ++ + def __modify(self, ibendport, ibdev_name, serange, setype): + if serange == "" and setype == "": + if is_mls_enabled == 1: +@@ -1902,12 +1949,6 @@ class nodeRecords(semanageRecords): + if rc < 0: + raise ValueError(_("Could not create key for %s") % addr) + +- (rc, exists) = semanage_node_exists(self.sh, k) +- if rc < 0: +- raise ValueError(_("Could not check if addr %s is defined") % addr) +- if exists: +- raise ValueError(_("Addr %s already defined") % addr) +- + (rc, node) = semanage_node_create(self.sh) + if rc < 0: + raise ValueError(_("Could not create addr for %s") % addr) +@@ -1955,9 +1996,27 @@ class nodeRecords(semanageRecords): + + def add(self, addr, mask, proto, serange, ctype): + self.begin() +- self.__add(addr, mask, proto, serange, ctype) ++ if self.__exists(addr, mask, proto): ++ print(_("Addr %s already defined, modifying instead") % addr) ++ self.__modify(addr, mask, proto, serange, ctype) ++ else: ++ self.__add(addr, mask, proto, serange, ctype) + self.commit() + ++ def __exists(self, addr, mask, proto): ++ addr, mask, proto, audit_proto = self.validate(addr, mask, proto) ++ ++ (rc, k) = semanage_node_key_create(self.sh, addr, mask, proto) ++ if rc < 0: ++ raise ValueError(_("Could not create key for %s") % addr) ++ ++ (rc, exists) = semanage_node_exists(self.sh, k) ++ if rc < 0: ++ raise ValueError(_("Could not check if addr %s is defined") % addr) ++ semanage_node_key_free(k) ++ ++ return exists ++ + def __modify(self, addr, mask, proto, serange, setype): + addr, mask, proto, audit_proto = self.validate(addr, mask, proto) + +@@ -2111,12 +2170,6 @@ class interfaceRecords(semanageRecords): + if rc < 0: + raise ValueError(_("Could not create key for %s") % interface) + +- (rc, exists) = semanage_iface_exists(self.sh, k) +- if rc < 0: +- raise ValueError(_("Could not check if interface %s is defined") % interface) +- if exists: +- raise ValueError(_("Interface %s already defined") % interface) +- + (rc, iface) = semanage_iface_create(self.sh) + if rc < 0: + raise ValueError(_("Could not create interface for %s") % interface) +@@ -2163,9 +2216,25 @@ class interfaceRecords(semanageRecords): + + def add(self, interface, serange, ctype): + self.begin() +- self.__add(interface, serange, ctype) ++ if self.__exists(interface): ++ print(_("Interface %s already defined, modifying instead") % interface) ++ self.__modify(interface, serange, ctype) ++ else: ++ self.__add(interface, serange, ctype) + self.commit() + ++ def __exists(self, interface): ++ (rc, k) = semanage_iface_key_create(self.sh, interface) ++ if rc < 0: ++ raise ValueError(_("Could not create key for %s") % interface) ++ ++ (rc, exists) = semanage_iface_exists(self.sh, k) ++ if rc < 0: ++ raise ValueError(_("Could not check if interface %s is defined") % interface) ++ semanage_iface_key_free(k) ++ ++ return exists ++ + def __modify(self, interface, serange, setype): + if serange == "" and setype == "": + raise ValueError(_("Requires setype or serange")) +@@ -2353,7 +2422,13 @@ class fcontextRecords(semanageRecords): + raise ValueError(_("Substitute %s is not valid. Substitute is not allowed to end with '/'") % substitute) + + if target in self.equiv.keys(): +- raise ValueError(_("Equivalence class for %s already exists") % target) ++ print(_("Equivalence class for %s already exists, modifying instead") % target) ++ self.equiv[target] = substitute ++ self.equal_ind = True ++ self.mylog.log_change("resrc=fcontext op=modify-equal %s %s" % (audit.audit_encode_nv_string("sglob", target, 0), audit.audit_encode_nv_string("tglob", substitute, 0))) ++ self.commit() ++ return ++ + self.validate(target) + + for fdict in (self.equiv, self.equiv_dist): +@@ -2429,18 +2504,6 @@ class fcontextRecords(semanageRecords): + if rc < 0: + raise ValueError(_("Could not create key for %s") % target) + +- (rc, exists) = semanage_fcontext_exists(self.sh, k) +- if rc < 0: +- raise ValueError(_("Could not check if file context for %s is defined") % target) +- +- if not exists: +- (rc, exists) = semanage_fcontext_exists_local(self.sh, k) +- if rc < 0: +- raise ValueError(_("Could not check if file context for %s is defined") % target) +- +- if exists: +- raise ValueError(_("File context for %s already defined") % target) +- + (rc, fcontext) = semanage_fcontext_create(self.sh) + if rc < 0: + raise ValueError(_("Could not create file context for %s") % target) +@@ -2479,9 +2542,30 @@ class fcontextRecords(semanageRecords): + + def add(self, target, type, ftype="", serange="", seuser="system_u"): + self.begin() +- self.__add(target, type, ftype, serange, seuser) ++ if self.__exists(target, ftype): ++ print(_("File context for %s already defined, modifying instead") % target) ++ self.__modify(target, type, ftype, serange, seuser) ++ else: ++ self.__add(target, type, ftype, serange, seuser) + self.commit() + ++ def __exists(self, target, ftype): ++ (rc, k) = semanage_fcontext_key_create(self.sh, target, file_types[ftype]) ++ if rc < 0: ++ raise ValueError(_("Could not create key for %s") % target) ++ ++ (rc, exists) = semanage_fcontext_exists(self.sh, k) ++ if rc < 0: ++ raise ValueError(_("Could not check if file context for %s is defined") % target) ++ ++ if not exists: ++ (rc, exists) = semanage_fcontext_exists_local(self.sh, k) ++ if rc < 0: ++ raise ValueError(_("Could not check if file context for %s is defined") % target) ++ semanage_fcontext_key_free(k) ++ ++ return exists ++ + def __modify(self, target, setype, ftype, serange, seuser): + if serange == "" and setype == "" and seuser == "": + raise ValueError(_("Requires setype, serange or seuser")) +-- +2.43.2 + diff --git a/SOURCES/0019-python-Drop-hard-formating-from-localized-strings.patch b/SOURCES/0019-python-Drop-hard-formating-from-localized-strings.patch deleted file mode 100644 index a1543f1..0000000 --- a/SOURCES/0019-python-Drop-hard-formating-from-localized-strings.patch +++ /dev/null @@ -1,148 +0,0 @@ -From 9001fe7d0d4007b5dac28422f46a9a605efefc0a Mon Sep 17 00:00:00 2001 -From: Petr Lautrbach -Date: Wed, 17 May 2023 12:18:54 +0200 -Subject: [PATCH] python: Drop hard formating from localized strings -Content-type: text/plain - -It confuses translators and new lines are dropped by parser module anyway. - -Signed-off-by: Petr Lautrbach ---- - python/audit2allow/audit2allow | 14 ++++++-- - python/semanage/semanage | 60 +++++++++++++--------------------- - 2 files changed, 34 insertions(+), 40 deletions(-) - -diff --git a/python/audit2allow/audit2allow b/python/audit2allow/audit2allow -index 5587a2dbb006..35b0b151ac86 100644 ---- a/python/audit2allow/audit2allow -+++ b/python/audit2allow/audit2allow -@@ -234,9 +234,17 @@ class AuditToPolicy: - print(e) - sys.exit(1) - -- sys.stdout.write(_("******************** IMPORTANT ***********************\n")) -- sys.stdout.write((_("To make this policy package active, execute:" + -- "\n\nsemodule -i %s\n\n") % packagename)) -+ sys.stdout.write( -+"""******************** {important} *********************** -+{text} -+ -+semodule -i {packagename} -+ -+""".format( -+ important=_("IMPORTANT"), -+ text=_("To make this policy package active, execute:"), -+ packagename=packagename -+)) - - def __output_audit2why(self): - import selinux -diff --git a/python/semanage/semanage b/python/semanage/semanage -index e0bd98a95c77..4fdb490f7df4 100644 ---- a/python/semanage/semanage -+++ b/python/semanage/semanage -@@ -238,30 +238,22 @@ def parser_add_level(parser, name): - - - def parser_add_range(parser, name): -- parser.add_argument('-r', '--range', default='', -- help=_(''' --MLS/MCS Security Range (MLS/MCS Systems only) --SELinux Range for SELinux login mapping --defaults to the SELinux user record range. --SELinux Range for SELinux user defaults to s0. --''')) -+ parser.add_argument('-r', '--range', default='', help=_( -+ "MLS/MCS Security Range (MLS/MCS Systems only) SELinux Range for SELinux login mapping defaults to the SELinux user record range. \ -+SELinux Range for SELinux user defaults to s0." -+ )) - - - def parser_add_proto(parser, name): -- parser.add_argument('-p', '--proto', help=_(''' -- Protocol for the specified port (tcp|udp|dccp|sctp) or internet protocol -- version for the specified node (ipv4|ipv6). --''')) -+ parser.add_argument('-p', '--proto', help=_( -+ "Protocol for the specified port (tcp|udp|dccp|sctp) or internet protocol version for the specified node (ipv4|ipv6)." -+ )) - - def parser_add_subnet_prefix(parser, name): -- parser.add_argument('-x', '--subnet_prefix', help=_(''' -- Subnet prefix for the specified infiniband ibpkey. --''')) -+ parser.add_argument('-x', '--subnet_prefix', help=_('Subnet prefix for the specified infiniband ibpkey.')) - - def parser_add_ibdev_name(parser, name): -- parser.add_argument('-z', '--ibdev_name', help=_(''' -- Name for the specified infiniband end port. --''')) -+ parser.add_argument('-z', '--ibdev_name', help=_("Name for the specified infiniband end port.")) - - def parser_add_modify(parser, name): - parser.add_argument('-m', '--modify', dest='action', action='store_const', const='modify', help=_("Modify a record of the %s object type") % name) -@@ -348,15 +340,6 @@ def handleFcontext(args): - - - def setupFcontextParser(subparsers): -- ftype_help = ''' --File Type. This is used with fcontext. Requires a file type --as shown in the mode field by ls, e.g. use d to match only --directories or f to match only regular files. The following --file type options can be passed: --f (regular file),d (directory),c (character device), --b (block device),s (socket),l (symbolic link),p (named pipe) --If you do not specify a file type, the file type will default to "all files". --''' - generate_usage = generate_custom_usage(usage_fcontext, usage_fcontext_dict) - fcontextParser = subparsers.add_parser('fcontext', usage=generate_usage, help=_("Manage file context mapping definitions")) - parser_add_locallist(fcontextParser, "fcontext") -@@ -372,11 +355,16 @@ If you do not specify a file type, the file type will default to "all files". - parser_add_extract(fcontext_action, "fcontext") - parser_add_deleteall(fcontext_action, "fcontext") - -- fcontextParser.add_argument('-e', '--equal', help=_('''Substitute target path with sourcepath when generating default -- label. This is used with fcontext. Requires source and target -- path arguments. The context labeling for the target subtree is -- made equivalent to that defined for the source.''')) -- fcontextParser.add_argument('-f', '--ftype', default="", choices=["a", "f", "d", "c", "b", "s", "l", "p"], help=_(ftype_help)) -+ fcontextParser.add_argument('-e', '--equal', help=_( -+ 'Substitute target path with sourcepath when generating default label. This is used with fcontext. Requires source and target \ -+path arguments. The context labeling for the target subtree is made equivalent to that defined for the source.' -+ )) -+ fcontextParser.add_argument('-f', '--ftype', default="", choices=["a", "f", "d", "c", "b", "s", "l", "p"], help=_( -+ 'File Type. This is used with fcontext. Requires a file type as shown in the mode field by ls, e.g. use d to match only \ -+directories or f to match only regular files. The following file type options can be passed: f (regular file), d (directory), \ -+c (character device), b (block device), s (socket), l (symbolic link), p (named pipe). \ -+If you do not specify a file type, the file type will default to "all files".' -+ )) - parser_add_seuser(fcontextParser, "fcontext") - parser_add_type(fcontextParser, "fcontext") - parser_add_range(fcontextParser, "fcontext") -@@ -426,9 +414,7 @@ def setupUserParser(subparsers): - parser_add_range(userParser, "user") - userParser.add_argument('-R', '--roles', default=[], - action=CheckRole, -- help=_(''' --SELinux Roles. You must enclose multiple roles within quotes, separate by spaces. Or specify -R multiple times. --''')) -+ help=_("SELinux Roles. You must enclose multiple roles within quotes, separate by spaces. Or specify -R multiple times.")) - userParser.add_argument('-P', '--prefix', default="user", help=argparse.SUPPRESS) - userParser.add_argument('selinux_name', nargs='?', default=None, help=_('selinux_name')) - userParser.set_defaults(func=handleUser) -@@ -901,9 +887,9 @@ def setupImportParser(subparsers): - def createCommandParser(): - commandParser = seParser(prog='semanage', - formatter_class=argparse.ArgumentDefaultsHelpFormatter, -- description='''semanage is used to configure certain elements -- of SELinux policy with-out requiring modification -- to or recompilation from policy source.''') -+ description=_( -+ "semanage is used to configure certain elements of SELinux policy with-out requiring modification or recompilation from policy source." -+ )) - - #To add a new subcommand define the parser for it in a function above and call it here. - subparsers = commandParser.add_subparsers(dest='subcommand') --- -2.41.0 - diff --git a/SOURCES/0019-python-semanage-Do-not-sort-local-fcontext-definitio.patch b/SOURCES/0019-python-semanage-Do-not-sort-local-fcontext-definitio.patch new file mode 100644 index 0000000..d45e509 --- /dev/null +++ b/SOURCES/0019-python-semanage-Do-not-sort-local-fcontext-definitio.patch @@ -0,0 +1,64 @@ +From 616db16b5729a9473cf27edc32a03f38eca417e7 Mon Sep 17 00:00:00 2001 +From: Vit Mojzis +Date: Wed, 7 Feb 2024 15:46:23 +0100 +Subject: [PATCH] python/semanage: Do not sort local fcontext definitions +Content-type: text/plain + +Entries in file_contexts.local are processed from the most recent one to +the oldest, with first match being used. Therefore it is important to +preserve their order when listing (semanage fcontext -lC) and exporting +(semanage export). + +Signed-off-by: Vit Mojzis +--- + gui/fcontextPage.py | 6 +++++- + python/semanage/seobject.py | 9 +++++++-- + 2 files changed, 12 insertions(+), 3 deletions(-) + +diff --git a/gui/fcontextPage.py b/gui/fcontextPage.py +index 767664f26ec8..c88df580400f 100644 +--- a/gui/fcontextPage.py ++++ b/gui/fcontextPage.py +@@ -133,7 +133,11 @@ class fcontextPage(semanagePage): + self.fcontext = seobject.fcontextRecords() + self.store.clear() + fcon_dict = self.fcontext.get_all(self.local) +- for k in sorted(fcon_dict.keys()): ++ if self.local: ++ fkeys = fcon_dict.keys() ++ else: ++ fkeys = sorted(fcon_dict.keys()) ++ for k in fkeys: + if not self.match(fcon_dict, k, filter): + continue + iter = self.store.append() +diff --git a/python/semanage/seobject.py b/python/semanage/seobject.py +index dfb15b1d77e4..25ec43154848 100644 +--- a/python/semanage/seobject.py ++++ b/python/semanage/seobject.py +@@ -2735,7 +2735,7 @@ class fcontextRecords(semanageRecords): + def customized(self): + l = [] + fcon_dict = self.get_all(True) +- for k in sorted(fcon_dict.keys()): ++ for k in fcon_dict.keys(): + if fcon_dict[k]: + if fcon_dict[k][3]: + l.append("-a -f %s -t %s -r '%s' '%s'" % (file_type_str_to_option[k[1]], fcon_dict[k][2], fcon_dict[k][3], k[0])) +@@ -2752,7 +2752,12 @@ class fcontextRecords(semanageRecords): + if len(fcon_dict) != 0: + if heading: + print("%-50s %-18s %s\n" % (_("SELinux fcontext"), _("type"), _("Context"))) +- for k in sorted(fcon_dict.keys()): ++ # do not sort local customizations since they are evaluated based on the order they where added in ++ if locallist: ++ fkeys = fcon_dict.keys() ++ else: ++ fkeys = sorted(fcon_dict.keys()) ++ for k in fkeys: + if fcon_dict[k]: + if is_mls_enabled: + print("%-50s %-18s %s:%s:%s:%s " % (k[0], k[1], fcon_dict[k][0], fcon_dict[k][1], fcon_dict[k][2], translate(fcon_dict[k][3], False))) +-- +2.43.0 + diff --git a/SOURCES/0020-semanage-Drop-unnecessary-import-from-seobject.patch b/SOURCES/0020-semanage-Drop-unnecessary-import-from-seobject.patch deleted file mode 100644 index 20c38b5..0000000 --- a/SOURCES/0020-semanage-Drop-unnecessary-import-from-seobject.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 0387db55278c10e04a7a507d2e1a6d028d5de0bf Mon Sep 17 00:00:00 2001 -From: Petr Lautrbach -Date: Wed, 17 May 2023 13:09:58 +0200 -Subject: [PATCH] semanage: Drop unnecessary import from seobject -Content-type: text/plain - -sepolgen.module is not used for permissive domains - -Signed-off-by: Petr Lautrbach ---- - python/semanage/seobject.py | 5 ----- - 1 file changed, 5 deletions(-) - -diff --git a/python/semanage/seobject.py b/python/semanage/seobject.py -index 2b1eb44ce8a3..361205d11c10 100644 ---- a/python/semanage/seobject.py -+++ b/python/semanage/seobject.py -@@ -504,11 +504,6 @@ class permissiveRecords(semanageRecords): - print(t) - - def add(self, type): -- try: -- import sepolgen.module as module -- except ImportError: -- raise ValueError(_("The sepolgen python module is required to setup permissive domains.\nIn some distributions it is included in the policycoreutils-devel package.\n# yum install policycoreutils-devel\nOr similar for your distro.")) -- - name = "permissive_%s" % type - modtxt = "(typepermissive %s)" % type - --- -2.41.0 - diff --git a/SOURCES/0021-python-update-python.pot.patch b/SOURCES/0021-python-update-python.pot.patch deleted file mode 100644 index 8f489bd..0000000 --- a/SOURCES/0021-python-update-python.pot.patch +++ /dev/null @@ -1,2009 +0,0 @@ -From a478ebe9cf47557862788086c624f6671215fe27 Mon Sep 17 00:00:00 2001 -From: Petr Lautrbach -Date: Wed, 17 May 2023 13:52:22 +0200 -Subject: [PATCH] python: update python.pot -Content-type: text/plain - -Signed-off-by: Petr Lautrbach ---- - python/po/python.pot | 963 ++++++++++++++++++++++--------------------- - 1 file changed, 487 insertions(+), 476 deletions(-) - -diff --git a/python/po/python.pot b/python/po/python.pot -index 16d04eb0f18e..435a1b764e34 100644 ---- a/python/po/python.pot -+++ b/python/po/python.pot -@@ -8,7 +8,7 @@ msgid "" - msgstr "" - "Project-Id-Version: PACKAGE VERSION\n" - "Report-Msgid-Bugs-To: \n" --"POT-Creation-Date: 2023-01-18 11:57+0100\n" -+"POT-Creation-Date: 2023-06-12 18:13+0200\n" - "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" - "Last-Translator: FULL NAME \n" - "Language-Team: LANGUAGE \n" -@@ -17,17 +17,12 @@ msgstr "" - "Content-Type: text/plain; charset=UTF-8\n" - "Content-Transfer-Encoding: 8bit\n" - --#: ../audit2allow/audit2allow:239 --msgid "******************** IMPORTANT ***********************\n" -+#: ../audit2allow/audit2allow:244 -+msgid "IMPORTANT" - msgstr "" - --#: ../audit2allow/audit2allow:240 --#, python-format --msgid "" --"To make this policy package active, execute:\n" --"\n" --"semodule -i %s\n" --"\n" -+#: ../audit2allow/audit2allow:245 -+msgid "To make this policy package active, execute:" - msgstr "" - - #: ../chcat/chcat:111 ../chcat/chcat:191 -@@ -40,13 +35,13 @@ msgid "Can not modify sensitivity levels using '+' on %s" - msgstr "" - - #: ../chcat/chcat:128 --#, python-format --msgid "%s is already in %s" -+#, python-brace-format -+msgid "{target} is already in {category}" - msgstr "" - - #: ../chcat/chcat:210 ../chcat/chcat:220 --#, python-format --msgid "%s is not in %s" -+#, python-brace-format -+msgid "{target} is not in {category}" - msgstr "" - - #: ../chcat/chcat:291 ../chcat/chcat:296 -@@ -152,218 +147,222 @@ msgstr "" - - #: ../semanage/semanage:242 - msgid "" --"\n" --"MLS/MCS Security Range (MLS/MCS Systems only)\n" --"SELinux Range for SELinux login mapping\n" --"defaults to the SELinux user record range.\n" --"SELinux Range for SELinux user defaults to s0.\n" -+"MLS/MCS Security Range (MLS/MCS Systems only) SELinux Range for SELinux " -+"login mapping defaults to the SELinux user record range. SELinux Range for " -+"SELinux user defaults to s0." - msgstr "" - --#: ../semanage/semanage:251 -+#: ../semanage/semanage:249 - msgid "" --"\n" --" Protocol for the specified port (tcp|udp|dccp|sctp) or internet " --"protocol\n" --" version for the specified node (ipv4|ipv6).\n" -+"Protocol for the specified port (tcp|udp|dccp|sctp) or internet protocol " -+"version for the specified node (ipv4|ipv6)." - msgstr "" - --#: ../semanage/semanage:257 --msgid "" --"\n" --" Subnet prefix for the specified infiniband ibpkey.\n" -+#: ../semanage/semanage:253 -+msgid "Subnet prefix for the specified infiniband ibpkey." - msgstr "" - --#: ../semanage/semanage:262 --msgid "" --"\n" --" Name for the specified infiniband end port.\n" -+#: ../semanage/semanage:256 -+msgid "Name for the specified infiniband end port." - msgstr "" - --#: ../semanage/semanage:267 -+#: ../semanage/semanage:259 - #, python-format - msgid "Modify a record of the %s object type" - msgstr "" - --#: ../semanage/semanage:271 -+#: ../semanage/semanage:263 - #, python-format - msgid "List records of the %s object type" - msgstr "" - --#: ../semanage/semanage:275 -+#: ../semanage/semanage:267 - #, python-format - msgid "Delete a record of the %s object type" - msgstr "" - --#: ../semanage/semanage:279 -+#: ../semanage/semanage:271 - msgid "Extract customizable commands, for use within a transaction" - msgstr "" - --#: ../semanage/semanage:283 -+#: ../semanage/semanage:275 - #, python-format - msgid "Remove all %s objects local customizations" - msgstr "" - --#: ../semanage/semanage:287 -+#: ../semanage/semanage:279 - msgid "SELinux user name" - msgstr "" - --#: ../semanage/semanage:292 -+#: ../semanage/semanage:284 - msgid "Manage login mappings between linux users and SELinux confined users" - msgstr "" - --#: ../semanage/semanage:309 -+#: ../semanage/semanage:301 - #, python-format - msgid "login_name | %%groupname" - msgstr "" - --#: ../semanage/semanage:361 -+#: ../semanage/semanage:344 - msgid "Manage file context mapping definitions" - msgstr "" - --#: ../semanage/semanage:375 -+#: ../semanage/semanage:359 -+msgid "" -+"Substitute target path with sourcepath when generating default label. This " -+"is used with fcontext. Requires source and target path arguments. The " -+"context labeling for the target subtree is made equivalent to that defined " -+"for the source." -+msgstr "" -+ -+#: ../semanage/semanage:363 - msgid "" --"Substitute target path with sourcepath when generating default\n" --" label. " --"This is used with fcontext. Requires source and target\n" --" path " --"arguments. The context labeling for the target subtree is\n" --" made " --"equivalent to that defined for the source." -+"File Type. This is used with fcontext. Requires a file type as shown in the " -+"mode field by ls, e.g. use d to match only directories or f to match only " -+"regular files. The following file type options can be passed: f (regular " -+"file), d (directory), c (character device), b (block device), s (socket), l " -+"(symbolic link), p (named pipe). If you do not specify a file type, the file " -+"type will default to \"all files\"." - msgstr "" - --#: ../semanage/semanage:383 -+#: ../semanage/semanage:371 - msgid "" - "Path to be labeled (may be in the form of a Perl compatible regular " - "expression)" - msgstr "" - --#: ../semanage/semanage:411 -+#: ../semanage/semanage:399 - msgid "Manage SELinux confined users (Roles and levels for an SELinux user)" - msgstr "" - --#: ../semanage/semanage:429 -+#: ../semanage/semanage:417 - msgid "" --"\n" --"SELinux Roles. You must enclose multiple roles within quotes, separate by " --"spaces. Or specify -R multiple times.\n" -+"SELinux Roles. You must enclose multiple roles within quotes, separate by " -+"spaces. Or specify -R multiple times." - msgstr "" - --#: ../semanage/semanage:433 -+#: ../semanage/semanage:419 - msgid "selinux_name" - msgstr "" - --#: ../semanage/semanage:461 -+#: ../semanage/semanage:447 - msgid "Manage network port type definitions" - msgstr "" - --#: ../semanage/semanage:477 -+#: ../semanage/semanage:463 - msgid "port | port_range" - msgstr "" - --#: ../semanage/semanage:506 -+#: ../semanage/semanage:492 - msgid "Manage infiniband ibpkey type definitions" - msgstr "" - --#: ../semanage/semanage:522 -+#: ../semanage/semanage:508 - msgid "pkey | pkey_range" - msgstr "" - --#: ../semanage/semanage:549 -+#: ../semanage/semanage:535 - msgid "Manage infiniband end port type definitions" - msgstr "" - --#: ../semanage/semanage:565 -+#: ../semanage/semanage:551 - msgid "ibendport" - msgstr "" - --#: ../semanage/semanage:592 -+#: ../semanage/semanage:578 - msgid "Manage network interface type definitions" - msgstr "" - --#: ../semanage/semanage:607 -+#: ../semanage/semanage:593 - msgid "interface_spec" - msgstr "" - --#: ../semanage/semanage:631 -+#: ../semanage/semanage:617 - msgid "Manage SELinux policy modules" - msgstr "" - --#: ../semanage/semanage:642 -+#: ../semanage/semanage:628 - msgid "Add a module" - msgstr "" - --#: ../semanage/semanage:643 -+#: ../semanage/semanage:629 - msgid "Remove a module" - msgstr "" - --#: ../semanage/semanage:644 -+#: ../semanage/semanage:630 - msgid "Disable a module" - msgstr "" - --#: ../semanage/semanage:645 -+#: ../semanage/semanage:631 - msgid "Enable a module" - msgstr "" - --#: ../semanage/semanage:672 -+#: ../semanage/semanage:658 - msgid "Manage network node type definitions" - msgstr "" - --#: ../semanage/semanage:686 -+#: ../semanage/semanage:672 - msgid "Network Mask" - msgstr "" - --#: ../semanage/semanage:690 -+#: ../semanage/semanage:676 - msgid "node" - msgstr "" - --#: ../semanage/semanage:715 -+#: ../semanage/semanage:701 - msgid "Manage booleans to selectively enable functionality" - msgstr "" - --#: ../semanage/semanage:720 -+#: ../semanage/semanage:706 - msgid "boolean" - msgstr "" - --#: ../semanage/semanage:730 -+#: ../semanage/semanage:716 - msgid "Enable the boolean" - msgstr "" - --#: ../semanage/semanage:731 -+#: ../semanage/semanage:717 - msgid "Disable the boolean" - msgstr "" - --#: ../semanage/semanage:752 -+#: ../semanage/semanage:738 - msgid "semanage permissive: error: the following argument is required: type\n" - msgstr "" - --#: ../semanage/semanage:756 -+#: ../semanage/semanage:742 - msgid "Manage process type enforcement mode" - msgstr "" - --#: ../semanage/semanage:768 ../semanage/seobject.py:2677 -+#: ../semanage/semanage:754 ../semanage/seobject.py:2672 - msgid "type" - msgstr "" - --#: ../semanage/semanage:779 -+#: ../semanage/semanage:765 - msgid "Disable/Enable dontaudit rules in policy" - msgstr "" - --#: ../semanage/semanage:799 -+#: ../semanage/semanage:785 - msgid "Output local customizations" - msgstr "" - --#: ../semanage/semanage:801 -+#: ../semanage/semanage:787 - msgid "Output file" - msgstr "" - --#: ../semanage/semanage:894 -+#: ../semanage/semanage:880 - msgid "Import local customizations" - msgstr "" - --#: ../semanage/semanage:897 -+#: ../semanage/semanage:883 - msgid "Input file" - msgstr "" - -+#: ../semanage/semanage:891 -+msgid "" -+"semanage is used to configure certain elements of SELinux policy with-out " -+"requiring modification or recompilation from policy source." -+msgstr "" -+ - #: ../semanage/seobject.py:279 - msgid "Could not create semanage handle" - msgstr "" -@@ -485,123 +484,115 @@ msgstr "" - msgid "Customized Permissive Types" - msgstr "" - --#: ../semanage/seobject.py:510 --msgid "" --"The sepolgen python module is required to setup permissive domains.\n" --"In some distributions it is included in the policycoreutils-devel package.\n" --"# yum install policycoreutils-devel\n" --"Or similar for your distro." --msgstr "" -- --#: ../semanage/seobject.py:520 -+#: ../semanage/seobject.py:515 - #, python-format - msgid "Could not set permissive domain %s (module installation failed)" - msgstr "" - --#: ../semanage/seobject.py:526 -+#: ../semanage/seobject.py:521 - #, python-format - msgid "Could not remove permissive domain %s (remove failed)" - msgstr "" - --#: ../semanage/seobject.py:563 ../semanage/seobject.py:633 --#: ../semanage/seobject.py:678 ../semanage/seobject.py:797 --#: ../semanage/seobject.py:827 ../semanage/seobject.py:892 --#: ../semanage/seobject.py:948 ../semanage/seobject.py:1226 --#: ../semanage/seobject.py:1492 ../semanage/seobject.py:2502 --#: ../semanage/seobject.py:2575 ../semanage/seobject.py:2599 --#: ../semanage/seobject.py:2730 ../semanage/seobject.py:2781 -+#: ../semanage/seobject.py:558 ../semanage/seobject.py:628 -+#: ../semanage/seobject.py:673 ../semanage/seobject.py:792 -+#: ../semanage/seobject.py:822 ../semanage/seobject.py:887 -+#: ../semanage/seobject.py:943 ../semanage/seobject.py:1221 -+#: ../semanage/seobject.py:1487 ../semanage/seobject.py:2497 -+#: ../semanage/seobject.py:2570 ../semanage/seobject.py:2594 -+#: ../semanage/seobject.py:2725 ../semanage/seobject.py:2776 - #, python-format - msgid "Could not create a key for %s" - msgstr "" - --#: ../semanage/seobject.py:567 ../semanage/seobject.py:637 --#: ../semanage/seobject.py:682 ../semanage/seobject.py:688 -+#: ../semanage/seobject.py:562 ../semanage/seobject.py:632 -+#: ../semanage/seobject.py:677 ../semanage/seobject.py:683 - #, python-format - msgid "Could not check if login mapping for %s is defined" - msgstr "" - --#: ../semanage/seobject.py:569 -+#: ../semanage/seobject.py:564 - #, python-format - msgid "Login mapping for %s is already defined" - msgstr "" - --#: ../semanage/seobject.py:574 -+#: ../semanage/seobject.py:569 - #, python-format - msgid "Linux Group %s does not exist" - msgstr "" - --#: ../semanage/seobject.py:579 -+#: ../semanage/seobject.py:574 - #, python-format - msgid "Linux User %s does not exist" - msgstr "" - --#: ../semanage/seobject.py:583 -+#: ../semanage/seobject.py:578 - #, python-format - msgid "Could not create login mapping for %s" - msgstr "" - --#: ../semanage/seobject.py:587 ../semanage/seobject.py:841 -+#: ../semanage/seobject.py:582 ../semanage/seobject.py:836 - #, python-format - msgid "Could not set name for %s" - msgstr "" - --#: ../semanage/seobject.py:592 ../semanage/seobject.py:851 -+#: ../semanage/seobject.py:587 ../semanage/seobject.py:846 - #, python-format - msgid "Could not set MLS range for %s" - msgstr "" - --#: ../semanage/seobject.py:596 -+#: ../semanage/seobject.py:591 - #, python-format - msgid "Could not set SELinux user for %s" - msgstr "" - --#: ../semanage/seobject.py:600 -+#: ../semanage/seobject.py:595 - #, python-format - msgid "Could not add login mapping for %s" - msgstr "" - --#: ../semanage/seobject.py:616 -+#: ../semanage/seobject.py:611 - msgid "Requires seuser or serange" - msgstr "" - --#: ../semanage/seobject.py:639 ../semanage/seobject.py:684 -+#: ../semanage/seobject.py:634 ../semanage/seobject.py:679 - #, python-format - msgid "Login mapping for %s is not defined" - msgstr "" - --#: ../semanage/seobject.py:643 -+#: ../semanage/seobject.py:638 - #, python-format - msgid "Could not query seuser for %s" - msgstr "" - --#: ../semanage/seobject.py:658 -+#: ../semanage/seobject.py:653 - #, python-format - msgid "Could not modify login mapping for %s" - msgstr "" - --#: ../semanage/seobject.py:690 -+#: ../semanage/seobject.py:685 - #, python-format - msgid "Login mapping for %s is defined in policy, cannot be deleted" - msgstr "" - --#: ../semanage/seobject.py:694 -+#: ../semanage/seobject.py:689 - #, python-format - msgid "Could not delete login mapping for %s" - msgstr "" - --#: ../semanage/seobject.py:713 ../semanage/seobject.py:745 --#: ../semanage/seobject.py:991 -+#: ../semanage/seobject.py:708 ../semanage/seobject.py:740 -+#: ../semanage/seobject.py:986 - msgid "Could not list login mappings" - msgstr "" - --#: ../semanage/seobject.py:772 ../semanage/seobject.py:784 -+#: ../semanage/seobject.py:767 ../semanage/seobject.py:779 - #: ../sepolicy/sepolicy/sepolicy.glade:1156 - #: ../sepolicy/sepolicy/sepolicy.glade:3138 - msgid "Login Name" - msgstr "" - --#: ../semanage/seobject.py:772 ../semanage/seobject.py:784 --#: ../semanage/seobject.py:1041 ../semanage/seobject.py:1046 -+#: ../semanage/seobject.py:767 ../semanage/seobject.py:779 -+#: ../semanage/seobject.py:1036 ../semanage/seobject.py:1041 - #: ../sepolicy/sepolicy/sepolicy.glade:1182 - #: ../sepolicy/sepolicy/sepolicy.glade:3156 - #: ../sepolicy/sepolicy/sepolicy.glade:3242 -@@ -609,938 +600,958 @@ msgstr "" - msgid "SELinux User" - msgstr "" - --#: ../semanage/seobject.py:772 -+#: ../semanage/seobject.py:767 - msgid "MLS/MCS Range" - msgstr "" - --#: ../semanage/seobject.py:772 -+#: ../semanage/seobject.py:767 - msgid "Service" - msgstr "" - --#: ../semanage/seobject.py:800 ../semanage/seobject.py:831 --#: ../semanage/seobject.py:896 ../semanage/seobject.py:952 --#: ../semanage/seobject.py:958 -+#: ../semanage/seobject.py:795 ../semanage/seobject.py:826 -+#: ../semanage/seobject.py:891 ../semanage/seobject.py:947 -+#: ../semanage/seobject.py:953 - #, python-format - msgid "Could not check if SELinux user %s is defined" - msgstr "" - --#: ../semanage/seobject.py:803 ../semanage/seobject.py:902 --#: ../semanage/seobject.py:964 -+#: ../semanage/seobject.py:798 ../semanage/seobject.py:897 -+#: ../semanage/seobject.py:959 - #, python-format - msgid "Could not query user for %s" - msgstr "" - --#: ../semanage/seobject.py:823 -+#: ../semanage/seobject.py:818 - #, python-format - msgid "You must add at least one role for %s" - msgstr "" - --#: ../semanage/seobject.py:833 -+#: ../semanage/seobject.py:828 - #, python-format - msgid "SELinux user %s is already defined" - msgstr "" - --#: ../semanage/seobject.py:837 -+#: ../semanage/seobject.py:832 - #, python-format - msgid "Could not create SELinux user for %s" - msgstr "" - --#: ../semanage/seobject.py:846 --#, python-format --msgid "Could not add role %s for %s" -+#: ../semanage/seobject.py:841 -+#, python-brace-format -+msgid "Could not add role {role} for {name}" - msgstr "" - --#: ../semanage/seobject.py:855 -+#: ../semanage/seobject.py:850 - #, python-format - msgid "Could not set MLS level for %s" - msgstr "" - --#: ../semanage/seobject.py:858 --#, python-format --msgid "Could not add prefix %s for %s" -+#: ../semanage/seobject.py:853 -+#, python-brace-format -+msgid "Could not add prefix {prefix} for {role}" - msgstr "" - --#: ../semanage/seobject.py:861 -+#: ../semanage/seobject.py:856 - #, python-format - msgid "Could not extract key for %s" - msgstr "" - --#: ../semanage/seobject.py:865 -+#: ../semanage/seobject.py:860 - #, python-format - msgid "Could not add SELinux user %s" - msgstr "" - --#: ../semanage/seobject.py:886 -+#: ../semanage/seobject.py:881 - msgid "Requires prefix, roles, level or range" - msgstr "" - --#: ../semanage/seobject.py:888 -+#: ../semanage/seobject.py:883 - msgid "Requires prefix or roles" - msgstr "" - --#: ../semanage/seobject.py:898 ../semanage/seobject.py:954 -+#: ../semanage/seobject.py:893 ../semanage/seobject.py:949 - #, python-format - msgid "SELinux user %s is not defined" - msgstr "" - --#: ../semanage/seobject.py:927 -+#: ../semanage/seobject.py:922 - #, python-format - msgid "Could not modify SELinux user %s" - msgstr "" - --#: ../semanage/seobject.py:960 -+#: ../semanage/seobject.py:955 - #, python-format - msgid "SELinux user %s is defined in policy, cannot be deleted" - msgstr "" - --#: ../semanage/seobject.py:971 -+#: ../semanage/seobject.py:966 - #, python-format - msgid "Could not delete SELinux user %s" - msgstr "" - --#: ../semanage/seobject.py:1009 -+#: ../semanage/seobject.py:1004 - msgid "Could not list SELinux users" - msgstr "" - --#: ../semanage/seobject.py:1015 -+#: ../semanage/seobject.py:1010 - #, python-format - msgid "Could not list roles for user %s" - msgstr "" - --#: ../semanage/seobject.py:1040 -+#: ../semanage/seobject.py:1035 - msgid "Labeling" - msgstr "" - --#: ../semanage/seobject.py:1040 -+#: ../semanage/seobject.py:1035 - msgid "MLS/" - msgstr "" - --#: ../semanage/seobject.py:1041 -+#: ../semanage/seobject.py:1036 - msgid "Prefix" - msgstr "" - --#: ../semanage/seobject.py:1041 -+#: ../semanage/seobject.py:1036 - msgid "MCS Level" - msgstr "" - --#: ../semanage/seobject.py:1041 -+#: ../semanage/seobject.py:1036 - msgid "MCS Range" - msgstr "" - --#: ../semanage/seobject.py:1041 ../semanage/seobject.py:1046 -+#: ../semanage/seobject.py:1036 ../semanage/seobject.py:1041 - #: ../sepolicy/sepolicy/sepolicy.glade:3262 - #: ../sepolicy/sepolicy/sepolicy.glade:5233 - #: ../sepolicy/sepolicy/sepolicy.glade:5382 - msgid "SELinux Roles" - msgstr "" - --#: ../semanage/seobject.py:1071 -+#: ../semanage/seobject.py:1066 - msgid "Protocol has to be one of udp, tcp, dccp or sctp" - msgstr "" - --#: ../semanage/seobject.py:1073 -+#: ../semanage/seobject.py:1068 - msgid "Port is required" - msgstr "" - --#: ../semanage/seobject.py:1087 -+#: ../semanage/seobject.py:1082 - msgid "Invalid Port" - msgstr "" - --#: ../semanage/seobject.py:1091 ../semanage/seobject.py:1365 --#, python-format --msgid "Could not create a key for %s/%s" -+#: ../semanage/seobject.py:1086 -+#, python-brace-format -+msgid "Could not create a key for {proto}/{port}" - msgstr "" - --#: ../semanage/seobject.py:1102 ../semanage/seobject.py:1376 --#: ../semanage/seobject.py:1631 -+#: ../semanage/seobject.py:1097 ../semanage/seobject.py:1371 -+#: ../semanage/seobject.py:1626 - msgid "Type is required" - msgstr "" - --#: ../semanage/seobject.py:1107 ../semanage/seobject.py:1172 -+#: ../semanage/seobject.py:1102 ../semanage/seobject.py:1167 - #, python-format - msgid "Type %s is invalid, must be a port type" - msgstr "" - --#: ../semanage/seobject.py:1113 ../semanage/seobject.py:1178 --#: ../semanage/seobject.py:1244 ../semanage/seobject.py:1250 --#, python-format --msgid "Could not check if port %s/%s is defined" -+#: ../semanage/seobject.py:1108 ../semanage/seobject.py:1173 -+#: ../semanage/seobject.py:1239 ../semanage/seobject.py:1245 -+#, python-brace-format -+msgid "Could not check if port {proto}/{port} is defined" - msgstr "" - --#: ../semanage/seobject.py:1115 --#, python-format --msgid "Port %s/%s already defined" -+#: ../semanage/seobject.py:1110 -+#, python-brace-format -+msgid "Port {proto}/{port} already defined" - msgstr "" - --#: ../semanage/seobject.py:1119 --#, python-format --msgid "Could not create port for %s/%s" -+#: ../semanage/seobject.py:1114 -+#, python-brace-format -+msgid "Could not create port for {proto}/{port}" - msgstr "" - --#: ../semanage/seobject.py:1125 ../semanage/seobject.py:1399 --#: ../semanage/seobject.py:1653 --#, python-format --msgid "Could not create context for %s/%s" -+#: ../semanage/seobject.py:1120 -+#, python-brace-format -+msgid "Could not create context for {proto}/{port}" - msgstr "" - --#: ../semanage/seobject.py:1129 --#, python-format --msgid "Could not set user in port context for %s/%s" -+#: ../semanage/seobject.py:1124 -+#, python-brace-format -+msgid "Could not set user in port context for {proto}/{port}" - msgstr "" - --#: ../semanage/seobject.py:1133 --#, python-format --msgid "Could not set role in port context for %s/%s" -+#: ../semanage/seobject.py:1128 -+#, python-brace-format -+msgid "Could not set role in port context for {proto}/{port}" - msgstr "" - --#: ../semanage/seobject.py:1137 --#, python-format --msgid "Could not set type in port context for %s/%s" -+#: ../semanage/seobject.py:1132 -+#, python-brace-format -+msgid "Could not set type in port context for {proto}/{port}" - msgstr "" - --#: ../semanage/seobject.py:1142 --#, python-format --msgid "Could not set mls fields in port context for %s/%s" -+#: ../semanage/seobject.py:1137 -+#, python-brace-format -+msgid "Could not set mls fields in port context for {proto}/{port}" - msgstr "" - --#: ../semanage/seobject.py:1146 --#, python-format --msgid "Could not set port context for %s/%s" -+#: ../semanage/seobject.py:1141 -+#, python-brace-format -+msgid "Could not set port context for {proto}/{port}" - msgstr "" - --#: ../semanage/seobject.py:1150 --#, python-format --msgid "Could not add port %s/%s" -+#: ../semanage/seobject.py:1145 -+#, python-brace-format -+msgid "Could not add port {proto}/{port}" - msgstr "" - --#: ../semanage/seobject.py:1166 ../semanage/seobject.py:1438 --#: ../semanage/seobject.py:1692 ../semanage/seobject.py:1970 --#: ../semanage/seobject.py:2176 -+#: ../semanage/seobject.py:1161 ../semanage/seobject.py:1433 -+#: ../semanage/seobject.py:1687 ../semanage/seobject.py:1965 -+#: ../semanage/seobject.py:2171 - msgid "Requires setype or serange" - msgstr "" - --#: ../semanage/seobject.py:1168 ../semanage/seobject.py:1440 --#: ../semanage/seobject.py:1694 -+#: ../semanage/seobject.py:1163 ../semanage/seobject.py:1435 -+#: ../semanage/seobject.py:1689 - msgid "Requires setype" - msgstr "" - --#: ../semanage/seobject.py:1180 ../semanage/seobject.py:1246 --#, python-format --msgid "Port %s/%s is not defined" -+#: ../semanage/seobject.py:1175 ../semanage/seobject.py:1241 -+#, python-brace-format -+msgid "Port {proto}/{port} is not defined" - msgstr "" - --#: ../semanage/seobject.py:1184 --#, python-format --msgid "Could not query port %s/%s" -+#: ../semanage/seobject.py:1179 -+#, python-brace-format -+msgid "Could not query port {proto}/{port}" - msgstr "" - --#: ../semanage/seobject.py:1198 --#, python-format --msgid "Could not modify port %s/%s" -+#: ../semanage/seobject.py:1193 -+#, python-brace-format -+msgid "Could not modify port {proto}/{port}" - msgstr "" - --#: ../semanage/seobject.py:1213 -+#: ../semanage/seobject.py:1208 - msgid "Could not list the ports" - msgstr "" - --#: ../semanage/seobject.py:1230 -+#: ../semanage/seobject.py:1225 - #, python-format - msgid "Could not delete the port %s" - msgstr "" - --#: ../semanage/seobject.py:1252 --#, python-format --msgid "Port %s/%s is defined in policy, cannot be deleted" -+#: ../semanage/seobject.py:1247 -+#, python-brace-format -+msgid "Port {proto}/{port} is defined in policy, cannot be deleted" - msgstr "" - --#: ../semanage/seobject.py:1256 --#, python-format --msgid "Could not delete port %s/%s" -+#: ../semanage/seobject.py:1251 -+#, python-brace-format -+msgid "Could not delete port {proto}/{port}" - msgstr "" - --#: ../semanage/seobject.py:1274 ../semanage/seobject.py:1294 -+#: ../semanage/seobject.py:1269 ../semanage/seobject.py:1289 - msgid "Could not list ports" - msgstr "" - --#: ../semanage/seobject.py:1329 ../sepolicy/sepolicy/sepolicy.glade:2668 -+#: ../semanage/seobject.py:1324 ../sepolicy/sepolicy/sepolicy.glade:2668 - #: ../sepolicy/sepolicy/sepolicy.glade:2766 - #: ../sepolicy/sepolicy/sepolicy.glade:4630 - msgid "SELinux Port Type" - msgstr "" - --#: ../semanage/seobject.py:1329 -+#: ../semanage/seobject.py:1324 - msgid "Proto" - msgstr "" - --#: ../semanage/seobject.py:1329 ../semanage/seobject.py:1835 -+#: ../semanage/seobject.py:1324 ../semanage/seobject.py:1830 - #: ../sepolicy/sepolicy/sepolicy.glade:1407 - msgid "Port Number" - msgstr "" - --#: ../semanage/seobject.py:1351 -+#: ../semanage/seobject.py:1346 - msgid "Subnet Prefix is required" - msgstr "" - --#: ../semanage/seobject.py:1361 -+#: ../semanage/seobject.py:1356 - msgid "Invalid Pkey" - msgstr "" - --#: ../semanage/seobject.py:1381 ../semanage/seobject.py:1445 -+#: ../semanage/seobject.py:1360 -+#, python-brace-format -+msgid "Could not create a key for {subnet_prefix}/{pkey}" -+msgstr "" -+ -+#: ../semanage/seobject.py:1376 ../semanage/seobject.py:1440 - #, python-format - msgid "Type %s is invalid, must be a ibpkey type" - msgstr "" - --#: ../semanage/seobject.py:1387 ../semanage/seobject.py:1451 --#: ../semanage/seobject.py:1505 ../semanage/seobject.py:1511 --#, python-format --msgid "Could not check if ibpkey %s/%s is defined" -+#: ../semanage/seobject.py:1382 ../semanage/seobject.py:1446 -+#: ../semanage/seobject.py:1500 ../semanage/seobject.py:1506 -+#, python-brace-format -+msgid "Could not check if ibpkey {subnet_prefix}/{pkey} is defined" - msgstr "" - --#: ../semanage/seobject.py:1389 --#, python-format --msgid "ibpkey %s/%s already defined" -+#: ../semanage/seobject.py:1384 -+#, python-brace-format -+msgid "ibpkey {subnet_prefix}/{pkey} already defined" - msgstr "" - --#: ../semanage/seobject.py:1393 --#, python-format --msgid "Could not create ibpkey for %s/%s" -+#: ../semanage/seobject.py:1388 -+#, python-brace-format -+msgid "Could not create ibpkey for {subnet_prefix}/{pkey}" - msgstr "" - --#: ../semanage/seobject.py:1403 --#, python-format --msgid "Could not set user in ibpkey context for %s/%s" -+#: ../semanage/seobject.py:1394 -+#, python-brace-format -+msgid "Could not create context for {subnet_prefix}/{pkey}" - msgstr "" - --#: ../semanage/seobject.py:1407 --#, python-format --msgid "Could not set role in ibpkey context for %s/%s" -+#: ../semanage/seobject.py:1398 -+#, python-brace-format -+msgid "Could not set user in ibpkey context for {subnet_prefix}/{pkey}" - msgstr "" - --#: ../semanage/seobject.py:1411 --#, python-format --msgid "Could not set type in ibpkey context for %s/%s" -+#: ../semanage/seobject.py:1402 -+#, python-brace-format -+msgid "Could not set role in ibpkey context for {subnet_prefix}/{pkey}" - msgstr "" - --#: ../semanage/seobject.py:1416 --#, python-format --msgid "Could not set mls fields in ibpkey context for %s/%s" -+#: ../semanage/seobject.py:1406 -+#, python-brace-format -+msgid "Could not set type in ibpkey context for {subnet_prefix}/{pkey}" - msgstr "" - --#: ../semanage/seobject.py:1420 --#, python-format --msgid "Could not set ibpkey context for %s/%s" -+#: ../semanage/seobject.py:1411 -+#, python-brace-format -+msgid "Could not set mls fields in ibpkey context for {subnet_prefix}/{pkey}" - msgstr "" - --#: ../semanage/seobject.py:1424 --#, python-format --msgid "Could not add ibpkey %s/%s" -+#: ../semanage/seobject.py:1415 -+#, python-brace-format -+msgid "Could not set ibpkey context for {subnet_prefix}/{pkey}" - msgstr "" - --#: ../semanage/seobject.py:1453 ../semanage/seobject.py:1507 --#, python-format --msgid "ibpkey %s/%s is not defined" -+#: ../semanage/seobject.py:1419 -+#, python-brace-format -+msgid "Could not add ibpkey {subnet_prefix}/{pkey}" - msgstr "" - --#: ../semanage/seobject.py:1457 --#, python-format --msgid "Could not query ibpkey %s/%s" -+#: ../semanage/seobject.py:1448 ../semanage/seobject.py:1502 -+#, python-brace-format -+msgid "ibpkey {subnet_prefix}/{pkey} is not defined" - msgstr "" - --#: ../semanage/seobject.py:1468 --#, python-format --msgid "Could not modify ibpkey %s/%s" -+#: ../semanage/seobject.py:1452 -+#, python-brace-format -+msgid "Could not query ibpkey {subnet_prefix}/{pkey}" - msgstr "" - --#: ../semanage/seobject.py:1481 -+#: ../semanage/seobject.py:1463 -+#, python-brace-format -+msgid "Could not modify ibpkey {subnet_prefix}/{pkey}" -+msgstr "" -+ -+#: ../semanage/seobject.py:1476 - msgid "Could not list the ibpkeys" - msgstr "" - --#: ../semanage/seobject.py:1496 -+#: ../semanage/seobject.py:1491 - #, python-format - msgid "Could not delete the ibpkey %s" - msgstr "" - --#: ../semanage/seobject.py:1513 --#, python-format --msgid "ibpkey %s/%s is defined in policy, cannot be deleted" -+#: ../semanage/seobject.py:1508 -+#, python-brace-format -+msgid "ibpkey {subnet_prefix}/{pkey} is defined in policy, cannot be deleted" - msgstr "" - --#: ../semanage/seobject.py:1517 --#, python-format --msgid "Could not delete ibpkey %s/%s" -+#: ../semanage/seobject.py:1512 -+#, python-brace-format -+msgid "Could not delete ibpkey {subnet_prefix}/{pkey}" - msgstr "" - --#: ../semanage/seobject.py:1533 ../semanage/seobject.py:1554 -+#: ../semanage/seobject.py:1528 ../semanage/seobject.py:1549 - msgid "Could not list ibpkeys" - msgstr "" - --#: ../semanage/seobject.py:1589 -+#: ../semanage/seobject.py:1584 - msgid "SELinux IB Pkey Type" - msgstr "" - --#: ../semanage/seobject.py:1589 -+#: ../semanage/seobject.py:1584 - msgid "Subnet_Prefix" - msgstr "" - --#: ../semanage/seobject.py:1589 -+#: ../semanage/seobject.py:1584 - msgid "Pkey Number" - msgstr "" - --#: ../semanage/seobject.py:1611 -+#: ../semanage/seobject.py:1606 - msgid "IB device name is required" - msgstr "" - --#: ../semanage/seobject.py:1616 -+#: ../semanage/seobject.py:1611 - msgid "Invalid Port Number" - msgstr "" - --#: ../semanage/seobject.py:1620 --#, python-format --msgid "Could not create a key for ibendport %s/%s" -+#: ../semanage/seobject.py:1615 -+#, python-brace-format -+msgid "Could not create a key for ibendport {ibdev_name}/{ibendport}" - msgstr "" - --#: ../semanage/seobject.py:1636 ../semanage/seobject.py:1699 -+#: ../semanage/seobject.py:1631 ../semanage/seobject.py:1694 - #, python-format - msgid "Type %s is invalid, must be an ibendport type" - msgstr "" - --#: ../semanage/seobject.py:1641 ../semanage/seobject.py:1705 --#: ../semanage/seobject.py:1757 ../semanage/seobject.py:1763 --#, python-format --msgid "Could not check if ibendport %s/%s is defined" -+#: ../semanage/seobject.py:1636 -+#, python-brace-format -+msgid "Could not check if ibendport {ibdev_name}/{port} is defined" - msgstr "" - --#: ../semanage/seobject.py:1643 --#, python-format --msgid "ibendport %s/%s already defined" -+#: ../semanage/seobject.py:1638 -+#, python-brace-format -+msgid "ibendport {ibdev_name}/{port} already defined" - msgstr "" - --#: ../semanage/seobject.py:1647 --#, python-format --msgid "Could not create ibendport for %s/%s" -+#: ../semanage/seobject.py:1642 -+#, python-brace-format -+msgid "Could not create ibendport for {ibdev_name}/{port}" - msgstr "" - --#: ../semanage/seobject.py:1657 --#, python-format --msgid "Could not set user in ibendport context for %s/%s" -+#: ../semanage/seobject.py:1648 -+#, python-brace-format -+msgid "Could not create context for {ibendport}/{port}" - msgstr "" - --#: ../semanage/seobject.py:1661 --#, python-format --msgid "Could not set role in ibendport context for %s/%s" -+#: ../semanage/seobject.py:1652 -+#, python-brace-format -+msgid "Could not set user in ibendport context for {ibdev_name}/{port}" -+msgstr "" -+ -+#: ../semanage/seobject.py:1656 -+#, python-brace-format -+msgid "Could not set role in ibendport context for {ibdev_name}/{port}" -+msgstr "" -+ -+#: ../semanage/seobject.py:1660 -+#, python-brace-format -+msgid "Could not set type in ibendport context for {ibdev_name}/{port}" - msgstr "" - - #: ../semanage/seobject.py:1665 --#, python-format --msgid "Could not set type in ibendport context for %s/%s" -+#, python-brace-format -+msgid "Could not set mls fields in ibendport context for {ibdev_name}/{port}" - msgstr "" - --#: ../semanage/seobject.py:1670 --#, python-format --msgid "Could not set mls fields in ibendport context for %s/%s" -+#: ../semanage/seobject.py:1669 -+#, python-brace-format -+msgid "Could not set ibendport context for {ibdev_name}/{port}" - msgstr "" - --#: ../semanage/seobject.py:1674 --#, python-format --msgid "Could not set ibendport context for %s/%s" -+#: ../semanage/seobject.py:1673 -+#, python-brace-format -+msgid "Could not add ibendport {ibdev_name}/{port}" - msgstr "" - --#: ../semanage/seobject.py:1678 --#, python-format --msgid "Could not add ibendport %s/%s" -+#: ../semanage/seobject.py:1700 ../semanage/seobject.py:1752 -+#: ../semanage/seobject.py:1758 -+#, python-brace-format -+msgid "Could not check if ibendport {ibdev_name}/{ibendport} is defined" - msgstr "" - --#: ../semanage/seobject.py:1707 ../semanage/seobject.py:1759 --#, python-format --msgid "ibendport %s/%s is not defined" -+#: ../semanage/seobject.py:1702 ../semanage/seobject.py:1754 -+#, python-brace-format -+msgid "ibendport {ibdev_name}/{ibendport} is not defined" - msgstr "" - --#: ../semanage/seobject.py:1711 --#, python-format --msgid "Could not query ibendport %s/%s" -+#: ../semanage/seobject.py:1706 -+#, python-brace-format -+msgid "Could not query ibendport {ibdev_name}/{ibendport}" - msgstr "" - --#: ../semanage/seobject.py:1722 --#, python-format --msgid "Could not modify ibendport %s/%s" -+#: ../semanage/seobject.py:1717 -+#, python-brace-format -+msgid "Could not modify ibendport {ibdev_name}/{ibendport}" - msgstr "" - --#: ../semanage/seobject.py:1735 -+#: ../semanage/seobject.py:1730 - msgid "Could not list the ibendports" - msgstr "" - --#: ../semanage/seobject.py:1744 --#, python-format --msgid "Could not create a key for %s/%d" -+#: ../semanage/seobject.py:1739 -+#, python-brace-format -+msgid "Could not create a key for {ibdev_name}/{port}" - msgstr "" - --#: ../semanage/seobject.py:1748 --#, python-format --msgid "Could not delete the ibendport %s/%d" -+#: ../semanage/seobject.py:1743 -+#, python-brace-format -+msgid "Could not delete the ibendport {ibdev_name}/{port}" - msgstr "" - --#: ../semanage/seobject.py:1765 --#, python-format --msgid "ibendport %s/%s is defined in policy, cannot be deleted" -+#: ../semanage/seobject.py:1760 -+#, python-brace-format -+msgid "" -+"ibendport {ibdev_name}/{ibendport} is defined in policy, cannot be deleted" - msgstr "" - --#: ../semanage/seobject.py:1769 --#, python-format --msgid "Could not delete ibendport %s/%s" -+#: ../semanage/seobject.py:1764 -+#, python-brace-format -+msgid "Could not delete ibendport {ibdev_name}/{ibendport}" - msgstr "" - --#: ../semanage/seobject.py:1785 ../semanage/seobject.py:1805 -+#: ../semanage/seobject.py:1780 ../semanage/seobject.py:1800 - msgid "Could not list ibendports" - msgstr "" - --#: ../semanage/seobject.py:1835 -+#: ../semanage/seobject.py:1830 - msgid "SELinux IB End Port Type" - msgstr "" - --#: ../semanage/seobject.py:1835 -+#: ../semanage/seobject.py:1830 - msgid "IB Device Name" - msgstr "" - --#: ../semanage/seobject.py:1861 -+#: ../semanage/seobject.py:1856 - msgid "Node Address is required" - msgstr "" - --#: ../semanage/seobject.py:1873 ../semanage/seobject.py:1885 -+#: ../semanage/seobject.py:1868 ../semanage/seobject.py:1880 - msgid "Unknown or missing protocol" - msgstr "" - --#: ../semanage/seobject.py:1899 -+#: ../semanage/seobject.py:1894 - msgid "SELinux node type is required" - msgstr "" - --#: ../semanage/seobject.py:1904 ../semanage/seobject.py:1975 -+#: ../semanage/seobject.py:1899 ../semanage/seobject.py:1970 - #, python-format - msgid "Type %s is invalid, must be a node type" - msgstr "" - --#: ../semanage/seobject.py:1908 ../semanage/seobject.py:1979 --#: ../semanage/seobject.py:2016 ../semanage/seobject.py:2117 --#: ../semanage/seobject.py:2180 ../semanage/seobject.py:2216 --#: ../semanage/seobject.py:2435 -+#: ../semanage/seobject.py:1903 ../semanage/seobject.py:1974 -+#: ../semanage/seobject.py:2011 ../semanage/seobject.py:2112 -+#: ../semanage/seobject.py:2175 ../semanage/seobject.py:2211 -+#: ../semanage/seobject.py:2430 - #, python-format - msgid "Could not create key for %s" - msgstr "" - --#: ../semanage/seobject.py:1912 ../semanage/seobject.py:1983 --#: ../semanage/seobject.py:2020 ../semanage/seobject.py:2026 -+#: ../semanage/seobject.py:1907 ../semanage/seobject.py:1978 -+#: ../semanage/seobject.py:2015 ../semanage/seobject.py:2021 - #, python-format - msgid "Could not check if addr %s is defined" - msgstr "" - --#: ../semanage/seobject.py:1914 -+#: ../semanage/seobject.py:1909 - #, python-format - msgid "Addr %s already defined" - msgstr "" - --#: ../semanage/seobject.py:1918 -+#: ../semanage/seobject.py:1913 - #, python-format - msgid "Could not create addr for %s" - msgstr "" - --#: ../semanage/seobject.py:1924 ../semanage/seobject.py:2132 --#: ../semanage/seobject.py:2389 -+#: ../semanage/seobject.py:1919 ../semanage/seobject.py:2127 -+#: ../semanage/seobject.py:2384 - #, python-format - msgid "Could not create context for %s" - msgstr "" - --#: ../semanage/seobject.py:1928 -+#: ../semanage/seobject.py:1923 - #, python-format - msgid "Could not set mask for %s" - msgstr "" - --#: ../semanage/seobject.py:1932 -+#: ../semanage/seobject.py:1927 - #, python-format - msgid "Could not set user in addr context for %s" - msgstr "" - --#: ../semanage/seobject.py:1936 -+#: ../semanage/seobject.py:1931 - #, python-format - msgid "Could not set role in addr context for %s" - msgstr "" - --#: ../semanage/seobject.py:1940 -+#: ../semanage/seobject.py:1935 - #, python-format - msgid "Could not set type in addr context for %s" - msgstr "" - --#: ../semanage/seobject.py:1945 -+#: ../semanage/seobject.py:1940 - #, python-format - msgid "Could not set mls fields in addr context for %s" - msgstr "" - --#: ../semanage/seobject.py:1949 -+#: ../semanage/seobject.py:1944 - #, python-format - msgid "Could not set addr context for %s" - msgstr "" - --#: ../semanage/seobject.py:1953 -+#: ../semanage/seobject.py:1948 - #, python-format - msgid "Could not add addr %s" - msgstr "" - --#: ../semanage/seobject.py:1985 ../semanage/seobject.py:2022 -+#: ../semanage/seobject.py:1980 ../semanage/seobject.py:2017 - #, python-format - msgid "Addr %s is not defined" - msgstr "" - --#: ../semanage/seobject.py:1989 -+#: ../semanage/seobject.py:1984 - #, python-format - msgid "Could not query addr %s" - msgstr "" - --#: ../semanage/seobject.py:1999 -+#: ../semanage/seobject.py:1994 - #, python-format - msgid "Could not modify addr %s" - msgstr "" - --#: ../semanage/seobject.py:2028 -+#: ../semanage/seobject.py:2023 - #, python-format - msgid "Addr %s is defined in policy, cannot be deleted" - msgstr "" - --#: ../semanage/seobject.py:2032 -+#: ../semanage/seobject.py:2027 - #, python-format - msgid "Could not delete addr %s" - msgstr "" - --#: ../semanage/seobject.py:2046 -+#: ../semanage/seobject.py:2041 - msgid "Could not deleteall node mappings" - msgstr "" - --#: ../semanage/seobject.py:2060 -+#: ../semanage/seobject.py:2055 - msgid "Could not list addrs" - msgstr "" - --#: ../semanage/seobject.py:2113 ../semanage/seobject.py:2426 -+#: ../semanage/seobject.py:2108 ../semanage/seobject.py:2421 - msgid "SELinux Type is required" - msgstr "" - --#: ../semanage/seobject.py:2121 ../semanage/seobject.py:2184 --#: ../semanage/seobject.py:2220 ../semanage/seobject.py:2226 -+#: ../semanage/seobject.py:2116 ../semanage/seobject.py:2179 -+#: ../semanage/seobject.py:2215 ../semanage/seobject.py:2221 - #, python-format - msgid "Could not check if interface %s is defined" - msgstr "" - --#: ../semanage/seobject.py:2123 -+#: ../semanage/seobject.py:2118 - #, python-format - msgid "Interface %s already defined" - msgstr "" - --#: ../semanage/seobject.py:2127 -+#: ../semanage/seobject.py:2122 - #, python-format - msgid "Could not create interface for %s" - msgstr "" - --#: ../semanage/seobject.py:2136 -+#: ../semanage/seobject.py:2131 - #, python-format - msgid "Could not set user in interface context for %s" - msgstr "" - --#: ../semanage/seobject.py:2140 -+#: ../semanage/seobject.py:2135 - #, python-format - msgid "Could not set role in interface context for %s" - msgstr "" - --#: ../semanage/seobject.py:2144 -+#: ../semanage/seobject.py:2139 - #, python-format - msgid "Could not set type in interface context for %s" - msgstr "" - --#: ../semanage/seobject.py:2149 -+#: ../semanage/seobject.py:2144 - #, python-format - msgid "Could not set mls fields in interface context for %s" - msgstr "" - --#: ../semanage/seobject.py:2153 -+#: ../semanage/seobject.py:2148 - #, python-format - msgid "Could not set interface context for %s" - msgstr "" - --#: ../semanage/seobject.py:2157 -+#: ../semanage/seobject.py:2152 - #, python-format - msgid "Could not set message context for %s" - msgstr "" - --#: ../semanage/seobject.py:2161 -+#: ../semanage/seobject.py:2156 - #, python-format - msgid "Could not add interface %s" - msgstr "" - --#: ../semanage/seobject.py:2186 ../semanage/seobject.py:2222 -+#: ../semanage/seobject.py:2181 ../semanage/seobject.py:2217 - #, python-format - msgid "Interface %s is not defined" - msgstr "" - --#: ../semanage/seobject.py:2190 -+#: ../semanage/seobject.py:2185 - #, python-format - msgid "Could not query interface %s" - msgstr "" - --#: ../semanage/seobject.py:2201 -+#: ../semanage/seobject.py:2196 - #, python-format - msgid "Could not modify interface %s" - msgstr "" - --#: ../semanage/seobject.py:2228 -+#: ../semanage/seobject.py:2223 - #, python-format - msgid "Interface %s is defined in policy, cannot be deleted" - msgstr "" - --#: ../semanage/seobject.py:2232 -+#: ../semanage/seobject.py:2227 - #, python-format - msgid "Could not delete interface %s" - msgstr "" - --#: ../semanage/seobject.py:2246 -+#: ../semanage/seobject.py:2241 - msgid "Could not delete all interface mappings" - msgstr "" - --#: ../semanage/seobject.py:2260 -+#: ../semanage/seobject.py:2255 - msgid "Could not list interfaces" - msgstr "" - --#: ../semanage/seobject.py:2285 -+#: ../semanage/seobject.py:2280 - msgid "SELinux Interface" - msgstr "" - --#: ../semanage/seobject.py:2285 ../semanage/seobject.py:2677 -+#: ../semanage/seobject.py:2280 ../semanage/seobject.py:2672 - msgid "Context" - msgstr "" - --#: ../semanage/seobject.py:2355 -+#: ../semanage/seobject.py:2350 - #, python-format - msgid "Target %s is not valid. Target is not allowed to end with '/'" - msgstr "" - --#: ../semanage/seobject.py:2358 -+#: ../semanage/seobject.py:2353 - #, python-format - msgid "Substitute %s is not valid. Substitute is not allowed to end with '/'" - msgstr "" - --#: ../semanage/seobject.py:2361 -+#: ../semanage/seobject.py:2356 - #, python-format - msgid "Equivalence class for %s already exists" - msgstr "" - --#: ../semanage/seobject.py:2367 -+#: ../semanage/seobject.py:2362 - #, python-format - msgid "File spec %s conflicts with equivalency rule '%s %s'" - msgstr "" - --#: ../semanage/seobject.py:2378 -+#: ../semanage/seobject.py:2373 - #, python-format - msgid "Equivalence class for %s does not exist" - msgstr "" - --#: ../semanage/seobject.py:2395 -+#: ../semanage/seobject.py:2390 - #, python-format - msgid "Could not set user in file context for %s" - msgstr "" - --#: ../semanage/seobject.py:2399 -+#: ../semanage/seobject.py:2394 - #, python-format - msgid "Could not set role in file context for %s" - msgstr "" - --#: ../semanage/seobject.py:2404 ../semanage/seobject.py:2464 -+#: ../semanage/seobject.py:2399 ../semanage/seobject.py:2459 - #, python-format - msgid "Could not set mls fields in file context for %s" - msgstr "" - --#: ../semanage/seobject.py:2410 -+#: ../semanage/seobject.py:2405 - msgid "Invalid file specification" - msgstr "" - --#: ../semanage/seobject.py:2412 -+#: ../semanage/seobject.py:2407 - msgid "File specification can not include spaces" - msgstr "" - --#: ../semanage/seobject.py:2417 -+#: ../semanage/seobject.py:2412 - #, python-format - msgid "" - "File spec %s conflicts with equivalency rule '%s %s'; Try adding '%s' instead" - msgstr "" - --#: ../semanage/seobject.py:2431 ../semanage/seobject.py:2496 -+#: ../semanage/seobject.py:2426 ../semanage/seobject.py:2491 - #, python-format - msgid "Type %s is invalid, must be a file or device type" - msgstr "" - --#: ../semanage/seobject.py:2439 ../semanage/seobject.py:2444 --#: ../semanage/seobject.py:2506 ../semanage/seobject.py:2515 --#: ../semanage/seobject.py:2603 ../semanage/seobject.py:2607 -+#: ../semanage/seobject.py:2434 ../semanage/seobject.py:2439 -+#: ../semanage/seobject.py:2501 ../semanage/seobject.py:2510 -+#: ../semanage/seobject.py:2598 ../semanage/seobject.py:2602 - #, python-format - msgid "Could not check if file context for %s is defined" - msgstr "" - --#: ../semanage/seobject.py:2447 -+#: ../semanage/seobject.py:2442 - #, python-format - msgid "File context for %s already defined" - msgstr "" - --#: ../semanage/seobject.py:2451 -+#: ../semanage/seobject.py:2446 - #, python-format - msgid "Could not create file context for %s" - msgstr "" - --#: ../semanage/seobject.py:2459 -+#: ../semanage/seobject.py:2454 - #, python-format - msgid "Could not set type in file context for %s" - msgstr "" - --#: ../semanage/seobject.py:2467 ../semanage/seobject.py:2539 --#: ../semanage/seobject.py:2543 -+#: ../semanage/seobject.py:2462 ../semanage/seobject.py:2534 -+#: ../semanage/seobject.py:2538 - #, python-format - msgid "Could not set file context for %s" - msgstr "" - --#: ../semanage/seobject.py:2473 -+#: ../semanage/seobject.py:2468 - #, python-format - msgid "Could not add file context for %s" - msgstr "" - --#: ../semanage/seobject.py:2492 -+#: ../semanage/seobject.py:2487 - msgid "Requires setype, serange or seuser" - msgstr "" - --#: ../semanage/seobject.py:2511 ../semanage/seobject.py:2521 -+#: ../semanage/seobject.py:2506 ../semanage/seobject.py:2516 - #, python-format - msgid "Could not query file context for %s" - msgstr "" - --#: ../semanage/seobject.py:2517 ../semanage/seobject.py:2611 -+#: ../semanage/seobject.py:2512 ../semanage/seobject.py:2606 - #, python-format - msgid "File context for %s is not defined" - msgstr "" - --#: ../semanage/seobject.py:2547 -+#: ../semanage/seobject.py:2542 - #, python-format - msgid "Could not modify file context for %s" - msgstr "" - --#: ../semanage/seobject.py:2565 -+#: ../semanage/seobject.py:2560 - msgid "Could not list the file contexts" - msgstr "" - --#: ../semanage/seobject.py:2579 -+#: ../semanage/seobject.py:2574 - #, python-format - msgid "Could not delete the file context %s" - msgstr "" - --#: ../semanage/seobject.py:2609 -+#: ../semanage/seobject.py:2604 - #, python-format - msgid "File context for %s is defined in policy, cannot be deleted" - msgstr "" - --#: ../semanage/seobject.py:2615 -+#: ../semanage/seobject.py:2610 - #, python-format - msgid "Could not delete file context for %s" - msgstr "" - --#: ../semanage/seobject.py:2632 -+#: ../semanage/seobject.py:2627 - msgid "Could not list file contexts" - msgstr "" - --#: ../semanage/seobject.py:2636 -+#: ../semanage/seobject.py:2631 - msgid "Could not list file contexts for home directories" - msgstr "" - --#: ../semanage/seobject.py:2640 -+#: ../semanage/seobject.py:2635 - msgid "Could not list local file contexts" - msgstr "" - --#: ../semanage/seobject.py:2677 -+#: ../semanage/seobject.py:2672 - msgid "SELinux fcontext" - msgstr "" - --#: ../semanage/seobject.py:2690 -+#: ../semanage/seobject.py:2685 - msgid "" - "\n" - "SELinux Distribution fcontext Equivalence \n" - msgstr "" - --#: ../semanage/seobject.py:2695 -+#: ../semanage/seobject.py:2690 - msgid "" - "\n" - "SELinux Local fcontext Equivalence \n" - msgstr "" - --#: ../semanage/seobject.py:2733 ../semanage/seobject.py:2784 --#: ../semanage/seobject.py:2790 -+#: ../semanage/seobject.py:2728 ../semanage/seobject.py:2779 -+#: ../semanage/seobject.py:2785 - #, python-format - msgid "Could not check if boolean %s is defined" - msgstr "" - --#: ../semanage/seobject.py:2735 ../semanage/seobject.py:2786 -+#: ../semanage/seobject.py:2730 ../semanage/seobject.py:2781 - #, python-format - msgid "Boolean %s is not defined" - msgstr "" - --#: ../semanage/seobject.py:2739 -+#: ../semanage/seobject.py:2734 - #, python-format - msgid "Could not query file context %s" - msgstr "" - --#: ../semanage/seobject.py:2744 -+#: ../semanage/seobject.py:2739 - #, python-format - msgid "You must specify one of the following values: %s" - msgstr "" - --#: ../semanage/seobject.py:2749 -+#: ../semanage/seobject.py:2744 - #, python-format - msgid "Could not set active value of boolean %s" - msgstr "" - --#: ../semanage/seobject.py:2752 -+#: ../semanage/seobject.py:2747 - #, python-format - msgid "Could not modify boolean %s" - msgstr "" - --#: ../semanage/seobject.py:2768 --#, python-format --msgid "Bad format %s: Record %s" -+#: ../semanage/seobject.py:2763 -+#, python-brace-format -+msgid "Bad format {filename}: Record {record}" - msgstr "" - --#: ../semanage/seobject.py:2792 -+#: ../semanage/seobject.py:2787 - #, python-format - msgid "Boolean %s is defined in policy, cannot be deleted" - msgstr "" - --#: ../semanage/seobject.py:2796 -+#: ../semanage/seobject.py:2791 - #, python-format - msgid "Could not delete boolean %s" - msgstr "" - --#: ../semanage/seobject.py:2808 ../semanage/seobject.py:2825 -+#: ../semanage/seobject.py:2803 ../semanage/seobject.py:2820 - msgid "Could not list booleans" - msgstr "" - --#: ../semanage/seobject.py:2858 -+#: ../semanage/seobject.py:2853 - msgid "off" - msgstr "" - --#: ../semanage/seobject.py:2858 -+#: ../semanage/seobject.py:2853 - msgid "on" - msgstr "" - --#: ../semanage/seobject.py:2870 -+#: ../semanage/seobject.py:2865 - msgid "SELinux boolean" - msgstr "" - --#: ../semanage/seobject.py:2870 -+#: ../semanage/seobject.py:2865 - msgid "State" - msgstr "" - --#: ../semanage/seobject.py:2870 -+#: ../semanage/seobject.py:2865 - msgid "Default" - msgstr "" - --#: ../semanage/seobject.py:2870 ../sepolicy/sepolicy/sepolicy.glade:2140 -+#: ../semanage/seobject.py:2865 ../sepolicy/sepolicy/sepolicy.glade:2140 - #: ../sepolicy/sepolicy/sepolicy.glade:2510 - #: ../sepolicy/sepolicy/sepolicy.glade:5099 - msgid "Description" -@@ -1555,151 +1566,151 @@ msgstr "" - msgid "Missing interface definition for %s" - msgstr "" - --#: ../sepolicy/sepolicy/generate.py:140 -+#: ../sepolicy/sepolicy/generate.py:138 - msgid "Standard Init Daemon" - msgstr "" - --#: ../sepolicy/sepolicy/generate.py:141 -+#: ../sepolicy/sepolicy/generate.py:139 - msgid "DBUS System Daemon" - msgstr "" - --#: ../sepolicy/sepolicy/generate.py:142 -+#: ../sepolicy/sepolicy/generate.py:140 - msgid "Internet Services Daemon" - msgstr "" - --#: ../sepolicy/sepolicy/generate.py:143 -+#: ../sepolicy/sepolicy/generate.py:141 - msgid "Web Application/Script (CGI)" - msgstr "" - --#: ../sepolicy/sepolicy/generate.py:144 -+#: ../sepolicy/sepolicy/generate.py:142 - msgid "Sandbox" - msgstr "" - --#: ../sepolicy/sepolicy/generate.py:145 -+#: ../sepolicy/sepolicy/generate.py:143 - msgid "User Application" - msgstr "" - --#: ../sepolicy/sepolicy/generate.py:146 -+#: ../sepolicy/sepolicy/generate.py:144 - msgid "Existing Domain Type" - msgstr "" - --#: ../sepolicy/sepolicy/generate.py:147 -+#: ../sepolicy/sepolicy/generate.py:145 - msgid "Minimal Terminal Login User Role" - msgstr "" - --#: ../sepolicy/sepolicy/generate.py:148 -+#: ../sepolicy/sepolicy/generate.py:146 - msgid "Minimal X Windows Login User Role" - msgstr "" - --#: ../sepolicy/sepolicy/generate.py:149 -+#: ../sepolicy/sepolicy/generate.py:147 - msgid "Desktop Login User Role" - msgstr "" - --#: ../sepolicy/sepolicy/generate.py:150 -+#: ../sepolicy/sepolicy/generate.py:148 - msgid "Administrator Login User Role" - msgstr "" - --#: ../sepolicy/sepolicy/generate.py:151 -+#: ../sepolicy/sepolicy/generate.py:149 - msgid "Confined Root Administrator Role" - msgstr "" - --#: ../sepolicy/sepolicy/generate.py:152 -+#: ../sepolicy/sepolicy/generate.py:150 - msgid "Module information for a new type" - msgstr "" - --#: ../sepolicy/sepolicy/generate.py:158 -+#: ../sepolicy/sepolicy/generate.py:156 - msgid "Valid Types:\n" - msgstr "" - --#: ../sepolicy/sepolicy/generate.py:193 -+#: ../sepolicy/sepolicy/generate.py:191 - #, python-format - msgid "Ports must be numbers or ranges of numbers from 1 to %d " - msgstr "" - --#: ../sepolicy/sepolicy/generate.py:205 -+#: ../sepolicy/sepolicy/generate.py:203 - msgid "You must enter a valid policy type" - msgstr "" - --#: ../sepolicy/sepolicy/generate.py:208 -+#: ../sepolicy/sepolicy/generate.py:206 - #, python-format - msgid "You must enter a name for your policy module for your '%s'." - msgstr "" - --#: ../sepolicy/sepolicy/generate.py:346 -+#: ../sepolicy/sepolicy/generate.py:344 - msgid "" - "Name must be alphanumeric with no spaces. Consider using option \"-n " - "MODULENAME\"" - msgstr "" - --#: ../sepolicy/sepolicy/generate.py:438 -+#: ../sepolicy/sepolicy/generate.py:436 - msgid "User Role types can not be assigned executables." - msgstr "" - --#: ../sepolicy/sepolicy/generate.py:444 -+#: ../sepolicy/sepolicy/generate.py:442 - msgid "Only Daemon apps can use an init script." - msgstr "" - --#: ../sepolicy/sepolicy/generate.py:462 -+#: ../sepolicy/sepolicy/generate.py:460 - msgid "use_resolve must be a boolean value " - msgstr "" - --#: ../sepolicy/sepolicy/generate.py:468 -+#: ../sepolicy/sepolicy/generate.py:466 - msgid "use_syslog must be a boolean value " - msgstr "" - --#: ../sepolicy/sepolicy/generate.py:474 -+#: ../sepolicy/sepolicy/generate.py:472 - msgid "use_kerberos must be a boolean value " - msgstr "" - --#: ../sepolicy/sepolicy/generate.py:480 -+#: ../sepolicy/sepolicy/generate.py:478 - msgid "manage_krb5_rcache must be a boolean value " - msgstr "" - --#: ../sepolicy/sepolicy/generate.py:510 -+#: ../sepolicy/sepolicy/generate.py:508 - msgid "USER Types automatically get a tmp type" - msgstr "" - --#: ../sepolicy/sepolicy/generate.py:847 -+#: ../sepolicy/sepolicy/generate.py:845 - #, python-format - msgid "'%s' policy modules require existing domains" - msgstr "" - --#: ../sepolicy/sepolicy/generate.py:872 -+#: ../sepolicy/sepolicy/generate.py:870 - msgid "Type field required" - msgstr "" - --#: ../sepolicy/sepolicy/generate.py:885 -+#: ../sepolicy/sepolicy/generate.py:883 - #, python-format - msgid "" - "You need to define a new type which ends with: \n" - " %s" - msgstr "" - --#: ../sepolicy/sepolicy/generate.py:1113 -+#: ../sepolicy/sepolicy/generate.py:1111 - msgid "You must enter the executable path for your confined process" - msgstr "" - --#: ../sepolicy/sepolicy/generate.py:1378 -+#: ../sepolicy/sepolicy/generate.py:1376 - msgid "Created the following files:\n" - msgstr "" - --#: ../sepolicy/sepolicy/generate.py:1379 -+#: ../sepolicy/sepolicy/generate.py:1377 - msgid "Type Enforcement file" - msgstr "" - --#: ../sepolicy/sepolicy/generate.py:1380 -+#: ../sepolicy/sepolicy/generate.py:1378 - msgid "Interface file" - msgstr "" - --#: ../sepolicy/sepolicy/generate.py:1381 -+#: ../sepolicy/sepolicy/generate.py:1379 - msgid "File Contexts file" - msgstr "" - --#: ../sepolicy/sepolicy/generate.py:1383 -+#: ../sepolicy/sepolicy/generate.py:1381 - msgid "Spec file" - msgstr "" - --#: ../sepolicy/sepolicy/generate.py:1384 -+#: ../sepolicy/sepolicy/generate.py:1382 - msgid "Setup Script" - msgstr "" - -@@ -2367,29 +2378,29 @@ msgstr "" - msgid "named pipe" - msgstr "" - --#: ../sepolicy/sepolicy/__init__.py:148 -+#: ../sepolicy/sepolicy/__init__.py:149 - msgid "No SELinux Policy installed" - msgstr "" - --#: ../sepolicy/sepolicy/__init__.py:184 -+#: ../sepolicy/sepolicy/__init__.py:185 - #, python-format - msgid "Failed to read %s policy file" - msgstr "" - --#: ../sepolicy/sepolicy/__init__.py:470 -+#: ../sepolicy/sepolicy/__init__.py:471 - #, python-format - msgid "-- Allowed %s [ %s ]" - msgstr "" - --#: ../sepolicy/sepolicy/__init__.py:896 -+#: ../sepolicy/sepolicy/__init__.py:897 - msgid "You must regenerate interface info by running /usr/bin/sepolgen-ifgen" - msgstr "" - --#: ../sepolicy/sepolicy/__init__.py:1221 -+#: ../sepolicy/sepolicy/__init__.py:1230 - msgid "unknown" - msgstr "" - --#: ../sepolicy/sepolicy/__init__.py:1230 -+#: ../sepolicy/sepolicy/__init__.py:1239 - #, python-brace-format - msgid "Allow {subject} to {rest}" - msgstr "" --- -2.41.0 - diff --git a/SPECS/policycoreutils.spec b/SPECS/policycoreutils.spec index 338d38d..15daab1 100644 --- a/SPECS/policycoreutils.spec +++ b/SPECS/policycoreutils.spec @@ -1,7 +1,7 @@ %global libauditver 3.0 -%global libsepolver 3.5-1 -%global libsemanagever 3.5-1 -%global libselinuxver 3.5-1 +%global libsepolver 3.6-1 +%global libsemanagever 3.6-1 +%global libselinuxver 3.6-1 %global generatorsdir %{_prefix}/lib/systemd/system-generators @@ -10,11 +10,11 @@ Summary: SELinux policy core utilities Name: policycoreutils -Version: 3.5 -Release: 2%{?dist} +Version: 3.6 +Release: 2.1%{?dist} License: GPL-2.0-or-later # https://github.com/SELinuxProject/selinux/wiki/Releases -Source0: https://github.com/SELinuxProject/selinux/releases/download/3.5/selinux-3.5.tar.gz +Source0: https://github.com/SELinuxProject/selinux/releases/download/3.6/selinux-3.6.tar.gz URL: https://github.com/SELinuxProject/selinux Source13: system-config-selinux.png Source14: sepolicy-icons.tgz @@ -23,12 +23,17 @@ Source16: selinux-autorelabel.service Source17: selinux-autorelabel-mark.service Source18: selinux-autorelabel.target Source19: selinux-autorelabel-generator.sh -Source20: policycoreutils-po.tgz -Source21: python-po.tgz -Source22: gui-po.tgz -Source23: sandbox-po.tgz +# Drop this when upstream updates translations and the package is rebased +# wlc --key --url https://translate.fedoraproject.org/api/ download selinux/policycoreutils --output ./ +Source20: selinux-policycoreutils.zip +# wlc --key --url https://translate.fedoraproject.org/api/ download selinux/python --output ./ +Source21: selinux-python.zip +# wlc --key --url https://translate.fedoraproject.org/api/ download selinux/gui --output ./ +Source22: selinux-gui.zip +# wlc --key --url https://translate.fedoraproject.org/api/ download selinux/sandbox --output ./ +Source23: selinux-sandbox.zip # https://github.com/fedora-selinux/selinux -# $ git format-patch -N 3.5 -- policycoreutils python gui sandbox dbus semodule-utils restorecond +# $ git format-patch -N 3.6 -- policycoreutils python gui sandbox dbus semodule-utils restorecond # $ for j in [0-9]*.patch; do printf "Patch%s: %s\n" ${j/-*/} $j; done # Patch list start Patch0001: 0001-sandbox-add-reset-to-Xephyr-as-it-works-better-with-.patch @@ -39,19 +44,17 @@ Patch0005: 0005-sepolicy-generate-Handle-more-reserved-port-types.patch Patch0006: 0006-sandbox-Use-matchbox-window-manager-instead-of-openb.patch Patch0007: 0007-Use-SHA-2-instead-of-SHA-1.patch Patch0008: 0008-sepolicy-Drop-old-interface-file_type_is_executable-.patch -Patch0009: 0009-python-chcat-Improve-man-pages.patch -Patch0010: 0010-python-audit2allow-Add-missing-options-to-man-page.patch -Patch0011: 0011-python-semanage-Improve-man-pages.patch -Patch0012: 0012-python-audit2allow-Remove-unused-debug-option.patch -Patch0013: 0013-policycoreutils-Add-examples-to-man-pages.patch -Patch0014: 0014-python-sepolicy-Improve-man-pages.patch -Patch0015: 0015-sandbox-Add-examples-to-man-pages.patch -Patch0016: 0016-python-sepolicy-Fix-template-for-confined-user-polic.patch -Patch0017: 0017-python-sepolicy-Fix-spec-file-dependencies.patch -Patch0018: 0018-python-improve-format-strings-for-proper-localizatio.patch -Patch0019: 0019-python-Drop-hard-formating-from-localized-strings.patch -Patch0020: 0020-semanage-Drop-unnecessary-import-from-seobject.patch -Patch0021: 0021-python-update-python.pot.patch +Patch0009: 0009-python-sepolicy-Fix-spec-file-dependencies.patch +Patch0010: 0010-Revert-Do-not-automatically-install-Russian-translat.patch +Patch0011: 0011-Revert-semodule-utils-Remove-the-Russian-translation.patch +Patch0012: 0012-Revert-sandbox-Remove-the-Russian-translations.patch +Patch0013: 0013-Revert-restorecond-Remove-the-Russian-translations.patch +Patch0014: 0014-Revert-python-Remove-the-Russian-translations.patch +Patch0015: 0015-Revert-python-Remove-the-Russian-translations.patch +Patch0016: 0016-Revert-policycoreutils-Remove-the-Russian-translatio.patch +Patch0017: 0017-Revert-gui-Remove-the-Russian-translations.patch +Patch0018: 0018-python-semanage-Allow-modifying-records-on-add.patch +Patch0019: 0019-python-semanage-Do-not-sort-local-fcontext-definitio.patch # Patch list end Obsoletes: policycoreutils < 2.0.61-2 Conflicts: filesystem < 3, selinux-policy-base < 3.13.1-138 @@ -95,12 +98,16 @@ tar -xvf %{SOURCE14} -C python/sepolicy/ # For more information see README.translations # First remove old translation files rm -f policycoreutils/po/*.po python/po/*.po gui/po/*.po sandbox/po/*.po -tar -x -f %{SOURCE20} -C policycoreutils -z -tar -x -f %{SOURCE21} -C python -z -tar -x -f %{SOURCE22} -C gui -z -tar -x -f %{SOURCE23} -C sandbox -z +unzip %{SOURCE20} +cp -r selinux/policycoreutils/po policycoreutils +unzip %{SOURCE21} +cp -r selinux/python/po python +unzip %{SOURCE22} +cp -r selinux/gui/po gui +unzip %{SOURCE23} +cp -r selinux/sandbox/po sandbox -%build +%Build %set_build_flags export PYTHON=%{__python3} @@ -457,6 +464,20 @@ The policycoreutils-restorecond package contains the restorecond service. %systemd_postun_with_restart restorecond.service %changelog +* Mon Feb 19 2024 Petr Lautrbach - 3.6-2.1 +- semanage: Allow modifying records on "add" +- semanage: Do not sort local fcontext definitions + +* Thu Dec 14 2023 Petr Lautrbach - 3.6-1 +- SELinux userspace 3.6 release + +* Mon Nov 13 2023 Petr Lautrbach - 3.0-0.rc1.1 +- SELinux userspace 3.6-rc1 release + +* Mon Oct 30 2023 Petr Lautrbach - 3.5-3 +- Update translations + https://translate.fedoraproject.org/projects/selinux/ + * Tue Jun 27 2023 Petr Lautrbach - 3.5-2 - Improve man pages (RHEL-672) - Unwrap strings - remove hard returns and initial white spaces from strings (RHEL-606)