aba7ab1e5f
The following steps are used to execute the tests using the standard test interface: Docker sudo ANSIBLE_INVENTORY=$(test -e inventory && echo inventory || echo /usr/share/ansible/inventory) TEST_SUBJECTS=docker:docker.io/library/fedora:26 TEST_ARTIFACTS=$PWD/artifacts ansible-playbook --tags container tests.yml Classic sudo ANSIBLE_INVENTORY=$(test -e inventory && echo inventory || echo /usr/share/ansible/inventory) TEST_SUBJECTS="" TEST_ARTIFACTS=$PWD/artifacts ansible-playbook --tags classic tests.yml https://src.fedoraproject.org/rpms/libselinux/pull-request/1
39 lines
1.0 KiB
C
39 lines
1.0 KiB
C
#include <stdio.h>
|
|
#include <selinux/selinux.h>
|
|
#include <selinux/avc.h>
|
|
|
|
int main(__attribute__((unused)) int argc, __attribute__((unused)) char **argv) {
|
|
printf("(before open) selinux_status_getenforce %d\n",
|
|
selinux_status_getenforce());
|
|
|
|
printf("(before open) selinux_status_policyload %d\n",
|
|
selinux_status_policyload());
|
|
|
|
printf("(before open) selinux_status_deny_unknown %d\n",
|
|
selinux_status_deny_unknown());
|
|
|
|
printf("(before open) selinux_status_updated %d\n",
|
|
selinux_status_updated());
|
|
|
|
|
|
printf("selinux_status_open %d\n",
|
|
selinux_status_open(1));
|
|
|
|
printf("selinux_status_getenforce %d\n",
|
|
selinux_status_getenforce());
|
|
|
|
printf("selinux_status_policyload %d\n",
|
|
selinux_status_policyload());
|
|
|
|
printf("selinux_status_deny_unknown %d\n",
|
|
selinux_status_deny_unknown());
|
|
|
|
printf("selinux_status_updated %d\n",
|
|
selinux_status_updated());
|
|
|
|
printf("selinux_status_close void\n");
|
|
selinux_status_close();
|
|
|
|
return 0;
|
|
}
|