2 # - add trigger to enable this:
3 # * sshd(8): This release turns on pre-auth sandboxing sshd by default for
4 # new installs, by setting UsePrivilegeSeparation=sandbox in sshd_config.
7 %bcond_without audit # sshd audit support
8 %bcond_with gnome # gnome-askpass (GNOME 1.x) utility
9 %bcond_without gtk # gnome-askpass (GTK+ 2.x) utility
10 %bcond_without ldap # LDAP support
11 %bcond_with ldns # DNSSEC support via libldns
12 %bcond_without libedit # libedit (editline/history support in sftp client)
13 %bcond_without kerberos5 # Kerberos5 support
14 %bcond_without selinux # SELinux support
15 %bcond_without libseccomp # use libseccomp for seccomp privsep (requires 3.5 kernel)
16 %bcond_with hpn # High Performance SSH/SCP - HPN-SSH including Cipher NONE (broken too often)
17 %bcond_without tests # test suite
19 # gtk2-based gnome-askpass means no gnome1-based
20 %{?with_gtk:%undefine with_gnome}
22 %if "%{pld_release}" == "ac"
23 %define pam_ver 0.79.0
25 %define pam_ver 1:1.1.8-5
27 Summary: OpenSSH free Secure Shell (SSH) implementation
28 Summary(de.UTF-8): OpenSSH - freie Implementation der Secure Shell (SSH)
29 Summary(es.UTF-8): Implementación libre de SSH
30 Summary(fr.UTF-8): Implémentation libre du shell sécurisé OpenSSH (SSH)
31 Summary(it.UTF-8): Implementazione gratuita OpenSSH della Secure Shell
32 Summary(pl.UTF-8): Publicznie dostępna implementacja bezpiecznego shella (SSH)
33 Summary(pt.UTF-8): Implementação livre OpenSSH do protocolo 'Secure Shell' (SSH)
34 Summary(pt_BR.UTF-8): Implementação livre do SSH
35 Summary(ru.UTF-8): OpenSSH - свободная реализация протокола Secure Shell (SSH)
36 Summary(uk.UTF-8): OpenSSH - вільна реалізація протоколу Secure Shell (SSH)
42 Group: Applications/Networking
43 Source0: http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/%{name}-%{version}.tar.gz
44 # Source0-md5: 513694343631a99841e815306806edf0
45 Source1: http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2
46 # Source1-md5: 66943d481cc422512b537bcc2c7400d1
47 Source2: %{name}d.init
48 Source3: %{name}d.pamd
49 Source4: %{name}.sysconfig
51 Source6: ssh-agent.conf
52 Source7: %{name}-lpk.schema
56 Source12: sshd@.service
57 Patch0: %{name}-no-pty-tests.patch
58 Patch1: %{name}-tests-reuseport.patch
59 Patch2: %{name}-pam_misc.patch
60 Patch3: %{name}-sigpipe.patch
61 # http://pkgs.fedoraproject.org/gitweb/?p=openssh.git;a=tree
62 Patch4: %{name}-ldap.patch
63 Patch5: %{name}-ldap-fixes.patch
64 Patch6: ldap.conf.patch
65 Patch7: %{name}-config.patch
66 Patch8: ldap-helper-sigpipe.patch
67 # High Performance SSH/SCP - HPN-SSH - http://www.psc.edu/networking/projects/hpn-ssh/
68 # http://www.psc.edu/networking/projects/hpn-ssh/openssh-5.2p1-hpn13v6.diff.gz
69 Patch9: %{name}-5.2p1-hpn13v6.diff
70 Patch10: %{name}-include.patch
71 Patch11: %{name}-chroot.patch
72 Patch12: openssh-bug-2905.patch
74 Patch14: %{name}-bind.patch
75 Patch15: %{name}-disable_ldap.patch
76 URL: http://www.openssh.com/portable.html
77 BuildRequires: %{__perl}
78 %{?with_audit:BuildRequires: audit-libs-devel}
79 BuildRequires: autoconf >= 2.50
80 BuildRequires: automake
81 %{?with_gnome:BuildRequires: gnome-libs-devel}
82 %{?with_gtk:BuildRequires: gtk+2-devel}
83 %{?with_kerberos5:BuildRequires: heimdal-devel >= 0.7}
84 %{?with_ldns:BuildRequires: ldns-devel}
85 %{?with_libedit:BuildRequires: libedit-devel}
86 BuildRequires: libseccomp-devel
87 %{?with_selinux:BuildRequires: libselinux-devel}
88 %{?with_ldap:BuildRequires: openldap-devel}
89 BuildRequires: openssl-devel >= 1.1.0g
90 BuildRequires: pam-devel
91 %{?with_gtk:BuildRequires: pkgconfig}
92 BuildRequires: rpm >= 4.4.9-56
93 BuildRequires: rpmbuild(macros) >= 1.627
94 BuildRequires: sed >= 4.0
95 BuildRequires: zlib-devel >= 1.2.3
96 %if %{with tests} && 0%(id -u sshd >/dev/null 2>&1; echo $?)
97 BuildRequires: %{name}-server
99 %if %{with tests} && %{with libseccomp}
100 # libseccomp based sandbox requires NO_NEW_PRIVS prctl flag
101 BuildRequires: uname(release) >= 3.5
103 Requires: zlib >= 1.2.3
104 %if "%{pld_release}" == "ac"
105 Requires: filesystem >= 2.0-1
106 Requires: pam >= 0.79.0
108 Requires: filesystem >= 3.0-11
109 Requires: pam >= %{pam_ver}
110 Suggests: xorg-app-xauth
113 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
115 %define _sysconfdir /etc/ssh
116 %define _libexecdir %{_libdir}/%{name}
117 %define _privsepdir /usr/share/empty
118 %define schemadir /usr/share/openldap/schema
121 Ssh (Secure Shell) a program for logging into a remote machine and for
122 executing commands in a remote machine. It is intended to replace
123 rlogin and rsh, and provide secure encrypted communications between
124 two untrusted hosts over an insecure network. X11 connections and
125 arbitrary TCP/IP ports can also be forwarded over the secure channel.
127 OpenSSH is OpenBSD's rework of the last free version of SSH, bringing
128 it up to date in terms of security and features, as well as removing
129 all patented algorithms to seperate libraries (OpenSSL).
131 This package includes the core files necessary for both the OpenSSH
132 client and server. To make this package useful, you should also
133 install openssh-clients, openssh-server, or both.
136 This release includes High Performance SSH/SCP patches from
137 http://www.psc.edu/networking/projects/hpn-ssh/ which are supposed to
138 increase throughput on fast connections with high RTT (20-150 msec).
139 See the website for '-w' values for your connection and /proc/sys TCP
140 values. BTW. in a LAN you have got generally RTT < 1 msec.
143 %description -l de.UTF-8
144 OpenSSH (Secure Shell) stellt den Zugang zu anderen Rechnern her. Es
145 ersetzt telnet, rlogin, rexec und rsh und stellt eine sichere,
146 verschlüsselte Verbindung zwischen zwei nicht vertrauenswürdigen Hosts
147 über eine unsicheres Netzwerk her. X11 Verbindungen und beliebige
148 andere TCP/IP Ports können ebenso über den sicheren Channel
149 weitergeleitet werden.
151 %description -l es.UTF-8
152 SSH es un programa para accesar y ejecutar órdenes en computadores
153 remotos. Sustituye rlogin y rsh, y suministra un canal de comunicación
154 seguro entre dos servidores en una red insegura. Conexiones X11 y
155 puertas TCP/IP arbitrárias también pueden ser usadas por el canal
158 OpenSSH es el resultado del trabajo del equipo de OpenBSD para
159 continuar la última versión gratuita de SSH, actualizándolo en
160 términos de seguridad y recursos,así también eliminando todos los
161 algoritmos patentados y colocándolos en bibliotecas separadas
164 Este paquete contiene "port" para Linux de OpenSSH. Se debe instalar
165 también el paquete openssh-clients u openssh-server o ambos.
167 %description -l fr.UTF-8
168 OpenSSH (Secure Shell) fournit un accès à un système distant. Il
169 remplace telnet, rlogin, rexec et rsh, tout en assurant des
170 communications cryptées securisées entre deux hôtes non fiabilisés sur
171 un réseau non sécurisé. Des connexions X11 et des ports TCP/IP
172 arbitraires peuvent également être transmis sur le canal sécurisé.
174 %description -l it.UTF-8
175 OpenSSH (Secure Shell) fornisce l'accesso ad un sistema remoto.
176 Sostituisce telnet, rlogin, rexec, e rsh, e fornisce comunicazioni
177 sicure e crittate tra due host non fidati su una rete non sicura. Le
178 connessioni X11 ad una porta TCP/IP arbitraria possono essere
179 inoltrate attraverso un canale sicuro.
181 %description -l pl.UTF-8
182 Ssh (Secure Shell) to program służący do logowania się na zdalną
183 maszynę i uruchamiania na niej aplikacji. W zamierzeniu openssh ma
184 zastąpić rlogin, rsh i dostarczyć bezpieczne, szyfrowane połączenie
185 pomiędzy dwoma hostami.
187 Ten pakiet zawiera podstawowe pliki potrzebne zarówno po stronie
188 klienta jak i serwera OpenSSH. Aby był użyteczny, trzeba zainstalować
189 co najmniej jeden z pakietów: openssh-clients lub openssh-server.
192 Ta wersja zawiera łaty z projektu High Performance SSH/SCP
193 http://www.psc.edu/networking/projects/hpn-ssh/, które mają na celu
194 zwiększenie przepustowości transmisji dla szybkich połączeń z dużym
195 RTT (20-150 msec). Na stronie projektu znaleźć można odpowednie dla
196 danego połączenia wartości parametru '-w' oraz opcje /proc/sys dla
197 TCP. Nawiasem mówiąc w sieciach LAN RTT < 1 msec.
200 %description -l pt.UTF-8
201 OpenSSH (Secure Shell) fornece acesso a um sistema remoto. Substitui o
202 telnet, rlogin, rexec, e o rsh e fornece comunicações seguras e
203 cifradas entre duas máquinas sem confiança mútua sobre uma rede
204 insegura. Ligações X11 e portos TCP/IP arbitrários também poder ser
205 reenviados pelo canal seguro.
207 %description -l pt_BR.UTF-8
208 SSH é um programa para acessar e executar comandos em máquinas
209 remotas. Ele substitui rlogin e rsh, e provem um canal de comunicação
210 seguro entre dois hosts em uma rede insegura. Conexões X11 e portas
211 TCP/IP arbitrárias também podem ser usadas pelo canal seguro.
213 OpenSSH é o resultado do trabalho da equipe do OpenBSD em continuar a
214 última versão gratuita do SSH, atualizando-o em termos de segurança e
215 recursos, assim como removendo todos os algoritmos patenteados e
216 colocando-os em bibliotecas separadas (OpenSSL).
218 Esse pacote contém o "port" pra Linux do OpenSSH. Você deve instalar
219 também ou o pacote openssh-clients, ou o openssh-server, ou ambos.
221 %description -l ru.UTF-8
222 Ssh (Secure Shell) - это программа для "захода" (login) на удаленную
223 машину и для выполнения команд на удаленной машине. Она предназначена
224 для замены rlogin и rsh и обеспечивает безопасную шифрованную
225 коммуникацию между двумя хостами в сети, являющейся небезопасной.
226 Соединения X11 и любые порты TCP/IP могут также быть проведены через
229 OpenSSH - это переделка командой разработчиков OpenBSD последней
230 свободной версии SSH, доведенная до современного состояния в терминах
231 уровня безопасности и поддерживаемых возможностей. Все патентованные
232 алгоритмы вынесены в отдельные библиотеки (OpenSSL).
234 Этот пакет содержит файлы, необходимые как для клиента, так и для
235 сервера OpenSSH. Вам нужно будет установить еще openssh-clients,
236 openssh-server, или оба пакета.
238 %description -l uk.UTF-8
239 Ssh (Secure Shell) - це програма для "заходу" (login) до віддаленої
240 машини та для виконання команд на віддаленій машині. Вона призначена
241 для заміни rlogin та rsh і забезпечує безпечну шифровану комунікацію
242 між двома хостами в мережі, яка не є безпечною. З'єднання X11 та
243 довільні порти TCP/IP можуть також бути проведені через безпечний
246 OpenSSH - це переробка командою розробників OpenBSD останньої вільної
247 версії SSH, доведена до сучасного стану в термінах рівня безпеки та
248 підтримуваних можливостей. Всі патентовані алгоритми винесені до
249 окремих бібліотек (OpenSSL).
251 Цей пакет містить файли, необхідні як для клієнта, так і для сервера
252 OpenSSH. Вам потрібно буде ще встановити openssh-clients,
253 openssh-server, чи обидва пакети.
256 Summary: OpenSSH Secure Shell protocol clients
257 Summary(es.UTF-8): Clientes de OpenSSH
258 Summary(pl.UTF-8): Klienci protokołu Secure Shell
259 Summary(pt_BR.UTF-8): Clientes do OpenSSH
260 Summary(ru.UTF-8): OpenSSH - клиенты протокола Secure Shell
261 Summary(uk.UTF-8): OpenSSH - клієнти протоколу Secure Shell
262 Group: Applications/Networking
264 Provides: ssh-clients
265 Obsoletes: ssh-clients
266 %requires_eq_to openssl openssl-devel
269 Ssh (Secure Shell) a program for logging into a remote machine and for
270 executing commands in a remote machine. It is intended to replace
271 rlogin and rsh, and provide secure encrypted communications between
272 two untrusted hosts over an insecure network. X11 connections and
273 arbitrary TCP/IP ports can also be forwarded over the secure channel.
275 OpenSSH is OpenBSD's rework of the last free version of SSH, bringing
276 it up to date in terms of security and features, as well as removing
277 all patented algorithms to seperate libraries (OpenSSL).
279 This package includes the clients necessary to make encrypted
280 connections to SSH servers.
282 %description clients -l es.UTF-8
283 Este paquete incluye los clientes que se necesitan para hacer
284 conexiones codificadas con servidores SSH.
286 %description clients -l pl.UTF-8
287 Ssh (Secure Shell) to program służący do logowania się na zdalną
288 maszynę i uruchamiania na niej aplikacji. W zamierzeniu openssh ma
289 zastąpić rlogin, rsh i dostarczyć bezpieczne, szyfrowane połączenie
290 pomiędzy dwoma hostami.
292 Ten pakiet zawiera klientów służących do łączenia się z serwerami SSH.
294 %description clients -l pt_BR.UTF-8
295 Esse pacote inclui os clientes necessários para fazer conexões
296 encriptadas com servidores SSH.
298 %description clients -l ru.UTF-8
299 Ssh (Secure Shell) - это программа для "захода" (login) на удаленную
300 машину и для выполнения команд на удаленной машине.
302 Этот пакет содержит программы-клиенты, необходимые для установления
303 зашифрованных соединений с серверами SSH.
305 %description clients -l uk.UTF-8
306 Ssh (Secure Shell) - це програма для "заходу" (login) до віддаленої
307 машини та для виконання команд на віддаленій машині.
309 Цей пакет містить програми-клієнти, необхідні для встановлення
310 зашифрованих з'єднань з серверами SSH.
312 %package clients-agent-profile_d
313 Summary: OpenSSH Secure Shell agent init script
314 Summary(pl.UTF-8): Skrypt startowy agenta OpenSSH
315 Group: Applications/Networking
316 Requires: %{name}-clients = %{epoch}:%{version}-%{release}
318 %description clients-agent-profile_d
319 profile.d scripts for starting SSH agent.
321 %description clients-agent-profile_d -l pl.UTF-8
322 Skrypty profile.d do uruchamiania agenta SSH.
324 %package clients-agent-xinitrc
325 Summary: OpenSSH Secure Shell agent init script
326 Summary(pl.UTF-8): Skrypt inicjujący agenta ssh przez xinitrc
327 Group: Applications/Networking
328 Requires: %{name}-clients-agent-profile_d = %{epoch}:%{version}-%{release}
331 %description clients-agent-xinitrc
332 xinitrc scripts for starting SSH agent.
334 %description clients-agent-xinitrc -l pl.UTF-8
335 Skrypty xinitrc do uruchamiania agenta SSH.
338 Summary: OpenSSH Secure Shell protocol server (sshd)
339 Summary(de.UTF-8): OpenSSH Secure Shell Protocol-Server (sshd)
340 Summary(es.UTF-8): Servidor OpenSSH para comunicaciones codificadas
341 Summary(fr.UTF-8): Serveur de protocole du shell sécurisé OpenSSH (sshd)
342 Summary(it.UTF-8): Server OpenSSH per il protocollo Secure Shell (sshd)
343 Summary(pl.UTF-8): Serwer protokołu Secure Shell (sshd)
344 Summary(pt.UTF-8): Servidor do protocolo 'Secure Shell' OpenSSH (sshd)
345 Summary(pt_BR.UTF-8): Servidor OpenSSH para comunicações encriptadas
346 Summary(ru.UTF-8): OpenSSH - сервер протокола Secure Shell (sshd)
347 Summary(uk.UTF-8): OpenSSH - сервер протоколу Secure Shell (sshd)
348 Group: Networking/Daemons
349 Requires(post): /sbin/chkconfig
351 Requires(post,preun): /sbin/chkconfig
352 Requires(postun): /usr/sbin/userdel
353 Requires(pre): /bin/id
354 Requires(pre): /usr/sbin/useradd
355 Requires(post,preun,postun): systemd-units >= 38
356 Requires: %{name} = %{epoch}:%{version}-%{release}
357 Requires: pam >= %{pam_ver}
358 Requires: rc-scripts >= 0.4.3.0
359 Requires: systemd-units >= 38
360 %{?with_libseccomp:Requires: uname(release) >= 3.5}
362 %{?with_ldap:Suggests: %{name}-server-ldap}
364 Suggests: xorg-app-xauth
367 %requires_eq_to openssl openssl-devel
370 Ssh (Secure Shell) a program for logging into a remote machine and for
371 executing commands in a remote machine. It is intended to replace
372 rlogin and rsh, and provide secure encrypted communications between
373 two untrusted hosts over an insecure network. X11 connections and
374 arbitrary TCP/IP ports can also be forwarded over the secure channel.
376 OpenSSH is OpenBSD's rework of the last free version of SSH, bringing
377 it up to date in terms of security and features, as well as removing
378 all patented algorithms to seperate libraries (OpenSSL).
380 This package contains the secure shell daemon. The sshd is the server
381 part of the secure shell protocol and allows ssh clients to connect to
384 %description server -l de.UTF-8
385 Dieses Paket installiert den sshd, den Server-Teil der OpenSSH.
387 %description server -l es.UTF-8
388 Este paquete contiene el servidor SSH. sshd es la parte servidor del
389 protocolo secure shell y permite que clientes ssh se conecten a su
392 %description server -l fr.UTF-8
393 Ce paquetage installe le 'sshd', partie serveur de OpenSSH.
395 %description server -l it.UTF-8
396 Questo pacchetto installa sshd, il server di OpenSSH.
398 %description server -l pl.UTF-8
399 Ssh (Secure Shell) to program służący do logowania się na zdalną
400 maszynę i uruchamiania na niej aplikacji. W zamierzeniu openssh ma
401 zastąpić rlogin, rsh i dostarczyć bezpieczne, szyfrowane połączenie
402 pomiędzy dwoma hostami.
404 Ten pakiet zawiera serwer sshd (do którego mogą łączyć się klienci
407 %description server -l pt.UTF-8
408 Este pacote intala o sshd, o servidor do OpenSSH.
410 %description server -l pt_BR.UTF-8
411 Esse pacote contém o servidor SSH. O sshd é a parte servidor do
412 protocolo secure shell e permite que clientes ssh se conectem ao seu
415 %description server -l ru.UTF-8
416 Ssh (Secure Shell) - это программа для "захода" (login) на удаленную
417 машину и для выполнения команд на удаленной машине.
419 Этот пакет содержит sshd - "демон" Secure Shell. sshd - это серверная
420 часть протокола Secure Shell, позволяющая клиентам ssh соединяться с
423 %description server -l uk.UTF-8
424 Ssh (Secure Shell) - це програма для "заходу" (login) до віддаленої
425 машини та для виконання команд на віддаленій машині.
427 Цей пакет містить sshd - "демон" Secure Shell. sshd - це серверна
428 частина протоколу Secure Shell, яка дозволяє клієнтам ssh зв'язуватись
432 Summary: A LDAP support for open source SSH server daemon
433 Summary(pl.UTF-8): Wsparcie LDAP dla serwera OpenSSH
435 Requires: %{name} = %{epoch}:%{version}-%{release}
436 Requires: openldap-nss-config
438 %description server-ldap
439 OpenSSH LDAP backend is a way how to distribute the authorized tokens
440 among the servers in the network.
442 %description server-ldap -l pl.UTF-8
443 Backend LDAP dla OpenSSH to metoda rozprowadzania autoryzowanych
444 tokenów między serwerami w sieci.
446 %package gnome-askpass
447 Summary: OpenSSH GNOME passphrase dialog
448 Summary(de.UTF-8): OpenSSH GNOME Passwort-Dialog
449 Summary(es.UTF-8): Diálogo para introducción de passphrase para GNOME
450 Summary(fr.UTF-8): Dialogue pass-phrase GNOME d'OpenSSH
451 Summary(it.UTF-8): Finestra di dialogo GNOME per la frase segreta di OpenSSH
452 Summary(pl.UTF-8): Odpytywacz hasła OpenSSH dla GNOME
453 Summary(pt.UTF-8): Diálogo de pedido de senha para GNOME do OpenSSH
454 Summary(pt_BR.UTF-8): Diálogo para entrada de passphrase para GNOME
455 Summary(ru.UTF-8): OpenSSH - диалог ввода ключевой фразы (passphrase) для GNOME
456 Summary(uk.UTF-8): OpenSSH - діалог вводу ключової фрази (passphrase) для GNOME
457 Group: Applications/Networking
458 Requires: %{name} = %{epoch}:%{version}-%{release}
459 Obsoletes: openssh-askpass
460 Obsoletes: ssh-askpass
461 Obsoletes: ssh-extras
463 %description gnome-askpass
464 Ssh (Secure Shell) a program for logging into a remote machine and for
465 executing commands in a remote machine. It is intended to replace
466 rlogin and rsh, and provide secure encrypted communications between
467 two untrusted hosts over an insecure network. X11 connections and
468 arbitrary TCP/IP ports can also be forwarded over the secure channel.
470 OpenSSH is OpenBSD's rework of the last free version of SSH, bringing
471 it up to date in terms of security and features, as well as removing
472 all patented algorithms to seperate libraries (OpenSSL).
474 This package contains the GNOME passphrase dialog.
476 %description gnome-askpass -l es.UTF-8
477 Este paquete contiene un programa que abre una caja de diálogo para
478 entrada de passphrase en GNOME.
480 %description gnome-askpass -l pl.UTF-8
481 Ssh (Secure Shell) to program służący do logowania się na zdalną
482 maszynę i uruchamiania na niej aplikacji. W zamierzeniu openssh ma
483 zastąpić rlogin, rsh i dostarczyć bezpieczne, szyfrowane połączenie
484 pomiędzy dwoma hostami.
486 Ten pakiet zawiera ,,odpytywacz hasła'' dla GNOME.
488 %description gnome-askpass -l pt_BR.UTF-8
489 Esse pacote contém um programa que abre uma caixa de diálogo para
490 entrada de passphrase no GNOME.
492 %description gnome-askpass -l ru.UTF-8
493 Ssh (Secure Shell) - это программа для "захода" (login) на удаленную
494 машину и для выполнения команд на удаленной машине.
496 Этот пакет содержит диалог ввода ключевой фразы для использования под
499 %description gnome-askpass -l uk.UTF-8
500 Ssh (Secure Shell) - це програма для "заходу" (login) до віддаленої
501 машини та для виконання команд на віддаленій машині.
503 Цей пакет містить діалог вводу ключової фрази для використання під
506 %package -n openldap-schema-openssh-lpk
507 Summary: OpenSSH LDAP Public Key schema
508 Summary(pl.UTF-8): Schemat klucza publicznego LDAP dla OpenSSH
509 Group: Networking/Daemons
510 Requires(post,postun): sed >= 4.0
511 Requires: openldap-servers
512 %if "%{_rpmversion}" >= "5"
516 %description -n openldap-schema-openssh-lpk
517 This package contains OpenSSH LDAP Public Key schema for openldap.
519 %description -n openldap-schema-openssh-lpk -l pl.UTF-8
520 Ten pakiet zawiera schemat klucza publicznego LDAP dla OpenSSH dla
534 %{?with_hpn:%patch9 -p1}
540 %{!?with_ldap:%patch15 -p1}
542 %if "%{pld_release}" == "ac"
543 # fix for missing x11.pc
544 %{__sed} -i -e 's/\(`$(PKG_CONFIG) --libs gtk+-2.0\) x11`/\1` -lX11/' contrib/Makefile
547 # hack since arc4random from openbsd-compat needs symbols from libssh and vice versa
548 sed -i -e 's#-lssh -lopenbsd-compat#-lssh -lopenbsd-compat -lssh -lopenbsd-compat#g' Makefile*
550 grep -rl /usr/libexec/openssh/ssh-ldap-helper . | xargs \
551 %{__sed} -i -e 's,/usr/libexec/openssh/ssh-ldap-helper,%{_libexecdir}/ssh-ldap-helper,'
553 # prevent being ovewritten by aclocal calls
554 %{__mv} aclocal.m4 acinclude.m4
557 cp /usr/share/automake/config.sub .
561 CPPFLAGS="%{rpmcppflags} -DCHROOT -std=gnu99"
568 %{?with_audit:--with-audit=linux} \
569 --with-ipaddr-display \
570 %{?with_kerberos5:--with-kerberos5=/usr} \
571 --with-ldap%{!?with_ldap:=no} \
572 %{?with_ldns:--with-ldns} \
573 %{?with_libedit:--with-libedit} \
575 --with-md5-passwords \
577 --with-pid-dir=%{_localstatedir}/run \
578 --with-privsep-path=%{_privsepdir} \
579 --with-privsep-user=sshd \
580 %{?with_selinux:--with-selinux} \
581 %if "%{pld_release}" == "ac"
582 --with-xauth=/usr/X11R6/bin/xauth
584 --with-sandbox=seccomp_filter \
585 --with-xauth=%{_bindir}/xauth
588 echo '#define LOGIN_PROGRAM "/bin/login"' >>config.h
593 %{__make} -j1 tests \
594 TEST_SSH_PORT=$((4242 + ${RANDOM:-$$} % 1000)) \
600 %{__make} gnome-ssh-askpass1 \
601 CC="%{__cc} %{rpmldflags} %{rpmcflags}"
604 %{__make} gnome-ssh-askpass2 \
605 CC="%{__cc} %{rpmldflags} %{rpmcflags}"
609 rm -rf $RPM_BUILD_ROOT
610 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{pam.d,rc.d/init.d,sysconfig,security,env.d}} \
611 $RPM_BUILD_ROOT{%{_libexecdir}/ssh,%{schemadir},%{systemdunitdir}}
612 install -d $RPM_BUILD_ROOT/etc/{profile.d,X11/xinit/xinitrc.d}
615 DESTDIR=$RPM_BUILD_ROOT
617 bzip2 -dc %{SOURCE1} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
619 install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/sshd
620 cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/pam.d/sshd
621 cp -p %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/sshd
622 cp -p %{SOURCE5} $RPM_BUILD_ROOT/etc/profile.d
623 ln -sf /etc/profile.d/ssh-agent.sh $RPM_BUILD_ROOT/etc/X11/xinit/xinitrc.d/ssh-agent.sh
624 cp -p %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}
625 cp -p %{SOURCE7} $RPM_BUILD_ROOT%{schemadir}
627 cp -p %{SOURCE9} %{SOURCE11} %{SOURCE12} $RPM_BUILD_ROOT%{systemdunitdir}
628 install -p %{SOURCE10} $RPM_BUILD_ROOT%{_libexecdir}/sshd-keygen
630 %{__sed} -i -e 's|@@LIBEXECDIR@@|%{_libexecdir}|g' \
631 $RPM_BUILD_ROOT/etc/rc.d/init.d/sshd \
632 $RPM_BUILD_ROOT%{systemdunitdir}/sshd.service \
633 $RPM_BUILD_ROOT%{systemdunitdir}/sshd@.service \
634 $RPM_BUILD_ROOT%{_libexecdir}/sshd-keygen
637 install -p contrib/gnome-ssh-askpass1 $RPM_BUILD_ROOT%{_libexecdir}/ssh/ssh-askpass
640 install -p contrib/gnome-ssh-askpass2 $RPM_BUILD_ROOT%{_libexecdir}/ssh/ssh-askpass
642 %if %{with gnome} || %{with gtk}
643 cat << 'EOF' >$RPM_BUILD_ROOT/etc/env.d/GNOME_SSH_ASKPASS_GRAB_SERVER
644 #GNOME_SSH_ASKPASS_GRAB_SERVER="true"
646 cat << 'EOF' >$RPM_BUILD_ROOT/etc/env.d/GNOME_SSH_ASKPASS_GRAB_POINTER
647 #GNOME_SSH_ASKPASS_GRAB_POINTER="true"
649 ln -s %{_libexecdir}/ssh/ssh-askpass $RPM_BUILD_ROOT%{_libexecdir}/ssh-askpass
652 install -p contrib/ssh-copy-id $RPM_BUILD_ROOT%{_bindir}
653 cp -p contrib/ssh-copy-id.1 $RPM_BUILD_ROOT%{_mandir}/man1
655 touch $RPM_BUILD_ROOT/etc/security/blacklist.sshd
657 cat << 'EOF' > $RPM_BUILD_ROOT/etc/env.d/SSH_ASKPASS
658 #SSH_ASKPASS="%{_libexecdir}/ssh-askpass"
661 %if "%{pld_release}" == "ac"
662 # not present in ac, no point searching it
663 %{__sed} -i -e '/pam_keyinit.so/d' $RPM_BUILD_ROOT/etc/pam.d/sshd
664 # openssl on ac does not have OPENSSL_HAS_ECC
665 %{__sed} -i -e '/ecdsa/d' $RPM_BUILD_ROOT%{_libexecdir}/sshd-keygen
669 # remove recording user's login uid to the process attribute
670 %{__sed} -i -e '/pam_loginuid.so/d' $RPM_BUILD_ROOT/etc/pam.d/sshd
673 %{__rm} $RPM_BUILD_ROOT%{_mandir}/README.openssh-non-english-man-pages
674 %{?with_ldap:%{__rm} $RPM_BUILD_ROOT%{_sysconfdir}/ldap.conf}
677 rm -rf $RPM_BUILD_ROOT
688 %postun gnome-askpass
692 %useradd -P %{name}-server -u 40 -d %{_privsepdir} -s /bin/false -c "OpenSSH PrivSep User" -g nobody sshd
695 /sbin/chkconfig --add sshd
696 %service sshd reload "OpenSSH Daemon"
698 %systemd_post sshd.service
701 if [ "$1" = "0" ]; then
703 /sbin/chkconfig --del sshd
705 %systemd_preun sshd.service
708 if [ "$1" = "0" ]; then
713 %triggerpostun server -- %{name}-server < 2:7.0p1-2
714 %banner %{name}-server -e << EOF
715 !!!!!!!!!!!!!!!!!!!!!!! WARNING !!!!!!!!!!!!!!!!!!!
716 ! Starting from openssh 7.0 DSA keys are disabled !
717 ! on server and client side. You will NOT be able !
718 ! to use DSA keys for authentication. Please read !
719 ! about PubkeyAcceptedKeyTypes in man ssh_config. !
720 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
723 %triggerpostun server -- %{name}-server < 6.2p1-1
724 cp -f %{_sysconfdir}/sshd_config{,.rpmorig}
725 sed -i -e 's#AuthorizedKeysCommandRunAs#AuthorizedKeysCommandUser##g' %{_sysconfdir}/sshd_config
727 %triggerpostun server -- %{name}-server < 2:5.9p1-8
728 # lpk.patch to ldap.patch
729 if grep -qE '^(UseLPK|Lpk)' %{_sysconfdir}/sshd_config; then
730 echo >&2 "Migrating LPK patch to LDAP patch"
731 cp -f %{_sysconfdir}/sshd_config{,.rpmorig}
733 # disable old configs
734 # just UseLPK/LkpLdapConf supported for now
735 s/^\s*UseLPK/## Obsolete &/
736 s/^\s*Lpk/## Obsolete &/
737 # Enable new ones, assumes /etc/ldap.conf defaults, see HOWTO.ldap-keys
738 /UseLPK/iAuthorizedKeysCommand %{_libexecdir}/ssh-ldap-wrapper
739 ' %{_sysconfdir}/sshd_config
740 if [ ! -x /bin/systemd_booted ] || ! /bin/systemd_booted; then
741 /bin/systemctl try-restart sshd.service || :
743 %service -q sshd reload
746 %systemd_trigger sshd.service
747 if [ -x /bin/systemd_booted ] && /bin/systemd_booted; then
748 %banner %{name}-server -e << EOF
749 !!!!!!!!!!!!!!!!!!!!!!! WARNING !!!!!!!!!!!!!!!!!!!!!!!!!
750 ! Native systemd support for sshd has been installed. !
751 ! Restarting sshd.service with systemctl WILL kill all !
752 ! active ssh sessions (daemon as such will be started). !
753 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
757 %post -n openldap-schema-openssh-lpk
758 %openldap_schema_register %{schemadir}/openssh-lpk.schema
759 %service -q ldap restart
761 %postun -n openldap-schema-openssh-lpk
762 if [ "$1" = "0" ]; then
763 %openldap_schema_unregister %{schemadir}/openssh-lpk.schema
764 %service -q ldap restart
768 %defattr(644,root,root,755)
769 %doc TODO README OVERVIEW CREDITS Change*
770 %attr(755,root,root) %{_bindir}/ssh-key*
771 #%attr(755,root,root) %{_bindir}/ssh-vulnkey*
772 %{_mandir}/man1/ssh-key*.1*
773 #%{_mandir}/man1/ssh-vulnkey*.1*
778 %defattr(644,root,root,755)
779 %attr(755,root,root) %{_bindir}/ssh
780 %attr(755,root,root) %{_bindir}/sftp
781 %attr(755,root,root) %{_bindir}/ssh-agent
782 %attr(755,root,root) %{_bindir}/ssh-add
783 %attr(755,root,root) %{_bindir}/ssh-copy-id
784 %attr(755,root,root) %{_bindir}/scp
785 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ssh_config
786 %config(noreplace,missingok) %verify(not md5 mtime size) /etc/env.d/SSH_ASKPASS
787 %{_mandir}/man1/scp.1*
788 %{_mandir}/man1/ssh.1*
789 %{_mandir}/man1/sftp.1*
790 %{_mandir}/man1/ssh-agent.1*
791 %{_mandir}/man1/ssh-add.1*
792 %{_mandir}/man1/ssh-copy-id.1*
793 %{_mandir}/man5/ssh_config.5*
794 %lang(it) %{_mandir}/it/man1/ssh.1*
795 %lang(it) %{_mandir}/it/man5/ssh_config.5*
796 %lang(pl) %{_mandir}/pl/man1/scp.1*
797 %lang(zh_CN) %{_mandir}/zh_CN/man1/scp.1*
799 # for host-based auth (suid required for accessing private host key)
800 #%attr(4755,root,root) %{_libexecdir}/ssh-keysign
801 #%{_mandir}/man8/ssh-keysign.8*
803 %files clients-agent-profile_d
804 %defattr(644,root,root,755)
805 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ssh-agent.conf
806 %attr(755,root,root) /etc/profile.d/ssh-agent.sh
808 %files clients-agent-xinitrc
809 %defattr(644,root,root,755)
810 %attr(755,root,root) /etc/X11/xinit/xinitrc.d/ssh-agent.sh
813 %defattr(644,root,root,755)
814 %attr(755,root,root) %{_sbindir}/sshd
815 %attr(755,root,root) %{_libexecdir}/sftp-server
816 %attr(755,root,root) %{_libexecdir}/ssh-keysign
817 %attr(755,root,root) %{_libexecdir}/ssh-pkcs11-helper
818 %attr(755,root,root) %{_libexecdir}/sshd-keygen
819 %{_mandir}/man8/sshd.8*
820 %{_mandir}/man8/sftp-server.8*
821 %{_mandir}/man8/ssh-keysign.8*
822 %{_mandir}/man8/ssh-pkcs11-helper.8*
823 %{_mandir}/man5/sshd_config.5*
824 %{_mandir}/man5/moduli.5*
825 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sshd_config
826 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/sshd
827 %{_sysconfdir}/moduli
828 %attr(754,root,root) /etc/rc.d/init.d/sshd
829 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/sshd
830 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/blacklist.sshd
831 %{systemdunitdir}/sshd.service
832 %{systemdunitdir}/sshd.socket
833 %{systemdunitdir}/sshd@.service
837 %defattr(644,root,root,755)
838 %doc HOWTO.ldap-keys ldap.conf
839 %attr(755,root,root) %{_libexecdir}/ssh-ldap-helper
840 %attr(755,root,root) %{_libexecdir}/ssh-ldap-wrapper
841 %{_mandir}/man5/ssh-ldap.conf.5*
842 %{_mandir}/man8/ssh-ldap-helper.8*
845 %if %{with gnome} || %{with gtk}
847 %defattr(644,root,root,755)
848 %config(noreplace,missingok) %verify(not md5 mtime size) /etc/env.d/GNOME_SSH_ASKPASS*
849 %dir %{_libexecdir}/ssh
850 %attr(755,root,root) %{_libexecdir}/ssh/ssh-askpass
851 %attr(755,root,root) %{_libexecdir}/ssh-askpass
855 %files -n openldap-schema-openssh-lpk
856 %defattr(644,root,root,755)
857 %{schemadir}/openssh-lpk.schema