+# TODO:
+# - add trigger to enable this:
+# * sshd(8): This release turns on pre-auth sandboxing sshd by default for
+# new installs, by setting UsePrivilegeSeparation=sandbox in sshd_config.
#
# Conditional build:
%bcond_without audit # sshd audit support
Summary(ru.UTF-8): OpenSSH - свободная реализация протокола Secure Shell (SSH)
Summary(uk.UTF-8): OpenSSH - вільна реалізація протоколу Secure Shell (SSH)
Name: openssh
-Version: 6.0p1
-Release: 1
+Version: 6.1p1
+Release: 2
Epoch: 2
License: BSD
Group: Applications/Networking
Source0: ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/%{name}-%{version}.tar.gz
-# Source0-md5: 3c9347aa67862881c5da3f3b1c08da7b
+# Source0-md5: 3345cbf4efe90ffb06a78670ab2d05d5
Source1: http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2
# Source1-md5: 66943d481cc422512b537bcc2c7400d1
Source2: %{name}d.init
Source8: %{name}d.upstart
Source9: sshd.service
Source10: sshd-keygen
+Source11: sshd.socket
+Source12: sshd@.service
Patch100: %{name}-heimdal.patch
Patch0: %{name}-no_libnsl.patch
Patch2: %{name}-pam_misc.patch
Patch12: %{name}-blacklist.diff
Patch13: %{name}-kuserok.patch
Patch14: %{name}-bind.patch
+Patch15: %{name}-disable_ldap.patch
URL: http://www.openssh.com/portable.html
BuildRequires: %{__perl}
+%{?with_tests:BuildRequires: %{name}-server}
%{?with_audit:BuildRequires: audit-libs-devel}
BuildRequires: autoconf >= 2.50
BuildRequires: automake
BuildRequires: rpm >= 4.4.9-56
BuildRequires: rpmbuild(macros) >= 1.627
BuildRequires: sed >= 4.0
-BuildRequires: zlib-devel
+BuildRequires: zlib-devel >= 1.2.3
+Requires: zlib >= 1.2.3
%if "%{pld_release}" == "ac"
Requires: filesystem >= 2.0-1
Requires: pam >= 0.79.0
Requires(post,preun,postun): systemd-units >= 38
Requires: %{name} = %{epoch}:%{version}-%{release}
# remove in 6.0, kept for flawless upgrade
-Requires: %{name}-server-ldap = %{epoch}:%{version}-%{release}
+%{?with_ldap:Requires: %{name}-server-ldap = %{epoch}:%{version}-%{release}}
Requires: pam >= %{pam_ver}
Requires: rc-scripts >= 0.4.3.0
Requires: systemd-units >= 38
%patch12 -p1
%patch13 -p1
%patch14 -p1
+%patch15 -p1
%if "%{pld_release}" == "ac"
# fix for missing x11.pc
%{__sed} -e 's|@@LIBEXECDIR@@|%{_libexecdir}|g' %{SOURCE9} >$RPM_BUILD_ROOT%{systemdunitdir}/sshd.service
cp -p %{SOURCE10} $RPM_BUILD_ROOT%{_libexecdir}/sshd-keygen
+cp -p %{SOURCE11} $RPM_BUILD_ROOT%{systemdunitdir}
+cp -p %{SOURCE12} $RPM_BUILD_ROOT%{systemdunitdir}
+
%if %{with gnome}
install -p contrib/gnome-ssh-askpass1 $RPM_BUILD_ROOT%{_libexecdir}/ssh/ssh-askpass
%endif
EOF
%{__rm} $RPM_BUILD_ROOT%{_mandir}/README.openssh-non-english-man-pages
-%{__rm} $RPM_BUILD_ROOT%{_sysconfdir}/ldap.conf
+%{?with_ldap:%{__rm} $RPM_BUILD_ROOT%{_sysconfdir}/ldap.conf}
%clean
rm -rf $RPM_BUILD_ROOT
%post server
/sbin/chkconfig --add sshd
%service sshd reload "OpenSSH Daemon"
-if ! grep -qs ssh /etc/security/passwd.conf ; then
- umask 022
- echo "ssh" >> /etc/security/passwd.conf
-fi
NORESTART=1
%systemd_post sshd.service
%{__sed} -i -e '
# disable old configs
# just UseLPK/LkpLdapConf supported for now
- s/^UseLPK/## Obsolete &/
- s/^Lpk/## Obsolete &/
+ s/^\s*UseLPK/## Obsolete &/
+ s/^\s*Lpk/## Obsolete &/
# Enable new ones, assumes /etc/ldap.conf defaults, see HOWTO.ldap-keys
/UseLPK/iAuthorizedKeysCommand %{_libexecdir}/ssh-ldap-wrapper
' %{_sysconfdir}/sshd_config
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/sshd
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/blacklist.sshd
%{systemdunitdir}/sshd.service
+%{systemdunitdir}/sshd.socket
+%{systemdunitdir}/sshd@.service
%if %{with ldap}
%files server-ldap