podman/pkg/specgenutil
Daniel J Walsh 5b7dce8a3d
Add support for confined users
The original SELinux support in Docker and Podman does not follow the
default SELinux rules for how label transitions are supposed to be
handled. Containers always switch their user and role to
system_u:system_r, rather then maintain the collers user and role.
For example
unconfined_u:unconfined_r:container_t:s0:c1,c2

Advanced SELinux administrators want to confine users but still allow
them to create containers from their role, but not allow them to launch
a privileged container like spc_t.

This means if a user running as
container_user_u:container_user_r:container_user_t:s0

Ran a container they would get

container_user_u:container_user_r:container_t:s0:c1,c2

If they run a privileged container they would run it with:

container_user_u:container_user_r:container_user_t:s0

If they want to force the label they would get an error

podman run --security-opt label=type:spc_t ...

Should fail. Because the container_user_r can not run with the spc_t.

SELinux rules would also prevent the user from forcing system_u user and
the sytem_r role.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Signed-off-by: Chris Evich <cevich@redhat.com>
2023-08-01 11:25:00 -04:00
..
createparse.go pkg: switch to golang native error wrapping 2022-07-08 08:54:47 +02:00
ports.go pkg: switch to golang native error wrapping 2022-07-08 08:54:47 +02:00
ports_test.go Unit tests for pkg/specgenutil pkg/signal 2022-04-25 14:48:39 -05:00
specgen.go Add support for confined users 2023-08-01 11:25:00 -04:00
specgenutil_test.go The `--ulimit` option accepts the name with an `RLIMIT_` prefix both upper and lower case 2023-04-06 18:20:28 +04:00
util.go podman: add support for splitting imagestore 2023-06-17 08:51:08 +05:30
util_test.go Unit tests for pkg/specgenutil pkg/signal 2022-04-25 14:48:39 -05:00
volumes.go Codespell fixups 2023-07-31 09:38:46 -04:00
volumes_test.go Run codespell on code 2022-11-04 10:57:41 -04:00