Home
last modified time | relevance | path

Searched +full:run +full:- +full:selinux +full:- +full:test (Results 1 – 25 of 228) sorted by relevance

12345678910

/external/selinux/scripts/ci/
DVagrantfile1 # -*- mode: ruby -*-
3 # Vagrant configuration file which creates a virtual machine that can run the
4 # test suite using fedora-test-runner.sh, in an environment similar to the one
5 # used for automated continuous integration tests (Travis-CI)
9 # vagrant up --provision
13 # vagrant rsync && echo ./run-selinux-test.sh | vagrant ssh
19 # Create a helper script in the VM to run the testsuite as root from a clean environment
21 cat > /home/vagrant/run-selinux-test.sh << EOF
23 set -e -v
25 # Run the tests
[all …]
Dfedora-test-runner.sh2 # SPDX-License-Identifier: MIT
3 set -ev
6 # We expect this to be set in the environment, but if it's not, most selinux projects
9 export SELINUX_DIR="${SELINUX_DIR:-/root/selinux}"
13 id -Z
21 dnf clean all -y
22 dnf install -y \
23 --allowerasing \
24 --skip-broken \
26 audit-libs-devel \
[all …]
/external/selinux/.github/workflows/
Drun_tests.yml1 name: Run tests
8 runs-on: ubuntu-latest
12 python-ruby-version:
13 - {python: '3.11', ruby: '3.1'}
14 - {python: '3.11', ruby: '3.1', other: 'test-flags-override'}
15 - {python: '3.11', ruby: '3.1', other: 'test-debug'}
16 - {python: '3.11', ruby: '3.1', other: 'linker-bfd'}
17 - {python: '3.11', ruby: '3.1', other: 'linker-gold'}
18 # Test several Python versions with the latest Ruby version
19 - {python: '3.10', ruby: '3.1'}
[all …]
Dvm_testsuite.yml1 name: Run SELinux testsuite in a virtual machine
8 …# Use VirtualBox+vagrant on macOS, as described in https://github.com/actions/virtual-environments…
9 runs-on: macos-12
12 - uses: actions/checkout@v3
14 - name: Create Vagrant VM
15 run: |
19 - name: Run SELinux testsuite in the VM
20 run: |
22 vagrant ssh -- ./run-selinux-test.sh
/external/selinux/mcstrans/share/util/
Dtry-all3 shopt -s nullglob
10 [ `id -u` = 0 ] || fail "must run as root"
15 …rm -rf /etc/selinux/mls/setrans.conf.bak /etc/selinux/mls/secolor.conf.bak /etc/selinux/mls/setran…
16 [ $? -eq 0 ] || fail "preclean failed"
18 if [ -e $d/setrans.conf ]; then
19 mv /etc/selinux/mls/setrans.conf /etc/selinux/mls/setrans.conf.bak
20 [ $? -eq 0 ] || fail "setrans.conf backup failed"
23 if [ -e /etc/selinux/mls/secolor.conf ]; then
24 mv /etc/selinux/mls/secolor.conf /etc/selinux/mls/secolor.conf.bak
25 [ $? -eq 0 ] || fail "secolor.conf backup failed"
[all …]
/external/selinux/
DREADME.md1 SELinux Userspace
4 ![SELinux logo](https://github.com/SELinuxProject.png)
5 [![Run Tests](https://github.com/SELinuxProject/selinux/actions/workflows/run_tests.yml/badge.svg)]…
6Run SELinux testsuite in a virtual machine](https://github.com/SELinuxProject/selinux/actions/work…
7-Fuzz Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/selinux.svg)](https://oss-
8 …ps://github.com/SELinuxProject/selinux/actions/workflows/cifuzz.yml/badge.svg)](https://github.com…
10 SELinux is a flexible Mandatory Access Control (MAC) system built into the
11 Linux Kernel. SELinux provides administrators with a comprehensive access
14 distributions. This repository contains the sources for the SELinux utilities
16 SELinux-based system.
[all …]
/external/ltp/testcases/kernel/security/integrity/ima/
DREADME.md18 ### IMA key test
19 The measuring keys test (first test) in `ima_keys.sh` requires a readable IMA
22 The certificate import test (second test) requires measure policy with
28 `ima-buf` template should be specified in the IMA policy rule for
31 measure func=KEY_CHECK keyrings=key_import_test template=ima-buf
34 Executing on kernel v5.11 or later, `template=ima-buf` is optional in the IMA
46 ### IMA kexec test
51 The test attempts to kexec the existing running kernel image.
54 ### IMA SELinux test
56 To enable IMA to measure SELinux state and policy, `ima_selinux.sh`
[all …]
/external/selinux/python/semanage/
Dtest-semanage.py26 '"semanage should have succeeded for this test %r' % err)
32 "Verify semanage %s -E" % object
33 p = Popen(['semanage', object, '-E'], stdout=PIPE)
38 print("Verify semanage export -f /tmp/out")
39 p = Popen(['semanage', "export", '-f', '/tmp/out'], stdout=PIPE)
42 print("Verify semanage export -S targeted -f -")
43 p = Popen(["semanage", "export", "-S", "targeted", "-f", "-"], stdout=PIPE)
46 print("Verify semanage -S targeted -o -")
47 p = Popen(["semanage", "-S", "targeted", "-o", "-"], stdout=PIPE)
50 print("Verify semanage import -f /tmp/out")
[all …]
/external/selinux/python/sepolgen/
DHACKING8 it - it avoids assumptions and close coupling of components where
12 There is a test suite in the test subdirectory. The run-tests.py
13 script will run all of the tests.
18 -------------------------------------------------------------
32 -------------------------------------------------------------
39 other access vectors - this forms the backbone of how we turn audit
42 The highest-level form of access represented in interfaces - which
47 -------------------------------------------------------------
49 Parser for reference policy "headers" - i.e.,
50 /usr/share/selinux/devel/include. This uses the LGPL parsing library
[all …]
/external/selinux/restorecond/
Drestorecond.init5 # chkconfig: - 12 87
7 # listed in the /etc/selinux/restorecond.conf file, and restores the \
11 # config: /etc/selinux/restorecond.conf
12 # pidfile: /run/restorecond.pid
15 # 0 - success
16 # 1 - generic or unspecified error
17 # 2 - invalid or excess argument(s)
18 # 3 - unimplemented feature (e.g. "reload")
19 # 4 - insufficient privilege
20 # 5 - program is not installed
[all …]
/external/selinux/secilc/
DREADME1 SELinux Common Intermediate Language (CIL) Compiler
5 The SELinux CIL Compiler is a compiler that converts the CIL language as
19 Run "make" with one of the following targets:
24 make test
25 Pass a sample policy to test with the compiler.
45 Use the '--help' option for more details.
54 directory and run:
63 - Blocks inside of macros causes undefined behavior
65 - Policy must be well formed. For example, invalid usage of
68 - Recursive limits are not handled
/external/selinux/mcstrans/src/
Dmcstrans.init5 # chkconfig: - 08 87
6 # description: This starts the SELinux Context Translation System Daemon
9 # pidfile: /var/run/mcstransd.pid
12 # 0 - success
13 # 1 - generic or unspecified error
14 # 2 - invalid or excess argument(s)
15 # 3 - unimplemented feature (e.g. "reload")
16 # 4 - insufficient privilege
17 # 5 - program is not installed
18 # 6 - program is not configured
[all …]
/external/selinux/sandbox/
Dsandbox1 #!/usr/bin/python3 -Es
20 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
32 import selinux
40 PROGNAME = "selinux-sandbox"
124 rc = dlg.run()
148 level = selinux.getcon_raw()[1].split(":")[4]
152 if high - low == 0:
165 total = high - low
166 total = (total * (total - 1)) / 2
258 self.__include(option, opt, i[:-1], parser)
[all …]
Dtest_sandbox.py25 '"Sandbox should have succeeded for this test %r' % err)
38 p = Popen([sys.executable, 'sandbox', 'kill', '-HUP', str(pid)], stdout=PIPE, stderr=PIPE)
44 … p = Popen([sys.executable, 'sandbox', 'ping', '-c 1 ', '127.0.0.1'], stdout=PIPE, stderr=PIPE)
50 p = Popen([sys.executable, 'sandbox', 'mkdir', '~/test'], stdout=PIPE, stderr=PIPE)
67 "Verify that we can't run sudo within the sandbox"
74 p = Popen([sys.executable, 'sandbox', '-M', 'id'], stdout=PIPE, stderr=PIPE)
80 p = Popen([sys.executable, 'sandbox', '-l', 's0', 'id'], stdout=PIPE, stderr=PIPE)
87 p = Popen([sys.executable, 'sandbox', '-H', homedir, '-M', 'id'], stdout=PIPE, stderr=PIPE)
95 p = Popen([sys.executable, 'sandbox', '-T', tmpdir, '-M', 'id'], stdout=PIPE, stderr=PIPE)
102 …p = Popen([sys.executable, 'sandbox', '-i' ,'test_sandbox.py' , '-M', '/bin/cat', 'test_sandbox.py…
[all …]
/external/selinux/scripts/
Denv_use_destdir2 # Set-up environment variables to run programs which are built in DESTDIR folder
5 # $ export DESTDIR=$HOME/selinux-destdir
6 # $ make install install-pywrap install-rubywrap
8 # $ make test
10 # Or to use variables in a subcommand, for example to run tests:
11 # $ export DESTDIR=$HOME/selinux-destdir
12 # $ make install install-pywrap install-rubywrap
14 # $ ./scripts/env_use_destdir make test
16 if [ -z "${DESTDIR:-}" ] ; then
20 echo >&2 " DESTDIR=$(cd "$(dirname -- "$0")/.." ; pwd)/DESTDIR . $0"
[all …]
/external/selinux/policycoreutils/scripts/
Dfixfiles4 # Script to restore labels on a SELinux box
6 # Copyright (C) 2004-2013 Red Hat, Inc.
21 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 set -o nounset
31 VER=`uname -r`
33 expr '(' "$VER" : '\([^.]*\)' ')' '-' '(' "$SUP" : '\([^.]*\)' ')' '|' \
34 '(' "$VER.0" : '[^.]*[.]\([^.]*\)' ')' '-' '(' "$SUP.0" : '[^.]*[.]\([^.]*\)' ')' '|' \
35 …'(' "$VER.0.0" : '[^.]*[.][^.]*[.]\([^.]*\)' ')' '-' '(' "$SUP.0.0" : '[^.]*[.][^.]*[.]\([^.]*\)' …
46 if [ `useseclabel` -ge 0 ]
48 …grep " $i " /proc/self/mounts | awk '{print $4}' | grep -E --silent '(^|,)seclabel(,|$)' && echo $i
[all …]
/external/selinux/python/sepolicy/sepolicy/
Dinterface.py4 # policygentool is a tool for the initial generation of SELinux policy
19 # 02111-1307 USA
33 PROGNAME = "selinux-python"
97 """ Get all domains with SELinux user role interface"""
106 if (("%s_exec_t" % k[:-5]) in sepolicy.get_all_types()):
123 def get_interface_dict(path="/usr/share/selinux/devel/policy.xml"):
133 xml_path = """<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
165 def get_interface_format_text(interface, path="/usr/share/selinux/devel/policy.xml"):
200 …utput = getstatusoutput("/usr/bin/python3 /usr/share/selinux/devel/include/support/segenxml.py -w
209 def interface_compile_test(interface, path="/usr/share/selinux/devel/policy.xml"):
[all …]
/external/selinux/python/sepolicy/
Dsepolicy-generate.81 .TH "sepolicy-generate" "8" "20121005" "" ""
3 sepolicy-generate \- Generate an initial SELinux policy module template.
9 .B sepolicy generate [\-h ] [\-p PATH]
16 .B sepolicy generate \-\-application [\-n NAME] [\-u USER ]command [\-w WRITE_PATH ]
18 .B sepolicy generate \-\-cgi [\-n NAME] command [\-w WRITE_PATH ]
20 .B sepolicy generate \-\-dbus [\-n NAME] command [\-w WRITE_PATH ]
22 .B sepolicy generate \-\-inetd [\-n NAME] command [\-w WRITE_PATH ]
24 .B sepolicy generate \-\-init [\-n NAME] command [\-w WRITE_PATH ]
29 .B sepolicy generate \-\-admin_user [\-r TRANSITION_ROLE] \-n NAME
31 .B sepolicy generate \-\-confined_admin \-n NAME [\-a ADMIN_DOMAIN] [\-u USER] [\-n NAME] [\-w WRIT…
[all …]
Dsepolicy.py1 #!/usr/bin/python3 -EsI
6 # semanage is a tool for managing SELinux configuration files
21 # 02111-1307 USA
26 import selinux
31 PROGNAME = "selinux-python"
50 usage = "sepolicy generate [-h] [-n NAME] [-p PATH] ["
51--newtype': ('-t [TYPES [TYPES ...]]',), ' --customize': ('-d DOMAIN', '-a ADMIN_DOMAIN', "[ -w W…
86 v = selinux.selinux_boolean_sub(values)
88 …raise ValueError("%s must be an SELinux process domain:\nValid domains: %s" % (v, ", ".join(boolea…
93 v = selinux.selinux_boolean_sub(value)
[all …]
/external/toybox/
DConfig.in16 usage: toybox [--long | --help | --version | [COMMAND] [ARGUMENTS...]]
18 With no arguments, "toybox" shows available COMMAND names. Add --long
22 First argument is name of a COMMAND to run, followed by any ARGUMENTS
25 --help Show command help (only)
26 --version Show toybox version (only)
28 The filename "-" means stdin/stdout, and "--" stops argument parsing.
63 bool "SELinux support"
65 Include SELinux options in commands such as ls, and add
66 SELinux-specific commands such as chcon to the Android menu.
79 Use faster hash functions out of external -lcrypto library.
[all …]
/external/ltp/testcases/kernel/fs/proc/
Dproc01.c2 * proc01.c - Tests Linux /proc file reading.
24 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
43 #include <selinux/selinux.h>
46 #include "test.h"
79 like if SELinux is disabled, the test may still fail on some other
98 {"read", "/proc/self/task/[0-9]*/mem", EIO},
100 {"read", "/proc/self/attr/selinux/*", EINVAL},
103 {"read", "/proc/self/task/[0-9]*/attr/*", EINVAL},
104 {"read", "/proc/self/task/[0-9]*/attr/smack/*", EINVAL},
105 {"read", "/proc/self/task/[0-9]*/attr/selinux/*", EINVAL},
[all …]
/external/selinux/policycoreutils/po/
Dbo.po8 "Project-Id-Version: Policycoreutils\n"
9 "Report-Msgid-Bugs-To: \n"
10 "POT-Creation-Date: 2013-10-10 16:04-0400\n"
11 "PO-Revision-Date: 2013-07-10 20:44+0000\n"
12 "Last-Translator: dwalsh <dwalsh@redhat.com>\n"
13 "Language-Team: Tibetan <trans-bo@lists.fedoraproject.org>\n"
15 "MIME-Version: 1.0\n"
16 "Content-Type: text/plain; charset=UTF-8\n"
17 "Content-Transfer-Encoding: 8bit\n"
18 "Plural-Forms: nplurals=1; plural=0;\n"
[all …]
Dks.po8 "Project-Id-Version: Policycoreutils\n"
9 "Report-Msgid-Bugs-To: \n"
10 "POT-Creation-Date: 2013-10-10 16:04-0400\n"
11 "PO-Revision-Date: 2013-07-10 20:44+0000\n"
12 "Last-Translator: dwalsh <dwalsh@redhat.com>\n"
13 "Language-Team: Kashmiri (http://www.transifex.com/projects/p/fedora/language/"
16 "MIME-Version: 1.0\n"
17 "Content-Type: text/plain; charset=UTF-8\n"
18 "Content-Transfer-Encoding: 8bit\n"
19 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
[all …]
Dla.po8 "Project-Id-Version: Policycoreutils\n"
9 "Report-Msgid-Bugs-To: \n"
10 "POT-Creation-Date: 2013-10-10 16:04-0400\n"
11 "PO-Revision-Date: 2012-03-30 18:14+0000\n"
12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 "Language-Team: Latin (http://www.transifex.com/projects/p/fedora/language/"
16 "MIME-Version: 1.0\n"
17 "Content-Type: text/plain; charset=UTF-8\n"
18 "Content-Transfer-Encoding: 8bit\n"
19 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
[all …]
Dbrx.po8 "Project-Id-Version: Policycoreutils\n"
9 "Report-Msgid-Bugs-To: \n"
10 "POT-Creation-Date: 2013-10-10 16:04-0400\n"
11 "PO-Revision-Date: 2012-03-30 18:14+0000\n"
12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 "Language-Team: Bodo (http://www.transifex.com/projects/p/fedora/language/"
16 "MIME-Version: 1.0\n"
17 "Content-Type: text/plain; charset=UTF-8\n"
18 "Content-Transfer-Encoding: 8bit\n"
19 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
[all …]

12345678910