Accepting request 851366 from home:kukuk:branches:network
- Support /usr/etc/pam.d OBS-URL: https://build.opensuse.org/request/show/851366 OBS-URL: https://build.opensuse.org/package/show/network/openssh?expand=0&rev=220
This commit is contained in:
parent
916f9ab5d2
commit
a0dda9c806
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Nov 27 11:36:56 UTC 2020 - Thorsten Kukuk <kukuk@suse.com>
|
||||
|
||||
- Support /usr/etc/pam.d
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Nov 11 20:05:27 UTC 2020 - Hans Petter Jansson <hpj@suse.com>
|
||||
|
||||
|
24
openssh.spec
24
openssh.spec
@ -290,10 +290,14 @@ export LDFLAGS CFLAGS CXXFLAGS CPPFLAGS
|
||||
|
||||
%install
|
||||
%make_install
|
||||
|
||||
%if %{defined _distconfdir}
|
||||
install -d -m 755 %{buildroot}%{_distconfdir}/pam.d
|
||||
install -m 644 %{SOURCE2} %{buildroot}%{_distconfdir}/pam.d/sshd
|
||||
%else
|
||||
install -d -m 755 %{buildroot}%{_sysconfdir}/pam.d
|
||||
install -d -m 755 %{buildroot}%{_localstatedir}/lib/sshd
|
||||
install -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/pam.d/sshd
|
||||
%endif
|
||||
install -d -m 755 %{buildroot}%{_localstatedir}/lib/sshd
|
||||
install -d -m 755 %{buildroot}%{_sysconfdir}/slp.reg.d/
|
||||
install -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/slp.reg.d/
|
||||
install -D -m 0644 %{SOURCE10} %{buildroot}%{_unitdir}/sshd.service
|
||||
@ -350,6 +354,11 @@ fi
|
||||
%pre server
|
||||
getent group sshd >/dev/null || %{_sbindir}/groupadd -r sshd
|
||||
getent passwd sshd >/dev/null || %{_sbindir}/useradd -r -g sshd -d %{_localstatedir}/lib/sshd -s /bin/false -c "SSH daemon" sshd
|
||||
%if %{defined _distconfdir}
|
||||
# move outdated pam.d/*.rpmsave file away
|
||||
test -f /etc/pam.d/sshd.rpmsave && mv -v /etc/pam.d/sshd.rpmsave /etc/pam.d/sshd.rpmsave.old ||:
|
||||
%endif
|
||||
|
||||
|
||||
# See %%pre.
|
||||
if [ -x %{_bindir}/systemctl ]; then
|
||||
@ -386,6 +395,13 @@ else
|
||||
%service_del_postun sshd.service
|
||||
fi
|
||||
|
||||
%if %{defined _distconfdir}
|
||||
%posttrans server
|
||||
# Migration to /usr/etc.
|
||||
test -f /etc/pam.d/sshd.rpmsave && mv -v /etc/pam.d/sshd.rpmsave /etc/pam.d/sshd ||:
|
||||
%endif
|
||||
|
||||
|
||||
%triggerin -n openssh-fips -- %{name} = %{version}-%{release}
|
||||
%restart_on_update sshd
|
||||
|
||||
@ -412,7 +428,11 @@ fi
|
||||
%attr(0755,root,root) %{_sbindir}/sshd-gen-keys-start
|
||||
%dir %attr(755,root,root) %{_localstatedir}/lib/sshd
|
||||
%verify(not mode) %attr(0640,root,root) %config(noreplace) %{_sysconfdir}/ssh/sshd_config
|
||||
%if %{defined _distconfdir}
|
||||
%attr(0644,root,root) %{_distconfdir}/pam.d/sshd
|
||||
%else
|
||||
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/pam.d/sshd
|
||||
%endif
|
||||
%attr(0644,root,root) %{_unitdir}/sshd.service
|
||||
%attr(0444,root,root) %{_mandir}/man5/sshd_config*
|
||||
%attr(0444,root,root) %{_mandir}/man8/sftp-server.8*
|
||||
|
Loading…
Reference in New Issue
Block a user