1
1
mirror of https://github.com/containers/udica synced 2024-09-21 09:41:35 +02:00
Commit Graph

6 Commits

Author SHA1 Message Date
Vit Mojzis
d6e5a0d99a tests: Remove duplicate rules from test cil files
Signed-off-by: Vit Mojzis <vmojzis@redhat.com>
2022-06-22 11:41:10 +02:00
Lukas Vrabec
f436537ba8 Enable udica to generate policies with fifo class
Udica generates SELinux security allow rules only for files,dirs and
sockets. Following commit adds also FIFO files.

The change required also to modify existing unit tests.

Fixes: #85
2021-08-25 12:12:22 +02:00
Lukas Vrabec
bf6df45366 Update permission set for generated rules
Udica doesn't add permissions "setattr, rmdir" for dir class and
permissions "rename, setattr, unlink" for file class, for generated
rules when the block(template) is not defined. This cause
troubles when whole dirs are bind-mounted to the container space like "/var/lib/mysql".

Commit adding missing permissions to both classes and listing all
classes in alphabetical order.

"Basic" part of tests was regenerated due to the change
2020-04-25 13:10:17 +02:00
Lukas Vrabec
1ef277aa48
Update tests test_basic.podman.cil, test_basic.docker.cil. Round 2
Because of the new versions of SELinux policy in Fedora 30 and Fedora
Rawhide, also several tests in Udica needed to be fixed to use new
labels.
2019-08-27 21:20:47 +02:00
Lukas Vrabec
f81930aa0c
Update tests test_basic.podman.cil, test_basic.docker.cil
Because of the new versions of SELinux policy in Fedora 30 and Fedora
Rawhide, also several tests in Udica needed to be fixed to use new
labels.
2019-07-22 20:24:26 +02:00
Jan Zarsky
742a7b448f Create basic tests
Add testing JSON files generated by podman and docker. Add expected
output cil policies. Add tests that run udica on testing JSON files and
compare the result with cil policies.

The tests should be run inside the 'tests' directory using unittest:

    # python3 -m unittest

The tests are intended to be run on Fedora machine as root. Tested on
Fedora 29.
2019-03-11 11:00:57 +01:00