diff mbox series

[meta-selinux,3/4] refpolicy: escape the dot in the /run/issue.d file context

Message ID 20261124114137.2203106-4-chenqi_hycx@cetc.com.cn
State New
Headers show
Series Add selint and fix local refpolicy patches | expand

Commit Message

Chen Qi Nov. 24, 2026, 11:41 a.m. UTC
From: Chen Qi <chenqi_hycx@cetc.com.cn>

SELint reports:

  systemd.fc: 103: (W): File context path contains a potentially
  unescaped regex character '.' at position 11: /run/issue.d(/.*)?
  (W-004)

/run/issue.d is a literal path, so escape the dot.

Assisted-by: Codewhale:deepseek-flash
Signed-off-by: Chen Qi <chenqi_hycx@cetc.com.cn>
---
 .../0041-systemd-add-rules-for-systemd-ssh-issue.patch          | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/recipes-security/refpolicy/refpolicy/0041-systemd-add-rules-for-systemd-ssh-issue.patch b/recipes-security/refpolicy/refpolicy/0041-systemd-add-rules-for-systemd-ssh-issue.patch
index 875896b..b883fb3 100644
--- a/recipes-security/refpolicy/refpolicy/0041-systemd-add-rules-for-systemd-ssh-issue.patch
+++ b/recipes-security/refpolicy/refpolicy/0041-systemd-add-rules-for-systemd-ssh-issue.patch
@@ -64,7 +64,7 @@  index e44d82a88..130c62370 100644
  /var/lib/systemd/pstore(/.*)?	gen_context(system_u:object_r:systemd_pstore_var_lib_t,s0)
  /var/lib/systemd/rfkill(/.*)?	gen_context(system_u:object_r:systemd_rfkill_var_lib_t,s0)
  
-+/run/issue.d(/.*)? gen_context(system_u:object_r:systemd_ssh_issue_runtime_t,s0)
++/run/issue\.d(/.*)? gen_context(system_u:object_r:systemd_ssh_issue_runtime_t,s0)
 +
  /run/\.nologin[^/]*	--	gen_context(system_u:object_r:systemd_sessions_runtime_t,s0)
  /run/nologin	--	gen_context(system_u:object_r:systemd_sessions_runtime_t,s0)