diff options
| author | Clayton Casciato <majortomtosourcecontrol@gmail.com> | 2025-10-23 08:12:47 -0600 |
|---|---|---|
| committer | Yi Zhao <yi.zhao@windriver.com> | 2025-10-23 23:43:00 +0800 |
| commit | 3dec9c46d40b7f987893060b00771fee030db80e (patch) | |
| tree | 7bba5252034610219af9611c7489a212eabf0e5d | |
| parent | 0a205a4388f58f08e8c9c6bc95fdc67eba57a807 (diff) | |
| download | meta-selinux-walnascar.tar.gz | |
refpolicy: files - add files_delete_var_chr_files interfacewalnascar
Signed-off-by: Clayton Casciato <majortomtosourcecontrol@gmail.com>
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
| -rw-r--r-- | recipes-security/refpolicy/refpolicy/0066-policy-modules-kernel-files-add-files_delete_var_chr.patch | 44 | ||||
| -rw-r--r-- | recipes-security/refpolicy/refpolicy_common.inc | 1 |
2 files changed, 45 insertions, 0 deletions
diff --git a/recipes-security/refpolicy/refpolicy/0066-policy-modules-kernel-files-add-files_delete_var_chr.patch b/recipes-security/refpolicy/refpolicy/0066-policy-modules-kernel-files-add-files_delete_var_chr.patch new file mode 100644 index 0000000..9737182 --- /dev/null +++ b/recipes-security/refpolicy/refpolicy/0066-policy-modules-kernel-files-add-files_delete_var_chr.patch | |||
| @@ -0,0 +1,44 @@ | |||
| 1 | From fb889271b4be21f477f279dc688ac491437797f7 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Clayton Casciato <ccasciato@21sw.us> | ||
| 3 | Date: Mon, 12 May 2025 12:39:10 -0600 | ||
| 4 | Subject: [PATCH] files: add files_delete_var_chr_files interface | ||
| 5 | |||
| 6 | Signed-off-by: Clayton Casciato <ccasciato@21sw.us> | ||
| 7 | |||
| 8 | Upstream-Status: Backport [https://github.com/SELinuxProject/refpolicy/commit/605ee571a04d7db29f61dc086ad4675793d94864] | ||
| 9 | |||
| 10 | Signed-off-by: Clayton Casciato <majortomtosourcecontrol@gmail.com> | ||
| 11 | --- | ||
| 12 | policy/modules/kernel/files.if | 19 +++++++++++++++++++ | ||
| 13 | 1 file changed, 19 insertions(+) | ||
| 14 | |||
| 15 | diff --git a/policy/modules/kernel/files.if b/policy/modules/kernel/files.if | ||
| 16 | index c590d24de..c6fab80a2 100644 | ||
| 17 | --- a/policy/modules/kernel/files.if | ||
| 18 | +++ b/policy/modules/kernel/files.if | ||
| 19 | @@ -6186,6 +6186,25 @@ interface(`files_manage_var_symlinks',` | ||
| 20 | manage_lnk_files_pattern($1, var_t, var_t) | ||
| 21 | ') | ||
| 22 | |||
| 23 | +######################################## | ||
| 24 | +## <summary> | ||
| 25 | +## Delete character device nodes in | ||
| 26 | +## the var directory. | ||
| 27 | +## </summary> | ||
| 28 | +## <param name="domain"> | ||
| 29 | +## <summary> | ||
| 30 | +## Domain allowed access. | ||
| 31 | +## </summary> | ||
| 32 | +## </param> | ||
| 33 | +# | ||
| 34 | +interface(`files_delete_var_chr_files',` | ||
| 35 | + gen_require(` | ||
| 36 | + type var_t; | ||
| 37 | + ') | ||
| 38 | + | ||
| 39 | + delete_chr_files_pattern($1, var_t, var_t) | ||
| 40 | +') | ||
| 41 | + | ||
| 42 | ######################################## | ||
| 43 | ## <summary> | ||
| 44 | ## Create objects in the /var directory | ||
diff --git a/recipes-security/refpolicy/refpolicy_common.inc b/recipes-security/refpolicy/refpolicy_common.inc index 33c3f32..44ac113 100644 --- a/recipes-security/refpolicy/refpolicy_common.inc +++ b/recipes-security/refpolicy/refpolicy_common.inc | |||
| @@ -81,6 +81,7 @@ SRC_URI += " \ | |||
| 81 | file://0063-policy-modules-services-ssh-allow-sshd_t-userdomain-.patch \ | 81 | file://0063-policy-modules-services-ssh-allow-sshd_t-userdomain-.patch \ |
| 82 | file://0064-policy-modules-services-dbus-allow-system_dbusd_t-un.patch \ | 82 | file://0064-policy-modules-services-dbus-allow-system_dbusd_t-un.patch \ |
| 83 | file://0065-policy-modules-system-systemd-allow-systemd_logind_t.patch \ | 83 | file://0065-policy-modules-system-systemd-allow-systemd_logind_t.patch \ |
| 84 | file://0066-policy-modules-kernel-files-add-files_delete_var_chr.patch \ | ||
| 84 | " | 85 | " |
| 85 | 86 | ||
| 86 | S = "${WORKDIR}/refpolicy" | 87 | S = "${WORKDIR}/refpolicy" |
