From 048795bff78e5e4541f7c1e6d02aaae3476ebcb8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Tue, 3 Apr 2018 10:25:27 +0200 Subject: [PATCH] - up to 7.7p1 --- openssh-ldap.patch | 2 +- openssh-ldns.patch | 12 ------- openssh-sigpipe.patch | 59 ++++++++++++++++++----------------- openssh-tests-reuseport.patch | 9 +++--- openssh.spec | 10 +++--- 5 files changed, 41 insertions(+), 51 deletions(-) delete mode 100644 openssh-ldns.patch diff --git a/openssh-ldap.patch b/openssh-ldap.patch index 741b5b5..3626558 100644 --- a/openssh-ldap.patch +++ b/openssh-ldap.patch @@ -1996,9 +1996,9 @@ diff -up openssh-6.2p1/ldapmisc.h.ldap openssh-6.2p1/ldapmisc.h PRIVSEP_PATH=@PRIVSEP_PATH@ SSH_PRIVSEP_USER=@SSH_PRIVSEP_USER@ @@ -61,8 +63,9 @@ - LDFLAGS=-L. -Lopenbsd-compat/ @LDFLAGS@ EXEEXT=@EXEEXT@ MANFMT=@MANFMT@ + MKDIR_P=@MKDIR_P@ +INSTALL_SSH_LDAP_HELPER=@INSTALL_SSH_LDAP_HELPER@ -TARGETS=ssh$(EXEEXT) sshd$(EXEEXT) ssh-add$(EXEEXT) ssh-keygen$(EXEEXT) ssh-keyscan${EXEEXT} ssh-keysign${EXEEXT} ssh-pkcs11-helper$(EXEEXT) ssh-agent$(EXEEXT) scp$(EXEEXT) sftp-server$(EXEEXT) sftp$(EXEEXT) diff --git a/openssh-ldns.patch b/openssh-ldns.patch deleted file mode 100644 index 367c5e8..0000000 --- a/openssh-ldns.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/configure.ac~ 2017-10-02 21:34:26.000000000 +0200 -+++ b/configure.ac 2017-10-06 08:35:16.756080761 +0200 -@@ -1487,7 +1487,7 @@ AC_ARG_WITH(ldns, - ldns="" - if test "x$withval" = "xyes" ; then - AC_PATH_TOOL([LDNSCONFIG], [ldns-config], [no]) -- if test "x$PKGCONFIG" = "xno"; then -+ if test "x$LDNSCONFIG" = "xno"; then - CPPFLAGS="$CPPFLAGS -I${withval}/include" - LDFLAGS="$LDFLAGS -L${withval}/lib" - LIBS="-lldns $LIBS" - diff --git a/openssh-sigpipe.patch b/openssh-sigpipe.patch index 742640c..3d60ddf 100644 --- a/openssh-sigpipe.patch +++ b/openssh-sigpipe.patch @@ -22,31 +22,31 @@ diff -urN openssh-3.9p1.org/ssh.0 openssh-3.9p1/ssh.0 --- openssh-3.9p1.org/ssh.0 2004-08-17 19:03:29.327565840 +0200 +++ openssh-3.9p1/ssh.0 2004-08-17 19:03:41.809668272 +0200 -@@ -235,6 +235,8 @@ - that enable them to authenticate using the identities loaded into - the agent. +@@ -433,6 +433,8 @@ DESCRIPTION + -y Send log information using the syslog(3) system module. By + default this information is sent to stderr. -+ -B Enable SIGPIPE processing. ++ -Z Enable SIGPIPE processing. + - -a Disables forwarding of the authentication agent connection. - - -b bind_address + ssh may additionally obtain configuration data from a per-user + configuration file and a system-wide configuration file. The file format + and configuration options are described in ssh_config(5). --- openssh-5.6p1/ssh.1~ 2010-08-24 14:05:48.000000000 +0300 +++ openssh-5.6p1/ssh.1 2010-08-24 14:06:57.879253682 +0300 -@@ -43,7 +43,7 @@ +@@ -42,7 +42,7 @@ + .Nd OpenSSH SSH client (remote login program) .Sh SYNOPSIS .Nm ssh - .Bk -words -.Op Fl 46AaCfGgKkMNnqsTtVvXxYy -+.Op Fl 46AaBCfGgKkMNnqsTtVvXxYy ++.Op Fl 46AaCfGgKkMNnqsTtVvXxYyZ + .Op Fl B Ar bind_interface .Op Fl b Ar bind_address .Op Fl c Ar cipher_spec - .Op Fl D Oo Ar bind_address : Oc Ns Ar port @@ -138,6 +138,11 @@ on the local machine as the source addre of the connection. Only useful on systems with more than one address. .Pp -+.It Fl B ++.It Fl Z +Enables processing of SIGPIPE. Useful when using ssh output as input for +another process, for example in a shell script. Be careful - it may break +port/X11 forwarding when used. @@ -66,31 +66,32 @@ diff -urN openssh-3.9p1.org/ssh.0 openssh-3.9p1/ssh.0 /* # of replies received for global requests */ static int client_global_request_id = 0; -@@ -200,7 +200,7 @@ static void +@@ -204,7 +204,7 @@ static void usage(void) { fprintf(stderr, --"usage: ssh [-46AaCfGgKkMNnqsTtVvXxYy] [-b bind_address] [-c cipher_spec]\n" -+"usage: ssh [-46AaBCfGgKkMNnqsTtVvXxYy] [-b bind_address] [-c cipher_spec]\n" - " [-D [bind_address:]port] [-E log_file] [-e escape_char]\n" - " [-F configfile] [-I pkcs11] [-i identity_file]\n" - " [-J [user@]host[:port]] [-L address] [-l login_name] [-m mac_spec]\n" -@@ -330,7 +330,7 @@ main(int ac, char **av) +-"usage: ssh [-46AaCfGgKkMNnqsTtVvXxYy] [-B bind_interface]\n" ++"usage: ssh [-46AaCfGgKkMNnqsTtVvXxYyZ] [-B bind_interface]\n" + " [-b bind_address] [-c cipher_spec] [-D [bind_address:]port]\n" + " [-E log_file] [-e escape_char] [-F configfile] [-I pkcs11]\n" + " [-i identity_file] [-J [user@]host[:port]] [-L address]\n" +@@ -666,7 +666,7 @@ main(int ac, char **av) again: while ((opt = getopt(ac, av, "1246ab:c:e:fgi:kl:m:no:p:qstvx" -- "ACD:E:F:GI:J:KL:MNO:PQ:R:S:TVw:W:XYy")) != -1) { -+ "ABCD:E:F:GI:J:KL:MNO:PQ:R:S:TVw:W:XYy")) != -1) { +- "AB:CD:E:F:GI:J:KL:MNO:PQ:R:S:TVw:W:XYy")) != -1) { ++ "AB:CD:E:F:GI:J:KL:MNO:PQ:R:S:TVw:W:XYyZ")) != -1) { switch (opt) { case '1': - options.protocol = SSH_PROTO_1; -@@ -291,6 +294,9 @@ - case 'A': - options.forward_agent = 1; + fatal("SSH protocol v.1 is no longer supported"); +@@ -985,6 +985,9 @@ main(int ac, char **av) + case 'F': + config = optarg; break; -+ case 'B': ++ case 'Z': + enable_sigpipe = 1; + break; - case 'k': - options.gss_deleg_creds = 0; - break; + default: + usage(); + } + diff --git a/openssh-tests-reuseport.patch b/openssh-tests-reuseport.patch index 4b9c856..6dfc2a7 100644 --- a/openssh-tests-reuseport.patch +++ b/openssh-tests-reuseport.patch @@ -1,11 +1,12 @@ --- openssh-6.9p1/regress/netcat.c.orig 2015-07-01 04:35:31.000000000 +0200 +++ openssh-6.9p1/regress/netcat.c 2015-07-03 17:23:33.544777525 +0200 -@@ -775,7 +775,7 @@ +@@ -738,7 +738,7 @@ local_listen(char *host, char *port, str #ifdef SO_REUSEPORT ret = setsockopt(s, SOL_SOCKET, SO_REUSEPORT, &x, sizeof(x)); if (ret == -1) -- err(1, "setsockopt"); +- err(1, "setsockopt SO_REUSEPORT"); + warn("setsockopt SO_REUSEPORT"); #endif - set_common_sockopts(s); - + #ifdef SO_REUSEADDR + ret = setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &x, sizeof(x)); + diff --git a/openssh.spec b/openssh.spec index c9964aa..50d75fb 100644 --- a/openssh.spec +++ b/openssh.spec @@ -46,13 +46,13 @@ Summary(pt_BR.UTF-8): Implementação livre do SSH Summary(ru.UTF-8): OpenSSH - свободная реализация протокола Secure Shell (SSH) Summary(uk.UTF-8): OpenSSH - вільна реалізація протоколу Secure Shell (SSH) Name: openssh -Version: 7.6p1 -Release: 4 +Version: 7.7p1 +Release: 1 Epoch: 2 License: BSD Group: Applications/Networking Source0: http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/%{name}-%{version}.tar.gz -# Source0-md5: 06a88699018e5fef13d4655abfed1f63 +# Source0-md5: 68ba883aff6958297432e5877e9a0fe2 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 @@ -65,7 +65,7 @@ Source9: sshd.service Source10: sshd-keygen Source11: sshd.socket Source12: sshd@.service -Patch0: %{name}-ldns.patch + Patch1: %{name}-tests-reuseport.patch Patch2: %{name}-pam_misc.patch Patch3: %{name}-sigpipe.patch @@ -532,7 +532,7 @@ openldap-a. %prep %setup -q -%patch0 -p1 + %patch1 -p1 %patch2 -p1 %patch3 -p1 -- 2.43.0