libselinux: add a configuration-root search list
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest4 patches 1 replyIn review
- v34 patches 0 repliesSuperseded
- v24 patches 0 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 | 4 patches | 0 replies | Superseded |
Patches in v4 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | libselinux: add a configuration-root search listlibselinux/ libselinux/ libselinux/ | +156 | 0 replies | |
| 2/4 | libselinux: search for the binary policy across configuration rootslibselinux/ libselinux/ | +29 | 0 replies | |
| 3/4 | libselinux: fall back through configuration rootslibselinux/ libselinux/ libselinux/ +7 more | +15 | 0 replies | |
| 4/4 | libselinux: search file_contexts files across configuration rootslibselinux/ libselinux/ libselinux/ | +83 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.
Cover letter [PATCH v4 0/4] libselinux: add a configuration-root search list
This series is the first half of addressing
https://github.com/SELinuxProject/selinux/issues/33
It adds a configuration-root search list to libselinux so that it searches an ordered list of configuration roots for each configuration file. The list can be overridden at build time via -DSELINUXFALLBACKDIRS=. There is no change in behavior as long as the files are found in their default locations under /etc/selinux; the fallbacks are only used when those files are missing, e.g. upon a factory reset.
The second half of this series will address libsemanage but is not necessary to merge this half.
v4 drops the /run/selinux directory from the default configuration-root search list since it is not required to support the stateless use case and it introduces a potential risk of any domain that can write to var_run_t being able to inject files that will be used by libselinux. Distros are still free to add it back using -DSELINUXFALLBACKDIRS= but if you do so, be sure to create and label /run/selinux appropriately.
Stephen Smalley (4):
libselinux: add a configuration-root search list
libselinux: search for the binary policy across configuration roots
libselinux: fall back through configuration roots
libselinux: search file_contexts files across configuration roots
libselinux/src/booleans.c | 2 +- libselinux/src/get_context_list.c | 6 +- libselinux/src/get_default_type.c | 5 +- libselinux/src/init.c | 12 +- libselinux/src/is_customizable_type.c | 2 +- libselinux/src/label_db.c | 2 +- libselinux/src/label_file.c | 49 ++++- libselinux/src/label_media.c | 2 +- libselinux/src/label_x.c | 2 +- libselinux/src/load_policy.c | 24 ++- libselinux/src/matchmediacon.c | 2 +- .../src/selinux_check_securetty_context.c | 2 +- libselinux/src/selinux_config.c | 179 ++++++++++++++++-- libselinux/src/selinux_internal.h | 40 ++++ libselinux/src/seusers.c | 4 +- 15 files changed, 283 insertions(+), 50 deletions(-)
Signature · 1 line
2.55.0