Commit Graph

626 Commits

Author SHA1 Message Date
Daniel J Walsh 4fda08e915 Update container-selinux.8 man page
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-05-31 11:46:41 -04:00
Daniel J Walsh 48558153fc
Add ownership of /usr/share/udica (#312)
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-05-31 11:46:21 -04:00
Daniel J Walsh 3615c95029
Merge pull request #310 from lsm5/packit-tmt-bodhi-reuse
Packit/TMT: upstream maintenance of downstream gating tests
2024-05-30 17:02:39 -04:00
Lokesh Mandvekar 82b49716e1
Packit/TMT: upstream maintenance of downstream gating tests
This commit reorganizes tests such that tests can be easily
triggered on local environment without any specialized CI
setup as well as triggered by TMT on PRs and bodhi updates.
This essentially moves all Fedora and CentOS Stream downstream
testing maintenance to the upstream repo.

Tests on upstream PRs use packages from the podman-next copr
wherever relevant while downstream tests use packages from the
official distro repos.

This commit also separates out rhel and centos stream tasks.
This enables centos-stream jobs to run automatically on all PRs
regardless of the PR author's access level on the repo. RHEL tests on
PRs by non-maintainers would need manual triggereing by maintainers.

Co-authored-by: Cristian Le <github@lecris.me>
Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
2024-05-28 10:31:12 -04:00
Daniel J Walsh 9e8a0ecda4
Merge pull request #308 from haircommander/userns-2
extend container_engine_t again
2024-05-16 15:34:08 -04:00
Peter Hunt b73f190510 extend container_engine_t again
after running podman system tests inside of a container

Signed-off-by: Peter Hunt <pehunt@redhat.com>
2024-05-15 14:02:17 -04:00
Daniel J Walsh fc5e66e661
Merge pull request #306 from jsegitz/gpu2
introduce container_use_xserver_devices boolean to allow GPU access
2024-05-14 20:53:41 -04:00
Daniel J Walsh 66b00df26b
Merge pull request #307 from jsegitz/time_localctl
Allow privileged containers to use timedatectl and localectl
2024-05-14 20:51:35 -04:00
Johannes Segitz 206866ba08 Allow spc_t to use localectl
Signed-off-by: Johannes Segitz <jsegitz@suse.de>
2024-05-06 16:31:54 +02:00
Johannes Segitz d12a0c4b93 Allow spc_t to use timedatectl
Signed-off-by: Johannes Segitz <jsegitz@suse.de>
2024-05-06 16:31:48 +02:00
Johannes Segitz 6dfcb383de introduce container_use_xserver_devices boolean to allow GPU access
Using GPUs to accelerate workloads requires the permissions guarded
by container_use_xserver_devices. By default it's disabled

Signed-off-by: Johannes Segitz <jsegitz@suse.de>
2024-05-06 16:28:37 +02:00
Lokesh Mandvekar a3cba5ee5c
Packit/TMT: enable downstream syncing to CentOS Stream 10 (#305)
This commit enables downstream syncing to CentOS Stream 10.
This isn't fully automated yet and requires the maintainer to run
`packit propse-downstream` and `centpkg build` steps manually.

This commit also adds TMT podman revdep tests for CentOS Stream 10 and
RHEL 10 Beta Nightly. These tests are likely to fail pending netavark
work to default to nftables.

This commit will also run separate jobs for `epel-9` and
`centos-stream-9` to ensure we're using rhel rpms for rhel tests and
centos stream rpms for centos stream tests. This will also be done for
centos stream 10 / rhel 10 once the epel-10 target is created on copr.

Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
2024-04-26 11:29:57 -04:00
Daniel J Walsh 654b2a41e5
Merge pull request #304 from lsm5/remove-el8
Packit: remove el8 and add centos stream 10
2024-04-24 17:05:23 -04:00
Lokesh Mandvekar 652675e2fc
Packit/rpm: remove el8 and add centos stream 10
- EL8 will go EOL soon and centos stream 10 is now available in copr.
- Remove old fedora 37 and rhel8 conditionals from spec file
- Switch to idiomatic TMT usage wherever possible

Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
2024-04-24 14:23:12 -04:00
Daniel J Walsh 5d98341279
Merge pull request #303 from rhatdan/main
Allow container domains to communicate with spc_t unix_stream_sockets
2024-04-23 17:15:44 -04:00
Daniel J Walsh 0e7f1668b6
Allow container domains to communicate with spc_t unix_stream_sockets
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-04-22 06:37:36 -04:00
Lokesh Mandvekar a8e389dbcd
TMT: reorganize tests into scripts (#302)
This commit also reorganizes individual tests in scripts so they can be
executed standalone if need be.

The RHEL targets are also updated to use more generic floating targets
wherever possible.

Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
2024-03-20 17:08:37 +05:30
Zdeněk Pytela 6200ed9fe2
Rename all /var/run file context entries to /run (#298)
With the 1f76e522a ("Rename all /var/run file context entries to /run")
selinux-policy commit, all /var/run file context entries moved to /run
and the equivalency was inverted. Subsequently, changes in container.fc
need to be done, too, in a similar manner. Together with that, the
"/run/lock = /var/lock" equivalency was also inverted and entries moved.

For RHEL < 10 and Fedora < 40, these changes are reverted in specfile.

Signed-off-by: Zdenek Pytela <zpytela@redhat.com>
2024-03-11 17:41:09 +05:30
Lokesh Mandvekar 6b565b90ee
Merge pull request #299 from lsm5/tmt-fix
TMT: reorganize tests and run podman system tests correctly
2024-03-11 17:20:37 +05:30
Lokesh Mandvekar 5dfcea8613
tmt: run podman system tests correctly
Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
2024-03-11 16:38:27 +05:30
Daniel J Walsh 5cec853268
Merge pull request #301 from rhatdan/mount
Allow containers to unmount file systems
2024-03-02 13:40:57 -05:00
Daniel J Walsh 022e31d7d7
Allow containers to unmount file systems
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-03-02 13:15:10 -05:00
Daniel J Walsh a023e9ee6a
Merge pull request #300 from rhatdan/main
Add buildah as a container_runtime_exec_t label
2024-02-28 10:03:09 -05:00
Daniel J Walsh db3b6625f1
Add buildah as a container_runtime_exec_t label
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-02-28 09:16:58 -05:00
Daniel J Walsh eac57925aa
Merge pull request #297 from rhatdan/main
Additional rules for container_user_t
2024-01-22 07:51:21 -05:00
Daniel J Walsh c4fbc450e3
Allow unconfined_r to transition to container_user_r
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-01-19 06:47:07 -05:00
Daniel J Walsh cffb801bdd
Additional rules for container_user_t
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-01-17 15:09:27 -05:00
Daniel J Walsh d733187b76
Merge pull request #296 from haircommander/bump-2.228.1
bump to v2.228.1
2024-01-17 15:08:39 -05:00
Peter Hunt 55fd889a88 bump to v2.228.1
Signed-off-by: Peter Hunt <pehunt@redhat.com>
2024-01-16 14:58:35 -05:00
Daniel J Walsh 00da6b2b9a
Merge pull request #295 from haircommander/engine_t
improve container_engine_t
2024-01-15 15:25:56 -05:00
Peter Hunt 846d933418 improve container_engine_t
in the reviews some things were missed

Signed-off-by: Peter Hunt <pehunt@redhat.com>
2024-01-11 13:36:06 -05:00
Daniel J Walsh 48c2b45fd0
Merge pull request #294 from rhatdan/watch
Allow container domains to watch fifo_files
2024-01-10 22:11:38 -05:00
Daniel J Walsh 26d4f23ec1
Allow container domains to watch fifo_files
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-01-10 10:25:50 -05:00
Daniel J Walsh 540fa9b5ff
Merge pull request #291 from haircommander/engine_t-improvements
container_engine_t: improve for podman in kubernetes case
2023-12-22 08:00:28 -05:00
Peter Hunt 6859af325b container_engine_t: improve for podman in kubernetes case
Signed-off-by: Peter Hunt <pehunt@redhat.com>
2023-12-21 16:13:09 -05:00
Daniel J Walsh 289df825a2
Merge pull request #290 from rhatdan/spc_t
Allow spc_t to transition to install_t domain
2023-12-21 10:49:21 -05:00
Daniel J Walsh 694c7caa6e
Allow spc_t to transition to install_t domain
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-12-21 09:55:23 -05:00
Daniel J Walsh cff8553f61
Merge pull request #289 from rhatdan/kube
Default to allowing containers to use dri devices
2023-11-29 19:38:31 -05:00
Daniel J Walsh e53b5070e0
Default to allowing containers to use dri devices
Fixes: https://github.com/containers/container-selinux/issues/269

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-11-28 12:19:33 -05:00
Daniel J Walsh 3c47d8e340
Merge pull request #288 from rhatdan/kube
Arrange and sort all fs*container_domain calls
2023-11-28 12:16:11 -05:00
Daniel J Walsh 6b0254a83a
Arrange and sort all fs*container_domain calls
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-11-22 12:41:11 -05:00
Daniel J Walsh d73beea8a4
Merge pull request #286 from rhatdan/kube
Fix kubernetes transition rule
2023-11-22 12:36:50 -05:00
Daniel J Walsh 1ff9509407
Merge pull request #287 from dave-tucker/bpffs
Allow access to BPF Filesystems
2023-11-22 12:36:06 -05:00
Dave Tucker bc1e695dc5 Allow access to BPF Filesystems
BPF Filesystems (bpffs) are used to manage BPF Object Lifecycles.
For example, you can place a special object (called a pin) on a BPF
filesystem and use that object to get a reference to the
program/link/map that it references if you have permissions to make
bpf() syscalls.

In a recent kernel patch, a container may also recieve a token
that allows it to make BPF syscalls on this filesystem.

Since bpffs doesn't support xattrs, it's not possible to bind mount
it from the host with `:Z` so it can be re-labelled. Adding xattrs
to bpffs is not something that I've looked into in detail, but I
imagine it's non-trivial.

This commit should add the necessary rules to ensure that SELinux
permits the use of bpf_t file/directory objects from containers
when the BPFFS volume was bind mounted from the host.

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
2023-11-22 16:50:02 +00:00
Daniel J Walsh 1c56b4ecf4
Merge pull request #281 from lsm5/rhel-test-update
TMT: update RHEL test envs
2023-11-20 08:54:59 -05:00
Daniel J Walsh 3d5245ffcc
Merge pull request #284 from haircommander/kubensenter
label kubensenter as well as kubenswrapper
2023-11-20 08:54:22 -05:00
Daniel J Walsh 43704bf3ba
Fix kubernetes transition rule
Fixes: https://github.com/containers/container-selinux/issues/283

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-11-20 08:52:40 -05:00
Peter Hunt a241c30077 label kubensenter as well as kubenswrapper
on openshift, kubenswrapper service calls kubensenter, which calls the kubelet. Without this change,
kubelet will continue to be labeled unconfined_t

Signed-off-by: Peter Hunt <pehunt@redhat.com>
2023-11-14 16:46:02 -05:00
Lokesh Mandvekar f073e0434d
TMT: update RHEL test envs
Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
2023-10-25 17:40:53 +05:30
Daniel J Walsh 31e9f0bdcc
Merge pull request #280 from rhatdan/runc
Allow container domains to execute container_runtime_tmpfs_t files
2023-10-11 07:07:16 -04:00