Skip to content

Commit

Permalink
openssh: fix sshd.socket failure issue
Browse files Browse the repository at this point in the history
More info at:
systemd/systemd#29897

Fixed a mishap in sshd homedir location. Newer sshd uses
/usr/share/empty.sshd as its home dir.

Change-Id: I6481acfcdfc4a8971abed9935e49cd393b7f1086
Signed-off-by: Shreenidhi Shedi <[email protected]>
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/c/photon/+/22309
Reviewed-by: Tapas Kundu <[email protected]>
Tested-by: Tapas Kundu <[email protected]>
  • Loading branch information
sshedi authored and tapakund committed Nov 9, 2023
1 parent 7ea411c commit 1c7eb08
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions SPECS/openssh/openssh.spec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Summary: Free version of the SSH connectivity tools
Name: openssh
Version: 9.3p2
Release: 3%{?dist}
Release: 4%{?dist}
License: BSD
URL: https://www.openssh.com
Group: System Environment/Security
Expand Down Expand Up @@ -111,7 +111,6 @@ install -p -D -m 0644 %{SOURCE5} %{buildroot}%{_sysusersdir}/%{name}.sysusers

%{_fixperms} %{buildroot}/*

%if 0%{?with_check}
%check
if ! getent passwd sshd >/dev/null; then
useradd sshd
Expand All @@ -124,7 +123,6 @@ cp %{buildroot}%{_bindir}/scp %{_bindir}
chmod g+w . -R
useradd test -G root -m
sudo -u test -s /bin/bash -c "PATH=$PATH make tests -j$(nproc)"
%endif

%pre server
%sysusers_create_compat %{SOURCE5}
Expand All @@ -135,7 +133,7 @@ sudo -u test -s /bin/bash -c "PATH=$PATH make tests -j$(nproc)"
%post server
/sbin/ldconfig
if [ $1 -eq 1 ]; then
chown -v root:sys %{privsep_path}
chown -v root:sys %{privsep_path}
fi
%systemd_post %{sshd_services}

Expand Down Expand Up @@ -195,6 +193,8 @@ rm -rf %{buildroot}/*
%{_mandir}/man8/ssh-sk-helper.8.gz

%changelog
* Tue Nov 07 2023 Shreenidhi Shedi <[email protected]> 9.3p2-4
- Fix sshd.socket failure issue upon graceful session exit
* Wed Aug 30 2023 Shreenidhi Shedi <[email protected]> 9.3p2-3
- Keyscan fips mode fix
* Fri Jul 28 2023 Srish Srinivasan <[email protected]> 9.3p2-2
Expand Down
2 changes: 1 addition & 1 deletion SPECS/openssh/openssh.sysusers
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
g sshd 50
u sshd 50 "sshd PrivSep" /var/lib/sshd /bin/false
u sshd 50 "sshd PrivSep" /usr/share/empty.sshd /bin/false
2 changes: 1 addition & 1 deletion SPECS/openssh/sshdat.service
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
Description=SSH Per-Connection Server

[Service]
ExecStart=/usr/sbin/sshd -i
ExecStart=-/usr/sbin/sshd -i
StandardInput=socket
StandardError=syslog

0 comments on commit 1c7eb08

Please sign in to comment.