Skip to contentSkip to conversation

refpolicy: fix build for refpolicy-minimum

PATCH New Yi Zhao 1 participant 2 messages Sep 18, 2025

lore
Share & tools
lore

Yi Zhao

author
#0 lore raw

PATCH 1/2 refpolicy: fix build for refpolicy-minimum

Backport 2 patches to fix build for refpolicy-minimum when INIT_MANAGER is set to sysvinit.

---
 .../refpolicy/0067-fixdep-dbus.patch          | 45 +++++++++++++++++++
 ...ding-when-dbus-module-is-not-enabled.patch | 42 +++++++++++++++++
 .../refpolicy/refpolicy_common.inc            |  2 +
 3 files changed, 89 insertions(+)
 create mode 100644 recipes-security/refpolicy/refpolicy/0067-fixdep-dbus.patch
 create mode 100644 recipes-security/refpolicy/refpolicy/0068-fix-building-when-dbus-module-is-not-enabled.patch
recipes-security/refpolicy/refpolicy/0067-fixdep-dbus.patch new file +45 -0
new file mode 100644
index 0000000..9f5958a
@@ -0,0 +1,45 @@
+From 684b47eddf512402db552601c33e2d0ad4eef578 Mon Sep 17 00:00:00 2001
+From: Nicolas PARLANT <[email protected]>
+Date: Fri, 17 Jan 2025 15:51:48 +0100
+Subject: [PATCH] fixdep dbus
+
+auth_use_pam_systemd requires dbus  :
+
+> /var/lib/selinux/targeted/tmp/modules/400/authlogin/cil:133 =
+> (typeattributeset cil_gen_require dbusd_system_bus_client)
+
+Upstream-Status: Backport
+[https://github.com/SELinuxProject/refpolicy/commit/684b47eddf512402db552601c33e2d0ad4eef578]
+
+Signed-off-by: Nicolas PARLANT <[email protected]>
+Signed-off-by: Yi Zhao <[email protected]>
+---
+ policy/modules/system/authlogin.te | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/policy/modules/system/authlogin.te b/policy/modules/system/authlogin.te
+index a75a669b9..d9d1a1428 100644
+--- a/policy/modules/system/authlogin.te
++++ b/policy/modules/system/authlogin.te
+@@ -142,7 +142,6 @@ term_dontaudit_use_all_ptys(chkpwd_t)
+ 
+ auth_read_shadow_history(chkpwd_t)
+ auth_use_nsswitch(chkpwd_t)
+-auth_use_pam_systemd(chkpwd_t)
+ 
+ logging_send_audit_msgs(chkpwd_t)
+ logging_send_syslog_msg(chkpwd_t)
+@@ -160,6 +159,10 @@ ifdef(`distro_ubuntu',`
+ 	')
+ ')
+ 
++ifdef(`init_systemd',`
++	auth_use_pam_systemd(chkpwd_t)
++')
++
+ optional_policy(`
+ 	# apache leaks file descriptors
+ 	apache_dontaudit_rw_tcp_sockets(chkpwd_t)
+-- 
+2.34.1
+
recipes-security/refpolicy/refpolicy/0068-fix-building-when-dbus-module-is-not-enabled.patch new file +42 -0

42 lines not on this page · raw message

recipes-security/refpolicy/refpolicy_common.inc +2 -0
index 5cb44a8..d1a6214 100644
@@ -82,6 +82,8 @@ SRC_URI += " \
         file://0064-policy-modules-system-locallogin-allow-sulogin_t-unc.patch \
         file://0065-policy-modules-system-locallogin-allow-sulogin_t-use.patch \
         file://0066-policy-modules-services-oddjob-allow-oddjob_mkhomedi.patch \
+        file://0067-fixdep-dbus.patch \
+        file://0068-fix-building-when-dbus-module-is-not-enabled.patch \
         "
 
 S = "${WORKDIR}/refpolicy"
Signature · 1 line
2.34.1
author
#1 lore raw

PATCH 2/2 openssh: update sshd_config

Synchronize sshd_config with that in oe-core.

---
 .../openssh/files/sshd_config                 | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)
recipes-connectivity/openssh/files/sshd_config +10 -9
index 1c33ad0..18a69d9 100644
@@ -1,4 +1,4 @@
-#	$OpenBSD: sshd_config,v 1.102 2018/02/16 02:32:40 djm Exp $
+#	$OpenBSD: sshd_config,v 1.104 2021/07/02 05:11:21 dtucker Exp $
 
 # This is the sshd server system-wide configuration file.  See
 # sshd_config(5) for more information.
@@ -10,6 +10,8 @@
 # possible, but leave them commented.  Uncommented options override the
 # default value.
 
+Include /etc/ssh/sshd_config.d/*.conf
+
 #Port 22
 #AddressFamily any
 #ListenAddress 0.0.0.0
@@ -38,7 +40,7 @@
 
 # The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
 # but this is overridden so installations will only check .ssh/authorized_keys
-#AuthorizedKeysFile	.ssh/authorized_keys
+AuthorizedKeysFile	.ssh/authorized_keys
 
 #AuthorizedPrincipalsFile none
 
@@ -57,9 +59,9 @@
 #PasswordAuthentication yes
 #PermitEmptyPasswords no
 
-# Change to yes to enable challenge-response passwords (beware issues with
-# some PAM modules and threads)
-ChallengeResponseAuthentication no
+# Change to yes to enable keyboard-interactive authentication (beware issues
+# with some PAM modules and threads)
+KbdInteractiveAuthentication no
 
 # Kerberos options
 #KerberosAuthentication no
@@ -73,13 +75,13 @@ ChallengeResponseAuthentication no
 
 # Set this to 'yes' to enable PAM authentication, account processing,
 # and session processing. If this is enabled, PAM authentication will
-# be allowed through the ChallengeResponseAuthentication and
+# be allowed through the KbdInteractiveAuthentication and
 # PasswordAuthentication.  Depending on your PAM configuration,
-# PAM authentication via ChallengeResponseAuthentication may bypass
+# PAM authentication via KbdInteractiveAuthentication may bypass
 # the setting of "PermitRootLogin without-password".
 # If you just want the PAM account and session checks to run without
 # PAM authentication, then enable this but set PasswordAuthentication
-# and ChallengeResponseAuthentication to 'no'.
+# and KbdInteractiveAuthentication to 'no'.
 UsePAM yes
 
 #AllowAgentForwarding yes
@@ -92,7 +94,6 @@ UsePAM yes
 #PrintMotd yes
 #PrintLastLog yes
 #TCPKeepAlive yes
-#UseLogin no
 #PermitUserEnvironment no
 Compression no
 ClientAliveInterval 15
Signature · 1 line
2.34.1