Update to upstream
This commit is contained in:
parent
205e3429b9
commit
0e639a9ea0
File diff suppressed because it is too large
Load Diff
348031
policycoreutils-rhat.patch
348031
policycoreutils-rhat.patch
File diff suppressed because it is too large
Load Diff
@ -1,18 +1,8 @@
|
||||
diff --git a/sepolgen/src/sepolgen/audit.py b/sepolgen/src/sepolgen/audit.py
|
||||
index 73c60f6..9ca35a7 100644
|
||||
index d636091..9ca35a7 100644
|
||||
--- a/sepolgen/src/sepolgen/audit.py
|
||||
+++ b/sepolgen/src/sepolgen/audit.py
|
||||
@@ -38,8 +38,7 @@ def get_audit_boot_msgs():
|
||||
off=float(fd.read().split()[0])
|
||||
fd.close
|
||||
s = time.localtime(time.time() - off)
|
||||
- date = time.strftime("%D/%Y", s).split("/")
|
||||
- bootdate="%s/%s/%s" % (date[0], date[1], date[3])
|
||||
+ bootdate = time.strftime("%x", s)
|
||||
boottime = time.strftime("%X", s)
|
||||
output = subprocess.Popen(["/sbin/ausearch", "-m", "AVC,USER_AVC,MAC_POLICY_LOAD,DAEMON_START,SELINUX_ERR", "-ts", bootdate, boottime],
|
||||
stdout=subprocess.PIPE).communicate()[0]
|
||||
@@ -260,7 +259,7 @@ class AVCMessage(AuditMessage):
|
||||
@@ -259,7 +259,7 @@ class AVCMessage(AuditMessage):
|
||||
raise ValueError("Error during access vector computation")
|
||||
|
||||
if self.type == audit2why.CONSTRAINT:
|
||||
@ -21,131 +11,3 @@ index 73c60f6..9ca35a7 100644
|
||||
if self.scontext.user != self.tcontext.user:
|
||||
self.data.append("user")
|
||||
if self.scontext.role != self.tcontext.role and self.tcontext.role != "object_r":
|
||||
diff --git a/sepolgen/src/sepolgen/refparser.py b/sepolgen/src/sepolgen/refparser.py
|
||||
index a4adbd8..7b76261 100644
|
||||
--- a/sepolgen/src/sepolgen/refparser.py
|
||||
+++ b/sepolgen/src/sepolgen/refparser.py
|
||||
@@ -91,8 +91,10 @@ tokens = (
|
||||
'CLASS',
|
||||
# types and attributes
|
||||
'TYPEATTRIBUTE',
|
||||
+ 'ROLEATTRIBUTE',
|
||||
'TYPE',
|
||||
'ATTRIBUTE',
|
||||
+ 'ATTRIBUTE_ROLE',
|
||||
'ALIAS',
|
||||
'TYPEALIAS',
|
||||
# conditional policy
|
||||
@@ -153,8 +155,10 @@ reserved = {
|
||||
'class' : 'CLASS',
|
||||
# types and attributes
|
||||
'typeattribute' : 'TYPEATTRIBUTE',
|
||||
+ 'roleattribute' : 'ROLEATTRIBUTE',
|
||||
'type' : 'TYPE',
|
||||
'attribute' : 'ATTRIBUTE',
|
||||
+ 'attribute_role' : 'ATTRIBUTE_ROLE',
|
||||
'alias' : 'ALIAS',
|
||||
'typealias' : 'TYPEALIAS',
|
||||
# conditional policy
|
||||
@@ -489,6 +493,7 @@ def p_policy_stmt(p):
|
||||
| avrule_def
|
||||
| typerule_def
|
||||
| typeattribute_def
|
||||
+ | roleattribute_def
|
||||
| interface_call
|
||||
| role_def
|
||||
| role_allow
|
||||
@@ -496,6 +501,7 @@ def p_policy_stmt(p):
|
||||
| type_def
|
||||
| typealias_def
|
||||
| attribute_def
|
||||
+ | attribute_role_def
|
||||
| range_transition_def
|
||||
| role_transition_def
|
||||
| bool
|
||||
@@ -542,6 +548,7 @@ def p_require(p):
|
||||
'''require : TYPE comma_list SEMI
|
||||
| ROLE comma_list SEMI
|
||||
| ATTRIBUTE comma_list SEMI
|
||||
+ | ATTRIBUTE_ROLE comma_list SEMI
|
||||
| CLASS comma_list SEMI
|
||||
| BOOL comma_list SEMI
|
||||
'''
|
||||
@@ -727,6 +734,11 @@ def p_attribute_def(p):
|
||||
a = refpolicy.Attribute(p[2])
|
||||
p[0] = a
|
||||
|
||||
+def p_attribute_role_def(p):
|
||||
+ 'attribute_role_def : ATTRIBUTE_ROLE IDENTIFIER SEMI'
|
||||
+ a = refpolicy.Attribute_Role(p[2])
|
||||
+ p[0] = a
|
||||
+
|
||||
def p_typealias_def(p):
|
||||
'typealias_def : TYPEALIAS IDENTIFIER ALIAS names SEMI'
|
||||
t = refpolicy.TypeAlias()
|
||||
@@ -819,6 +831,13 @@ def p_typeattribute_def(p):
|
||||
t.attributes.update(p[3])
|
||||
p[0] = t
|
||||
|
||||
+def p_roleattribute_def(p):
|
||||
+ '''roleattribute_def : ROLEATTRIBUTE IDENTIFIER comma_list SEMI'''
|
||||
+ t = refpolicy.RoleAttribute()
|
||||
+ t.role = p[2]
|
||||
+ t.roleattributes.update(p[3])
|
||||
+ p[0] = t
|
||||
+
|
||||
def p_range_transition_def(p):
|
||||
'''range_transition_def : RANGE_TRANSITION names names COLON names mls_range_def SEMI
|
||||
| RANGE_TRANSITION names names names SEMI'''
|
||||
diff --git a/sepolgen/src/sepolgen/refpolicy.py b/sepolgen/src/sepolgen/refpolicy.py
|
||||
index 1399225..b07550a 100644
|
||||
--- a/sepolgen/src/sepolgen/refpolicy.py
|
||||
+++ b/sepolgen/src/sepolgen/refpolicy.py
|
||||
@@ -117,6 +117,10 @@ class Node(PolicyBase):
|
||||
"""Iterate over all of the TypeAttribute children of this Interface."""
|
||||
return itertools.ifilter(lambda x: isinstance(x, TypeAttribute), walktree(self))
|
||||
|
||||
+ def roleattributes(self):
|
||||
+ """Iterate over all of the RoleAttribute children of this Interface."""
|
||||
+ return itertools.ifilter(lambda x: isinstance(x, RoleAttribute), walktree(self))
|
||||
+
|
||||
def requires(self):
|
||||
return itertools.ifilter(lambda x: isinstance(x, Require), walktree(self))
|
||||
|
||||
@@ -356,6 +360,20 @@ class TypeAttribute(Leaf):
|
||||
def to_string(self):
|
||||
return "typeattribute %s %s;" % (self.type, self.attributes.to_comma_str())
|
||||
|
||||
+class RoleAttribute(Leaf):
|
||||
+ """SElinux typeattribute statement.
|
||||
+
|
||||
+ This class represents a typeattribute statement.
|
||||
+ """
|
||||
+ def __init__(self, parent=None):
|
||||
+ Leaf.__init__(self, parent)
|
||||
+ self.role = ""
|
||||
+ self.roleattributes = IdSet()
|
||||
+
|
||||
+ def to_string(self):
|
||||
+ return "roleattribute %s %s;" % (self.role, self.roleattributes.to_comma_str())
|
||||
+
|
||||
+
|
||||
class Role(Leaf):
|
||||
def __init__(self, parent=None):
|
||||
Leaf.__init__(self, parent)
|
||||
@@ -400,6 +418,15 @@ class Attribute(Leaf):
|
||||
def to_string(self):
|
||||
return "attribute %s;" % self.name
|
||||
|
||||
+class Attribute_Role(Leaf):
|
||||
+ def __init__(self, name="", parent=None):
|
||||
+ Leaf.__init__(self, parent)
|
||||
+ self.name = name
|
||||
+
|
||||
+ def to_string(self):
|
||||
+ return "attribute_role %s;" % self.name
|
||||
+
|
||||
+
|
||||
# Classes representing rules
|
||||
|
||||
class AVRule(Leaf):
|
||||
|
@ -1,26 +1,20 @@
|
||||
%define libauditver 2.1.3-4
|
||||
%define libsepolver 2.1.8-7
|
||||
%define libsemanagever 2.1.9-1
|
||||
%define libselinuxver 2.1.12-19
|
||||
%define sepolgenver 1.1.8
|
||||
%define libsepolver 2.1.9-1
|
||||
%define libsemanagever 2.1.10-1
|
||||
%define libselinuxver 2.1.13-1
|
||||
%define sepolgenver 1.1.9
|
||||
|
||||
Summary: SELinux policy core utilities
|
||||
Name: policycoreutils
|
||||
Version: 2.1.13
|
||||
Release: 58%{?dist}
|
||||
Version: 2.1.14
|
||||
Release: 1%{?dist}
|
||||
License: GPLv2
|
||||
Group: System Environment/Base
|
||||
# Based on git repository with tag 20101221
|
||||
Source: git://oss.tresys.com/git/selinux/policycoreutils-%{version}.tgz
|
||||
Source1: git://oss.tresys.com/git/selinux/sepolgen-%{sepolgenver}.tgz
|
||||
URL: http://www.selinuxproject.org
|
||||
Source2: system-config-selinux.png
|
||||
Source3: system-config-selinux.desktop
|
||||
Source4: system-config-selinux.pam
|
||||
Source5: system-config-selinux.console
|
||||
Source6: selinux-polgengui.desktop
|
||||
Source8: policycoreutils_man_ru2.tar.bz2
|
||||
Source10: restorecond.service
|
||||
Source2: policycoreutils_man_ru2.tar.bz2
|
||||
Patch: policycoreutils-rhat.patch
|
||||
Patch1: policycoreutils-sepolgen.patch
|
||||
Obsoletes: policycoreutils < 2.0.61-2
|
||||
@ -76,28 +70,17 @@ mkdir -p %{buildroot}%{_sbindir}
|
||||
mkdir -p %{buildroot}%{_mandir}/man1
|
||||
mkdir -p %{buildroot}%{_mandir}/man5
|
||||
mkdir -p %{buildroot}%{_mandir}/man8
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/pam.d
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/security/console.apps
|
||||
%{__mkdir} -p %{buildroot}%{_datadir}/icons/hicolor/24x24/apps
|
||||
%{__mkdir} -p %{buildroot}%{_datadir}/pixmaps
|
||||
%{__mkdir} -p %{buildroot}/%{_usr}/share/doc/%{name}-%{version}/
|
||||
cp COPYING %{buildroot}/%{_usr}/share/doc/%{name}-%{version}/
|
||||
|
||||
make LSPP_PRIV=y DESTDIR="%{buildroot}" SBINDIR="%{buildroot}%{_sbindir}" LIBDIR="%{buildroot}%{_libdir}" SEMODULE_PATH="/usr/sbin" install
|
||||
make -C gui LSPP_PRIV=y DESTDIR="%{buildroot}" SBINDIR="%{buildroot}%{_sbindir}" LIBDIR="%{buildroot}%{_libdir}" install
|
||||
# Systemd
|
||||
mkdir -p %{buildroot}%{_unitdir}
|
||||
install -m644 %{SOURCE10} %{buildroot}%{_unitdir}
|
||||
rm -rf %{buildroot}/%{_sysconfdir}/rc.d/init.d/restorecond
|
||||
|
||||
make -C sepolgen-%{sepolgenver} DESTDIR="%{buildroot}" SBINDIR="%{buildroot}%{_sbindir}" LIBDIR="%{buildroot}%{_libdir}" install
|
||||
|
||||
install -m 644 %{SOURCE2} %{buildroot}%{_datadir}/pixmaps
|
||||
install -m 644 %{SOURCE2} %{buildroot}%{_datadir}/icons/hicolor/24x24/apps
|
||||
install -m 644 %{SOURCE2} %{buildroot}%{_datadir}/system-config-selinux
|
||||
install -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/pam.d/system-config-selinux
|
||||
install -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/security/console.apps/system-config-selinux
|
||||
tar -jxf %{SOURCE8} -C %{buildroot}/
|
||||
tar -jxf %{SOURCE2} -C %{buildroot}/
|
||||
rm -f %{buildroot}/usr/share/man/ru/man8/genhomedircon.8.gz
|
||||
rm -f %{buildroot}/usr/share/man/ru/man8/open_init_pty.8.gz
|
||||
rm -f %{buildroot}/usr/share/man/man8/open_init_pty.8
|
||||
@ -113,11 +96,14 @@ ln -sf /usr/share/system-config-selinux/polgengui.py %{buildroot}%{_bindir}/seli
|
||||
desktop-file-install --vendor fedora \
|
||||
--dir ${RPM_BUILD_ROOT}%{_datadir}/applications \
|
||||
--add-category Settings \
|
||||
%{SOURCE3}
|
||||
%{buildroot}%{_datadir}/system-config-selinux/system-config-selinux.desktop
|
||||
|
||||
desktop-file-install --vendor fedora \
|
||||
--dir ${RPM_BUILD_ROOT}%{_datadir}/applications \
|
||||
%{SOURCE6}
|
||||
%{buildroot}%{_datadir}/system-config-selinux/selinux-polgengui.desktop
|
||||
rm -f %{buildroot}%{_datadir}/system-config-selinux/selinux-polgengui.desktop
|
||||
rm -f %{buildroot}%{_datadir}/system-config-selinux/system-config-selinux.desktop
|
||||
|
||||
%find_lang %{name}
|
||||
|
||||
%package python
|
||||
@ -146,7 +132,6 @@ The policycoreutils-python package contains the management tools use to manage a
|
||||
%{python_sitelib}/sepolicy*.egg-info
|
||||
%{pkgpythondir}
|
||||
%dir /var/lib/selinux
|
||||
%{_mandir}/man1/audit2why.1*
|
||||
%{_mandir}/man8/chcat.8*
|
||||
%{_mandir}/ru/man8/chcat.8*
|
||||
%{_mandir}/man8/sandbox.8*
|
||||
@ -180,6 +165,7 @@ The policycoreutils-devel package contains the management tools use to develop p
|
||||
/var/lib/sepolgen/perm_map
|
||||
%{_mandir}/man1/audit2allow.1*
|
||||
%{_mandir}/ru/man1/audit2allow.1*
|
||||
%{_mandir}/man1/audit2why.1*
|
||||
|
||||
%post devel
|
||||
selinuxenabled && [ -f /usr/share/selinux/devel/include/build.conf ] && /usr/bin/sepolgen-ifgen 2>/dev/null
|
||||
@ -338,6 +324,9 @@ The policycoreutils-restorecond package contains the restorecond service.
|
||||
%{_bindir}/systemctl try-restart restorecond.service >/dev/null 2>&1 || :
|
||||
|
||||
%changelog
|
||||
* Thu Feb 7 2013 Dan Walsh <dwalsh@redhat.com> - 2.1.14-1
|
||||
- Update to upstream
|
||||
|
||||
* Thu Jan 31 2013 Dan Walsh <dwalsh@redhat.com> - 2.1.12-58
|
||||
- Reorginize sepolicy so all get_all functions are in main module
|
||||
- Add -B capability to fixfiles onboot and fixfiles restore, basically searches for all files created since the last boot.
|
||||
|
@ -1,12 +0,0 @@
|
||||
[Unit]
|
||||
Description=Restorecon maintaining path file context
|
||||
After=syslog.target
|
||||
ConditionPathExists=/etc/selinux/restorecond.conf
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/sbin/restorecond
|
||||
RemainAfterExit=yes
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
@ -1,3 +0,0 @@
|
||||
USER=root
|
||||
PROGRAM=/usr/share/system-config-selinux/polgengui.py
|
||||
SESSION=true
|
@ -1,67 +0,0 @@
|
||||
[Desktop Entry]
|
||||
Name=SELinux Policy Generation Tool
|
||||
Name[bn_IN]=SELinux Policy নির্মাণের সামগ্রী
|
||||
Name[ca]=Eina de generació de polítiques del SELinux
|
||||
Name[da]=Regelsætgenereringsværktøj til SELinux
|
||||
Name[de]=Tool zur Erstellung von SELinux-Richtlinien
|
||||
Name[es]=Generador de Políticas de SELinux
|
||||
Name[fi]=SELinux-käytäntöjen generointityökalu
|
||||
Name[fr]=Outil de génération de stratégies SELinux
|
||||
Name[gu]=SELinux પોલિસી બનાવટ સાધન
|
||||
Name[hi]=SELinux पॉलिसी जनन औजार
|
||||
Name[it]=Tool di generazione della policy di SELinux
|
||||
Name[ja]=SELinux ポリシー生成ツール
|
||||
Name[kn]=SELinux ಪಾಲಿಸಿ ಉತ್ಪಾದನಾ ಉಪಕರಣ
|
||||
Name[ko]=SELinux 정책 생성 도구
|
||||
Name[ml]=SELinux പോളിസി ഉത്പാദന പ്രയോഗം
|
||||
Name[mr]=SELinux करार निर्माण साधन
|
||||
Name[nl]=SELinux tactiek generatie gereedschap
|
||||
Name[or]=SELinux ନୀତି ସୃଷ୍ଟି ଉପକରଣ
|
||||
Name[pa]=SELinux ਪਾਲਿਸੀ ਨਿਰਮਾਣ ਜੰਤਰ
|
||||
Name[pl]=Narzędzie tworzenia polityki SELinuksa
|
||||
Name[pt]=Ferramenta de Geração de Políticas SELinux
|
||||
Name[pt_BR]=Ferramenta de criação de políticas do SELinux
|
||||
Name[ru]=Средство создания политики SELinux
|
||||
Name[sv]=Genereringsverktyg för SELinuxpolicy
|
||||
Name[ta]=SELinux பாலிசி உற்பத்தி கருவி
|
||||
Name[te]=SELinux నిర్వహణ
|
||||
Name[uk]=Утиліта генерації правил SELinux
|
||||
Name[zh_CN]=SELinux 策略生成工具
|
||||
Name[zh_TW]=SELinux 政策產生工具(SELinux Policy Generation Tool)
|
||||
Comment=Generate SELinux policy modules
|
||||
Comment[bn_IN]=SELinux নিয়মনীতির মডিউল নির্মাণ করুন
|
||||
Comment[ca]=Genera els mòduls de les polítiques de SELinux
|
||||
Comment[da]=Generér SELinux-regelsætmodul
|
||||
Comment[de]=Tool zur Erstellung von SELinux-Richtlinien
|
||||
Comment[es]=Generar módulos de política de SELinux
|
||||
Comment[fi]=Generoi SELinuxin käytäntömoduuleja
|
||||
Comment[fr]=Génére des modules de stratégie SELinux
|
||||
Comment[gu]=SELinux પોલિસી મોડ્યુલોને ઉત્પન્ન કરો
|
||||
Comment[hi]=नया पॉलिसी मॉड्यूल उत्पन्न करें
|
||||
Comment[it]=Genera moduli della politica di SELinux
|
||||
Comment[ja]=新しいポリシーモジュールの作成
|
||||
Comment[kn]=SELinux ಪಾಲಿಸಿ ಘಟಕಗಳನ್ನು ಉತ್ಪಾದಿಸು
|
||||
Comment[ko]=SELinux 정책 모듈 생성
|
||||
Comment[ml]=SELinux യ പോളിസി ഘങ്ങള് തയ്യാറാക്കുക
|
||||
Comment[mr]=SELinux करार घटके निर्माण करा
|
||||
Comment[nl]=Maak een SELinux tactiek module aan
|
||||
Comment[or]=SELinux ନୀତି ଏକକାଂଶ ସୃଷ୍ଟିକରନ୍ତୁ
|
||||
Comment[pa]=SELinux ਪਾਲਿਸੀ ਮੈਡਿਊਲ ਬਣਾਓ
|
||||
Comment[pl]=Tworzenie nowych modułów polityki SELinuksa
|
||||
Comment[pt]=Gerar módulos de políticas SELinux
|
||||
Comment[pt_BR]=Gerar módulos de política do SELinux
|
||||
Comment[ru]=Генерация модулей политики SELinux
|
||||
Comment[sv]=Generera SELinux-policymoduler
|
||||
Comment[ta]=SELinux கொள்கை தொகுதியை உருவாக்கவும்
|
||||
Comment[te]=SELinux పాలసీ మాడ్యూళ్ళను వుద్భవింపచేయుము
|
||||
Comment[uk]=Створення модулів контролю доступу SELinux
|
||||
Comment[zh_CN]=生成 SELinux 策略模块
|
||||
Comment[zh_TW]=產生 SELinux 政策模組
|
||||
StartupNotify=true
|
||||
Icon=system-config-selinux
|
||||
Exec=/usr/bin/selinux-polgengui
|
||||
Type=Application
|
||||
Terminal=false
|
||||
Categories=System;Security;
|
||||
X-Desktop-File-Install-Version=0.2
|
||||
Keywords=policy;security;selinux;avc;permission;mac;
|
@ -1,151 +0,0 @@
|
||||
# This file is part of systemd.
|
||||
#
|
||||
# Copyright 2011 Dan Walsh
|
||||
#
|
||||
# systemd is free software; 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.
|
||||
#
|
||||
# systemd 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 systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
__contains_word () {
|
||||
local word=$1; shift
|
||||
for w in $*; do [[ $w = $word ]] && return 0; done
|
||||
return 1
|
||||
}
|
||||
|
||||
ALL_OPTS='-l --list -S -o -n --noheading -h --help'
|
||||
MANAGED_OPTS='-a --add -m --modify -d --delete -D --deleteall -C --locallist '
|
||||
|
||||
__get_all_stores () {
|
||||
dir -1 -F /etc/selinux/ | grep '/' | cut -d'/' -f 1
|
||||
}
|
||||
__get_all_ftypes () {
|
||||
echo '-- -d -c -b -s -l -p'
|
||||
}
|
||||
__get_all_users () {
|
||||
seinfo -u 2> /dev/null | tail -n +3
|
||||
}
|
||||
__get_all_types () {
|
||||
seinfo -t 2> /dev/null | tail -n +3
|
||||
}
|
||||
__get_all_port_types () {
|
||||
seinfo -aport_type -x 2>/dev/null | tail -n +2
|
||||
}
|
||||
__get_all_domains () {
|
||||
seinfo -adomain -x 2>/dev/null | tail -n +2
|
||||
}
|
||||
__get_all_node_types () {
|
||||
seinfo -anode_type -x 2>/dev/null | tail -n +2
|
||||
}
|
||||
__get_all_file_types () {
|
||||
seinfo -afile_type -x 2>/dev/null | tail -n +2
|
||||
}
|
||||
__get_all_roles () {
|
||||
seinfo -t 2> /dev/null | tail -n +3
|
||||
}
|
||||
__get_all_stores () {
|
||||
dir -1 -F /etc/selinux/ | grep '/' | cut -d'/' -f 1
|
||||
}
|
||||
__get_boolean_opts () { echo '$ALL_OPTS --on -off -1 -0 -F' ; }
|
||||
__get_user_opts () { echo '$ALL_OPTS $MANAGED_OPTS -L -r -R --role '; }
|
||||
__get_login_opts () { echo '$ALL_OPTS $MANAGED_OPTS -s -r '; }
|
||||
__get_port_opts () { echo '$ALL_OPTS $MANAGED_OPTS -t -type -r --range -p --proto'; }
|
||||
__get_interface_opts () { echo '$ALL_OPTS $MANAGED_OPTS -t --type '; }
|
||||
__get_node_opts () { echo '$ALL_OPTS $MANAGED_OPTS -t --type -M --mask -p --proto'; }
|
||||
__get_fcontext_opts () { echo '$ALL_OPTS $MANAGED_OPTS -t --type -e --equal -f --ftype '; }
|
||||
__get_module_opts () { echo '$ALL_OPTS --enable --disable '; }
|
||||
__get_dontaudit_opts () { echo '-S on off' ; }
|
||||
__get_permissive_opts () { echo '$ALL_OPTS -a --add -d --delete' ; }
|
||||
|
||||
_semanage () {
|
||||
local command=${COMP_WORDS[1]}
|
||||
local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}
|
||||
local verb comps
|
||||
local -A VERBS=(
|
||||
[LOGIN]='login'
|
||||
[USER]='user'
|
||||
[PORT]='port'
|
||||
[INTERFACE]='interface'
|
||||
[MODULE]='module'
|
||||
[NODE]='node'
|
||||
[FCONTEXT]='fcontext'
|
||||
[BOOLEAN]='boolean'
|
||||
[PERMISSIVE]='permissive'
|
||||
[DONTAUDIT]='dontaudit'
|
||||
)
|
||||
|
||||
if [ "$prev" = "-a" -a "$command" = "permissive" ]; then
|
||||
COMPREPLY=( $(compgen -W "$( __get_all_domains ) " -- "$cur") )
|
||||
return 0
|
||||
fi
|
||||
if [ "$verb" = "" -a "$prev" = "semanage" ]; then
|
||||
comps="${VERBS[*]}"
|
||||
elif [ "$verb" = "" -a "$prev" = "-S" -o "$prev" = "--store" ]; then
|
||||
COMPREPLY=( $(compgen -W "$( __get_all_stores ) " -- "$cur") )
|
||||
return 0
|
||||
elif [ "$verb" = "" -a "$prev" = "-p" -o "$prev" = "--proto" ]; then
|
||||
COMPREPLY=( $(compgen -W "tcp udp" -- "$cur") )
|
||||
return 0
|
||||
elif [ "$verb" = "" -a "$prev" = "-r" -o "$prev" = "--roles" ]; then
|
||||
COMPREPLY=( $(compgen -W "$( __get_all_roles ) " -- "$cur") )
|
||||
return 0
|
||||
elif [ "$verb" = "" -a "$prev" = "-s" -o "$prev" = "--seuser" ]; then
|
||||
COMPREPLY=( $(compgen -W "$( __get_all_users ) " -- "$cur") )
|
||||
return 0
|
||||
elif [ "$verb" = "" -a "$prev" = "-f" -o "$prev" = "--ftype" ]; then
|
||||
COMPREPLY=( $(compgen -W "$( __get_all_ftypes ) " -- "$cur") )
|
||||
return 0
|
||||
elif [ "$verb" = "" -a "$prev" = "-t" -o "$prev" = "--types" ]; then
|
||||
if [ "$command" = "port" ]; then
|
||||
COMPREPLY=( $(compgen -W "$( __get_all_port_types ) " -- "$cur") )
|
||||
return 0
|
||||
fi
|
||||
if [ "$command" = "fcontext" ]; then
|
||||
COMPREPLY=( $(compgen -W "$( __get_all_file_types ) " -- "$cur") )
|
||||
return 0
|
||||
fi
|
||||
COMPREPLY=( $(compgen -W "$( __get_all_types ) " -- "$cur") )
|
||||
return 0
|
||||
elif __contains_word "$command" ${VERBS[LOGIN]} ; then
|
||||
COMPREPLY=( $(compgen -W "$( __get_login_opts ) " -- "$cur") )
|
||||
return 0
|
||||
elif __contains_word "$command" ${VERBS[USER]} ; then
|
||||
COMPREPLY=( $(compgen -W "$( __get_user_opts ) " -- "$cur") )
|
||||
return 0
|
||||
elif __contains_word "$command" ${VERBS[PORT]} ; then
|
||||
COMPREPLY=( $(compgen -W "$( __get_port_opts ) " -- "$cur") )
|
||||
return 0
|
||||
elif __contains_word "$command" ${VERBS[INTERFACE]} ; then
|
||||
COMPREPLY=( $(compgen -W "$( __get_interface_opts ) " -- "$cur") )
|
||||
return 0p
|
||||
elif __contains_word "$command" ${VERBS[MODULE]} ; then
|
||||
COMPREPLY=( $(compgen -W "$( __get_module_opts ) " -- "$cur") )
|
||||
return 0
|
||||
elif __contains_word "$command" ${VERBS[NODE]} ; then
|
||||
COMPREPLY=( $(compgen -W "$( __get_node_opts ) " -- "$cur") )
|
||||
return 0
|
||||
elif __contains_word "$command" ${VERBS[FCONTEXT]} ; then
|
||||
COMPREPLY=( $(compgen -W "$( __get_fcontext_opts ) " -- "$cur") )
|
||||
return 0
|
||||
elif __contains_word "$command" ${VERBS[BOOLEAN]} ; then
|
||||
COMPREPLY=( $(compgen -W "$( __get_boolean_opts ) " -- "$cur") )
|
||||
return 0
|
||||
elif __contains_word "$command" ${VERBS[PERMISSIVE]} ; then
|
||||
COMPREPLY=( $(compgen -W "$( __get_permissive_opts ) " -- "$cur") )
|
||||
return 0
|
||||
elif __contains_word "$command" ${VERBS[DONTAUDIT]} ; then
|
||||
COMPREPLY=( $(compgen -W "$( __get_dontaudit_opts ) " -- "$cur") )
|
||||
return 0
|
||||
fi
|
||||
COMPREPLY=( $(compgen -W "$comps" -- "$cur") )
|
||||
return 0
|
||||
}
|
||||
complete -F _semanage semanage
|
4
sources
4
sources
@ -1,3 +1,3 @@
|
||||
59d33101d57378ce69889cc078addf90 policycoreutils_man_ru2.tar.bz2
|
||||
381607ecf76bcb9397286143c93071cb sepolgen-1.1.8.tgz
|
||||
98f13937f6723d7eb85b3adaf6b477e6 policycoreutils-2.1.13.tgz
|
||||
22cb999c28b40b59a9d6b11824480ab8 policycoreutils-2.1.14.tgz
|
||||
960f29b498ba7efaa3aeb5e3796a1ba3 sepolgen-1.1.9.tgz
|
||||
|
@ -1,3 +0,0 @@
|
||||
USER=root
|
||||
PROGRAM=/usr/share/system-config-selinux/system-config-selinux.py
|
||||
SESSION=true
|
@ -1,67 +0,0 @@
|
||||
[Desktop Entry]
|
||||
Name=SELinux Management
|
||||
Name[bn_IN]=SELinux পরিচালনা
|
||||
Name[da]=Håndtering af SELinux
|
||||
Name[de]=SELinux-Management
|
||||
Name[ca]=Gestió de SELinux
|
||||
Name[es]=Administración de SELinux
|
||||
Name[fi]=SELinuxin ylläpito
|
||||
Name[fr]=Gestion de SELinux
|
||||
Name[gu]=SELinux સંચાલન
|
||||
Name[hi]=SELinux प्रबंधन
|
||||
Name[jp]=SELinux 管理
|
||||
Name[it]=Gestione di SELinux
|
||||
Name[kn]=SELinux ವ್ಯವಸ್ಥಾಪನೆ
|
||||
Name[ko]=SELinux 관리
|
||||
Name[ml]=SELinux മാനേജ്മെന്റ്
|
||||
Name[mr]=SELinux मॅनेजमेंट
|
||||
Name[nl]=SELinux beheer
|
||||
Name[or]=SELinux ପରିଚାଳନା
|
||||
Name[pa]=SELinux ਮੈਨੇਜਮੈਂਟ
|
||||
Name[pl]=Zarządzanie SELinuksem
|
||||
Name[pt_BR]=Gerenciamento do SELinux
|
||||
Name[pt]=Gestão de SELinux
|
||||
Name[ru]=Управление SELinux
|
||||
Name[sv]=SELinux-hantering
|
||||
Name[ta]=SELinux மேலாண்மை
|
||||
Name[te]=SELinux నిర్వహణ
|
||||
Name[uk]=Керування SELinux
|
||||
Name[zh_CN]=SELinux 管理
|
||||
Name[zh_TW]=SELinux 管理
|
||||
Comment=Configure SELinux in a graphical setting
|
||||
Comment[bn_IN]=গ্রাফিক্যাল পরিবেশে SELinux কনফিগার করুন
|
||||
Comment[ca]=Configura SELinuc an mode de preferències gràfiques
|
||||
Comment[da]=Konfigurér SELinux i et grafisk miljø
|
||||
Comment[de]=SELinux in einer grafischen Einstellung konfigurieren
|
||||
Comment[es]=Defina SELinux en una configuración de interfaz gráfica
|
||||
Comment[fi]=Tee SELinuxin asetukset graafisesti
|
||||
Comment[fr]=Configure SELinux dans un environnement graphique
|
||||
Comment[gu]=ગ્રાફિકલ સુયોજનમાં SELinux ને રૂપરેખાંકિત કરો
|
||||
Comment[hi]=SELinux को आलेखी सेटिंग में विन्यस्त करें
|
||||
Comment[it]=Configura SELinux in una impostazione grafica
|
||||
Comment[jp]=グラフィカルな設定画面で SELinux を設定する
|
||||
Comment[ko]=SELinux를 그래픽 사용자 인터페이스로 설정
|
||||
Comment[kn]=SELinux ಅನ್ನು ಒಂದು ಚಿತ್ರಾತ್ಮಕ ಸಿದ್ದತೆಯಲ್ಲಿ ಸಂರಚಿಸಿ
|
||||
Comment[ml]=ഒരു ഗ്രാഫിക്കല് സജ്ജീകരണത്തില് SELinux ക്രമീകരിയ്ക്കുക
|
||||
Comment[mr]=ग्राफिकल सेटिंगमध्ये SELinux संरचीत करा
|
||||
Comment[nl]=Configureer SELinux in een grafische omgeving
|
||||
Comment[or]=SELinux କୁ ଆଲେଖିକ ସଂରଚନାରେ ବିନ୍ୟାସ କରନ୍ତୁ
|
||||
Comment[pa]=SELinux ਨੂੰ ਗਰਾਫੀਕਲ ਸੈਟਿੰਗ ਵਿੱਚ ਸੰਰਚਿਤ ਕਰੋ
|
||||
Comment[pl]=Konfiguracja SELinuksa w trybie graficznym
|
||||
Comment[pt]=Configurar o SELinux num ambiente gráfico
|
||||
Comment[pt_BR]=Configure o SELinux em uma configuração gráfica
|
||||
Comment[ru]=Настройка SELinux в графическом режиме
|
||||
Comment[sv]=Konfigurera SELinux i en grafisk miljö
|
||||
Comment[ta]=SELinuxஐ ஒரு வரைகலை அமைவில் கட்டமைக்கவும்
|
||||
Comment[te]=SELinuxను గ్రాఫికల్ అమర్పునందు ఆకృతీకరించుము
|
||||
Comment[uk]=Засіб для налаштування SELinux з графічним інтерфейсом
|
||||
Comment[zh_CN]=在图形设置中配置 SELinux
|
||||
Comment[zh_TW]=在圖形話設定中配置 SELinux
|
||||
StartupNotify=true
|
||||
Icon=system-config-selinux
|
||||
Exec=/usr/bin/system-config-selinux
|
||||
Type=Application
|
||||
Terminal=false
|
||||
Categories=System;Security;
|
||||
X-Desktop-File-Install-Version=0.2
|
||||
Keywords=policy;security;selinux;avc;permission;mac;
|
@ -1,8 +0,0 @@
|
||||
#%PAM-1.0
|
||||
auth sufficient pam_rootok.so
|
||||
auth sufficient pam_timestamp.so
|
||||
auth include system-auth
|
||||
session required pam_permit.so
|
||||
session optional pam_xauth.so
|
||||
session optional pam_timestamp.so
|
||||
account required pam_permit.so
|
Binary file not shown.
Before Width: | Height: | Size: 1.4 KiB |
Loading…
Reference in New Issue
Block a user