diff --git a/openssh-8.4p1-pam_motd.patch b/openssh-8.4p1-pam_motd.patch new file mode 100644 index 0000000..1bb9969 --- /dev/null +++ b/openssh-8.4p1-pam_motd.patch @@ -0,0 +1,19 @@ +Gemeinsame Unterverzeichnisse: openssh-8.4p1.orig/contrib und openssh-8.4p1/contrib. +Gemeinsame Unterverzeichnisse: openssh-8.4p1.orig/.github und openssh-8.4p1/.github. +Gemeinsame Unterverzeichnisse: openssh-8.4p1.orig/m4 und openssh-8.4p1/m4. +Gemeinsame Unterverzeichnisse: openssh-8.4p1.orig/openbsd-compat und openssh-8.4p1/openbsd-compat. +Gemeinsame Unterverzeichnisse: openssh-8.4p1.orig/regress und openssh-8.4p1/regress. +diff -u openssh-8.4p1.orig/sshd_config openssh-8.4p1/sshd_config +--- openssh-8.4p1.orig/sshd_config 2020-09-27 09:25:01.000000000 +0200 ++++ openssh-8.4p1/sshd_config 2021-05-18 19:15:39.190701511 +0200 +@@ -88,8 +88,8 @@ + #X11DisplayOffset 10 + #X11UseLocalhost yes + #PermitTTY yes +-#PrintMotd yes +-#PrintLastLog yes ++PrintMotd no ++PrintLastLog no + #TCPKeepAlive yes + #PermitUserEnvironment no + #Compression delayed diff --git a/openssh.changes b/openssh.changes index e970f28..56c8b87 100644 --- a/openssh.changes +++ b/openssh.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Wed Jun 23 18:32:20 UTC 2021 - Hans Petter Jansson + +- Don't move user-modified ssh_config and sshd_config files to + .rpmsave on upgrade. + +------------------------------------------------------------------- +Tue May 18 17:16:33 UTC 2021 - Thorsten Kukuk + +- Use pam_motd to unify motd message output [bsc#1185897] + (openssh-8.4p1-pam_motd.patch) + ------------------------------------------------------------------- Thu Apr 22 12:02:55 UTC 2021 - Hans Petter Jansson diff --git a/openssh.spec b/openssh.spec index 4fce50c..a8430bd 100644 --- a/openssh.spec +++ b/openssh.spec @@ -109,6 +109,7 @@ Patch44: openssh-fix-ssh-copy-id.patch Patch45: openssh-8.4p1-ssh_config_d.patch Patch46: openssh-whitelist-syscalls.patch Patch47: openssh-8.4p1-vendordir.patch +Patch48: openssh-8.4p1-pam_motd.patch BuildRequires: audit-devel BuildRequires: automake BuildRequires: groff @@ -363,8 +364,9 @@ done %pre server -f sshd.pre %if %{defined _distconfdir} -# move outdated pam.d/*.rpmsave file away +# Prepare for migration to /usr/etc. test -f /etc/pam.d/sshd.rpmsave && mv -v /etc/pam.d/sshd.rpmsave /etc/pam.d/sshd.rpmsave.old ||: +test -f /etc/ssh/sshd_config.rpmsave && mv -v /etc/ssh/sshd_config.rpmsave /etc/ssh/sshd_config.rpmsave.old ||: %endif %service_add_pre sshd.service @@ -390,8 +392,20 @@ fi %posttrans server # Migration to /usr/etc. test -f /etc/pam.d/sshd.rpmsave && mv -v /etc/pam.d/sshd.rpmsave /etc/pam.d/sshd ||: +test -f /etc/ssh/sshd_config.rpmsave && mv -v /etc/ssh/sshd_config.rpmsave /etc/ssh/sshd_config ||: %endif +%if %{defined _distconfdir} +%pre clients +# Prepare for migration to /usr/etc. +test -f /etc/ssh/ssh_config.rpmsave && mv -v /etc/ssh/ssh_config.rpmsave /etc/ssh/ssh_config.rpmsave.old ||: +%endif + +%if %{defined _distconfdir} +%posttrans clients +# Migration to /usr/etc. +test -f /etc/ssh/ssh_config.rpmsave && mv -v /etc/ssh/ssh_config.rpmsave /etc/ssh/ssh_config ||: +%endif %triggerin -n openssh-fips -- %{name} = %{version}-%{release} %restart_on_update sshd diff --git a/sshd.pamd b/sshd.pamd index cb4d696..5646361 100644 --- a/sshd.pamd +++ b/sshd.pamd @@ -6,5 +6,7 @@ account include common-account password include common-password session required pam_loginuid.so session include common-session -session optional pam_lastlog.so silent noupdate showfailed session optional pam_keyinit.so force revoke +session optional pam_lastlog.so showfailed +session optional pam_motd.so +