Commit ba625bc
fix: allow CSI volumes to be mounted with an SELinux context
CSI-provisioned volumes are mounted by the driver through kubelet, outside
Talos's mount manager, so nothing labels their contents and they come out
unlabeled_t. Operators can request a label through StorageClass mountOptions,
which reaches the driver's mount call, but the mount syscall relabels the
filesystem away from fs_t, and pod_p is not permitted relabelfrom on it. Under
enforcing the mount fails and the volume is unusable.
Grant pod_p relabelfrom on fs_t. The target type is already covered by the
existing ephemeral_t fs_classes grant, which maps to the filesystem class too.
Fixes #14182
Signed-off-by: Ivan Demchuk <ivan.demchuk@gmail.com>
Signed-off-by: Dmitrii Sharshakov <dmitry.sharshakov@siderolabs.com>1 parent fc0a1f0 commit ba625bc
2 files changed
Lines changed: 4 additions & 1 deletion
Binary file not shown.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
220 | | - | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
221 | 224 | | |
222 | 225 | | |
223 | 226 | | |
| |||
0 commit comments