new file mode 100644
@@ -0,0 +1,41 @@
+From 69277d9047ebf1aee9af59c97a27a0fcad2a47ee Mon Sep 17 00:00:00 2001
+From: Chen Qi <chenqi_hycx@cetc.com.cn>
+Date: Mon, 9 Nov 2026 15:46:47 +0800
+Subject: [PATCH] authlogin: allow creating the shadow lock files
+
+auth_rw_shadow_lock() declares the file transitions for .pwd.lock,
+passwd.lock and group.lock but only grants rw_file_perms, which has no
+create. A domain that finds no lock file therefore cannot create it:
+
+ avc: denied { create } for name=".pwd.lock"
+ scontext=system_u:system_r:systemd_sysusers_t:s0
+ tcontext=system_u:object_r:shadow_lock_t:s0 tclass=file
+
+The problem was revealed by systemd-sysusers with systemd 262. But any
+command that manages user password is likely to fail, e.g., `passwd root'.
+
+Upstream-Status: Inappropriate [OE Specific]
+[
+ Note that this patch is marked as 'Inappropriate' because there's a PR
+ upstream tracking this issue: https://github.com/SELinuxProject/refpolicy/pull/1280
+ When that PR is merged, we should drop this patch.
+]
+
+Signed-off-by: Chen Qi <chenqi_hycx@cetc.com.cn>
+---
+ policy/modules/system/authlogin.if | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/policy/modules/system/authlogin.if b/policy/modules/system/authlogin.if
+index 6518f230e..91a46ed08 100644
+--- a/policy/modules/system/authlogin.if
++++ b/policy/modules/system/authlogin.if
+@@ -878,7 +878,7 @@ interface(`auth_rw_shadow_lock',`
+ type shadow_lock_t;
+ ')
+
+- allow $1 shadow_lock_t:file rw_file_perms;
++ allow $1 shadow_lock_t:file { create rw_file_perms };
+ files_etc_filetrans($1, shadow_lock_t, file, ".pwd.lock")
+ files_etc_filetrans($1, shadow_lock_t, file, "passwd.lock")
+ files_etc_filetrans($1, shadow_lock_t, file, "group.lock")
@@ -73,6 +73,7 @@ SRC_URI += " \
file://0055-policy-modules-system-setrans-allow-setrans_t-use-fd.patch \
file://0056-policy-modules-system-systemd-make-_systemd_t-MLS-tr.patch \
file://0057-policy-modules-system-logging-make-syslogd_runtime_t.patch \
+ file://0058-authlogin-allow-creating-the-shadow-lock-files.patch \
"
S = "${UNPACKDIR}/refpolicy"