]> TLD Linux GIT Repositories - packages/openssh.git/commitdiff
- merged 10.5p1 from PLD master
authorMarcin Krol <hawk@tld-linux.org>
Sun, 13 Sep 2026 10:11:26 +0000 (12:11 +0200)
committerMarcin Krol <hawk@tld-linux.org>
Sun, 13 Sep 2026 10:11:26 +0000 (12:11 +0200)
openssh-chroot.patch
openssh-sigpipe.patch [deleted file]
openssh.spec

index e2c01a0d0bf7ac171124c88b44070739ddd102a8..e94e0dc551ac9cc387d2fdfa6f8e1d29a14cfe7f 100644 (file)
@@ -1,71 +1,45 @@
-diff -ruNp openssh-9.8p1.orig/servconf.c openssh-9.8p1/servconf.c
---- openssh-9.8p1.orig/servconf.c      2024-07-01 06:36:28.000000000 +0200
-+++ openssh-9.8p1/servconf.c   2024-07-01 11:17:17.929993456 +0200
-@@ -94,6 +94,8 @@ initialize_server_options(ServerOptions
-       options->use_pam = -1;
-       options->pam_service_name = NULL;
- 
-+      options->use_chroot = -1;
-+
-       /* Standard Options */
-       options->num_ports = 0;
-       options->ports_from_cmdline = 0;
-@@ -299,6 +301,9 @@ fill_default_server_options(ServerOption
-       if (options->pam_service_name == NULL)
-               options->pam_service_name = xstrdup(SSHD_PAM_SERVICE);
- 
-+      if (options->use_chroot == -1)
-+              options->use_chroot = 0;
-+
-       /* Standard Options */
-       if (options->num_host_key_files == 0) {
-               /* fill default hostkeys for protocols */
-@@ -538,6 +543,7 @@ typedef enum {
-       sBadOption,             /* == unknown option */
-       /* Portable-specific options */
-       sUsePAM, sPAMServiceName,
-+      sUseChroot,
-       /* Standard Options */
-       sPort, sHostKeyFile, sLoginGraceTime,
-       sPermitRootLogin, sLogFacility, sLogLevel, sLogVerbose,
-@@ -595,6 +601,11 @@ static struct {
-       { "usepam", sUnsupported, SSHCFG_GLOBAL },
-       { "pamservicename", sUnsupported, SSHCFG_ALL },
- #endif
-+#ifdef CHROOT
-+      { "usechroot", sUseChroot, SSHCFG_GLOBAL },
-+#else
-+      { "usechroot", sUnsupported, SSHCFG_GLOBAL },
-+#endif /* CHROOT */
-       { "pamauthenticationviakbdint", sDeprecated, SSHCFG_GLOBAL },
-       /* Standard Options */
-       { "port", sPort, SSHCFG_GLOBAL },
-@@ -1338,6 +1349,10 @@ process_server_config_line_depth(ServerO
+--- openssh-10.4p1.orig/servconf.c     2026-07-06 09:57:12.000000000 +0200
++++ openssh-10.4p1/servconf.c  2026-07-06 21:23:34.091821111 +0200
+@@ -1185,6 +1185,11 @@ process_server_config_line_depth(ServerO
                        *charptr = xstrdup(arg);
                break;
                        *charptr = xstrdup(arg);
                break;
- 
+ #endif
++#ifdef CHROOT
 +      case sUseChroot:
 +              intptr = &options->use_chroot;
 +              goto parse_flag;
 +      case sUseChroot:
 +              intptr = &options->use_chroot;
 +              goto parse_flag;
-+
++#endif
+ 
        /* Standard Options */
        case sBadOption:
        /* Standard Options */
        case sBadOption:
-               goto out;
-diff -urNp -x '*.orig' openssh-8.8p1.org/servconf.h openssh-8.8p1/servconf.h
---- openssh-8.8p1.org/servconf.h       2021-09-26 16:03:19.000000000 +0200
-+++ openssh-8.8p1/servconf.h   2021-12-09 20:13:16.486586503 +0100
-@@ -183,6 +183,7 @@ typedef struct {
-       int     max_authtries;
-       int     max_sessions;
-       char   *banner;                 /* SSH-2 banner message */
-+      int     use_chroot;             /* Enable chrooted enviroment support */
-       int     use_dns;
-       int     client_alive_interval;  /*
-                                        * poke the client this often to
-diff -urNp -x '*.orig' openssh-8.8p1.org/session.c openssh-8.8p1/session.c
---- openssh-8.8p1.org/session.c        2021-09-26 16:03:19.000000000 +0200
-+++ openssh-8.8p1/session.c    2021-12-09 20:13:16.489919836 +0100
-@@ -1359,6 +1359,10 @@ void
+--- openssh-10.4p1.orig/servconf.h     2026-07-06 09:57:12.000000000 +0200
++++ openssh-10.4p1/servconf.h  2026-07-06 21:23:28.301821115 +0200
+@@ -268,6 +268,7 @@ SSHCONF_ALIAS(KeepAlive, TCPKeepAlive, S
+       SSHD_CONFIG_ENTRIES_LEGACY \
+       SSHD_CONFIG_ENTRIES_ALIASES \
+       SSHD_CONFIG_ENTRIES_PAM \
++      SSHD_CONFIG_ENTRIES_CHROOT \
+       SSHD_CONFIG_ENTRIES_LASTLOG
+ 
+ #ifdef USE_PAM
+@@ -280,6 +281,14 @@ SSHCONF_UNSUPPORTED_INT(use_pam, UsePAM,
+ SSHCONF_UNSUPPORTED_STRING(pam_service_name, PAMServiceName, SSHCFG_ALL)
+ #endif
+ 
++#ifdef CHROOT
++#define SSHD_CONFIG_ENTRIES_CHROOT \
++SSHCONF_INTFLAG(use_chroot, UseChroot, SSHCFG_GLOBAL, 0, SSHCFG_COPY_NONE)
++#else
++#define SSHD_CONFIG_ENTRIES_CHROOT \
++SSHCONF_UNSUPPORTED_INT(use_chroot, UseChroot, SSHCFG_GLOBAL)
++#endif
++
+ #ifdef DISABLE_LASTLOG
+ #define SSHD_CONFIG_ENTRIES_LASTLOG \
+ SSHCONF_UNSUPPORTED_INT(print_lastlog, PrintLastLog, SSHCFG_GLOBAL)
+--- openssh-10.4p1.orig/session.c      2026-07-06 09:57:12.000000000 +0200
++++ openssh-10.4p1/session.c   2026-07-06 21:22:56.644136453 +0200
+@@ -1316,6 +1316,10 @@ void
  do_setusercontext(struct passwd *pw)
  {
        char uidstr[32], *chroot_path, *tmp;
  do_setusercontext(struct passwd *pw)
  {
        char uidstr[32], *chroot_path, *tmp;
@@ -76,7 +50,7 @@ diff -urNp -x '*.orig' openssh-8.8p1.org/session.c openssh-8.8p1/session.c
  
        platform_setusercontext(pw);
  
  
        platform_setusercontext(pw);
  
-@@ -1401,6 +1405,29 @@ do_setusercontext(struct passwd *pw)
+@@ -1358,6 +1362,29 @@ do_setusercontext(struct passwd *pw)
                        free(options.chroot_directory);
                        options.chroot_directory = NULL;
                        in_chroot = 1;
                        free(options.chroot_directory);
                        options.chroot_directory = NULL;
                        in_chroot = 1;
@@ -106,10 +80,9 @@ diff -urNp -x '*.orig' openssh-8.8p1.org/session.c openssh-8.8p1/session.c
                }
  
  #ifdef HAVE_LOGIN_CAP
                }
  
  #ifdef HAVE_LOGIN_CAP
-diff -urNp -x '*.orig' openssh-8.8p1.org/sshd_config openssh-8.8p1/sshd_config
---- openssh-8.8p1.org/sshd_config      2021-12-09 20:13:16.326586503 +0100
-+++ openssh-8.8p1/sshd_config  2021-12-09 20:13:16.489919836 +0100
-@@ -85,6 +85,10 @@ GSSAPIAuthentication yes
+--- openssh-10.4p1.orig/sshd_config    2026-07-06 09:57:12.000000000 +0200
++++ openssh-10.4p1/sshd_config 2026-07-06 21:22:56.644685847 +0200
+@@ -83,6 +83,10 @@ AuthorizedKeysFile  .ssh/authorized_keys
  # and KbdInteractiveAuthentication to 'no'.
  #UsePAM no
  
  # and KbdInteractiveAuthentication to 'no'.
  #UsePAM no
  
@@ -120,10 +93,9 @@ diff -urNp -x '*.orig' openssh-8.8p1.org/sshd_config openssh-8.8p1/sshd_config
  #AllowAgentForwarding yes
  #AllowTcpForwarding yes
  #GatewayPorts no
  #AllowAgentForwarding yes
  #AllowTcpForwarding yes
  #GatewayPorts no
-diff -urNp -x '*.orig' openssh-8.8p1.org/sshd_config.0 openssh-8.8p1/sshd_config.0
---- openssh-8.8p1.org/sshd_config.0    2021-09-26 16:06:42.000000000 +0200
-+++ openssh-8.8p1/sshd_config.0        2021-12-09 20:13:16.489919836 +0100
-@@ -1053,6 +1053,16 @@ DESCRIPTION
+--- openssh-10.4p1.orig/sshd_config.0  2026-07-06 09:57:12.000000000 +0200
++++ openssh-10.4p1/sshd_config.0       2026-07-06 21:22:56.645435161 +0200
+@@ -1309,6 +1309,16 @@ DESCRIPTION
               open channels.  This option may be useful in conjunction with
               ChannelTimeout.
  
               open channels.  This option may be useful in conjunction with
               ChannelTimeout.
  
@@ -140,10 +112,9 @@ diff -urNp -x '*.orig' openssh-8.8p1.org/sshd_config.0 openssh-8.8p1/sshd_config
       UseDNS  Specifies whether sshd(8) should look up the remote host name,
               and to check that the resolved host name for the remote IP
               address maps back to the very same IP address.
       UseDNS  Specifies whether sshd(8) should look up the remote host name,
               and to check that the resolved host name for the remote IP
               address maps back to the very same IP address.
-diff -urNp -x '*.orig' openssh-8.8p1.org/sshd_config.5 openssh-8.8p1/sshd_config.5
---- openssh-8.8p1.org/sshd_config.5    2021-09-26 16:03:19.000000000 +0200
-+++ openssh-8.8p1/sshd_config.5        2021-12-09 20:13:16.489919836 +0100
-@@ -1697,6 +1697,16 @@ Gives the facility code that is used whe
+--- openssh-10.4p1.orig/sshd_config.5  2026-07-06 09:57:12.000000000 +0200
++++ openssh-10.4p1/sshd_config.5       2026-07-06 21:22:56.646363281 +0200
+@@ -1982,6 +1982,16 @@ Gives the facility code that is used whe
  The possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2,
  LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7.
  The default is AUTH.
  The possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2,
  LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7.
  The default is AUTH.
diff --git a/openssh-sigpipe.patch b/openssh-sigpipe.patch
deleted file mode 100644 (file)
index 8991ecc..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-diff -urNp -x '*.orig' openssh-8.4p1.org/clientloop.c openssh-8.4p1/clientloop.c
---- openssh-8.4p1.org/clientloop.c     2020-09-27 09:25:01.000000000 +0200
-+++ openssh-8.4p1/clientloop.c 2021-03-01 11:29:10.909905265 +0100
-@@ -127,6 +127,9 @@ extern int fork_after_authentication_fla
- /* Control socket */
- extern int muxserver_sock; /* XXX use mux_client_cleanup() instead */
- 
-+/* if we process SIGPIPE */
-+extern int enable_sigpipe;
-+
- /*
-  * Name of the host we are connecting to.  This is the name given on the
-  * command line, or the Hostname specified for the user-supplied name in a
-@@ -1518,6 +1518,8 @@ client_loop(struct ssh *ssh, int have_pt
-               ssh_signal(SIGQUIT, signal_handler);
-       if (ssh_signal(SIGTERM, SIG_IGN) != SIG_IGN)
-               ssh_signal(SIGTERM, signal_handler);
-+      if (enable_sigpipe)
-+              ssh_signal(SIGPIPE, signal_handler);
-       ssh_signal(SIGWINCH, window_change_handler);
- #ifdef SIGINFO
-       ssh_signal(SIGINFO, siginfo_handler);
-diff -urNp -x '*.orig' openssh-8.4p1.org/ssh.0 openssh-8.4p1/ssh.0
---- openssh-8.4p1.org/ssh.0    2020-09-27 09:42:10.000000000 +0200
-+++ openssh-8.4p1/ssh.0        2021-03-01 11:29:10.909905265 +0100
-@@ -446,6 +446,8 @@ DESCRIPTION
-      -y      Send log information using the syslog(3) system module.  By
-              default this information is sent to stderr.
- 
-+     -Z      Enable SIGPIPE processing.
-+
-      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).
-diff -urNp -x '*.orig' openssh-8.4p1.org/ssh.1 openssh-8.4p1/ssh.1
---- openssh-8.4p1.org/ssh.1    2020-09-27 09:25:01.000000000 +0200
-+++ openssh-8.4p1/ssh.1        2021-03-01 11:29:10.909905265 +0100
-@@ -42,7 +42,7 @@
- .Nd OpenSSH remote login client
- .Sh SYNOPSIS
- .Nm ssh
--.Op Fl 46AaCfGgKkMNnqsTtVvXxYy
-+.Op Fl 46AaCfGgKkMNnqsTtVvXxYyZ
- .Op Fl B Ar bind_interface
- .Op Fl b Ar bind_address
- .Op Fl c Ar cipher_spec
-@@ -142,6 +142,11 @@ on the local machine as the source addre
- of the connection.
- Only useful on systems with more than one address.
- .Pp
-+.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.
-+.Pp
- .It Fl C
- Requests compression of all data (including stdin, stdout, stderr, and
- data for forwarded X11, TCP and
-diff -urNp -x '*.orig' openssh-8.4p1.org/ssh.c openssh-8.4p1/ssh.c
---- openssh-8.4p1.org/ssh.c    2020-09-27 09:25:01.000000000 +0200
-+++ openssh-8.4p1/ssh.c        2021-03-01 11:29:10.909905265 +0100
-@@ -190,6 +190,9 @@ struct sshbuf *command;
- /* command to be executed */
- struct sshbuf *command;
- 
-+/* Enable sigpipe */
-+int enable_sigpipe = 0;
-+
- /* # of replies received for global requests */
- static int forward_confirms_pending = -1;
- 
-@@ -203,7 +206,7 @@ static void
- usage(void)
- {
-       fprintf(stderr,
--"usage: ssh [-46AaCfGgKkMNnqsTtVvXxYy] [-B bind_interface] [-b bind_address]\n"
-+"usage: ssh [-46AaCfGgKkMNnqsTtVvXxYyZ] [-B bind_interface] [-b bind_address]\n"
- "           [-c cipher_spec] [-D [bind_address:]port] [-E log_file]\n"
- "           [-e escape_char] [-F configfile] [-I pkcs11] [-i identity_file]\n"
- "           [-J destination] [-L address] [-l login_name] [-m mac_spec]\n"
-@@ -699,7 +699,7 @@ main(int ac, char **av)
- 
-  again:
-       while ((opt = getopt(ac, av, "1246ab:c:e:fgi:kl:m:no:p:qstvx"
--          "AB:CD:E:F:GI:J:KL:MNO:P:Q:R:S:TVw:W:XYy")) != -1) { /* HUZdhjruz */
-+          "AB:CD:E:F:GI:J:KL:MNO:P:Q:R:S:TVw:W:XYyZ")) != -1) { /* HUZdhjruz */
-               switch (opt) {
-               case '1':
-                       fatal("SSH protocol v.1 is no longer supported");
-@@ -1066,6 +1069,9 @@ main(int ac, char **av)
-               case 'F':
-                       config = optarg;
-                       break;
-+              case 'Z':
-+                      enable_sigpipe = 1;
-+                      break;
-               default:
-                       usage();
-               }
index cfbb9a0c1a5b42833363db4d1f7d19a31e62822e..64fbb035ac0532ca58c5d238611a55d22cfea7cb 100644 (file)
@@ -32,13 +32,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
 Summary(ru.UTF-8):     OpenSSH - свободная реализация протокола Secure Shell (SSH)
 Summary(uk.UTF-8):     OpenSSH - вільна реалізація протоколу Secure Shell (SSH)
 Name:          openssh
-Version:       10.3p1
+Version:       10.5p1
 Release:       2
 Epoch:         2
 License:       BSD
 Group:         Applications/Networking
 Source0:       https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/%{name}-%{version}.tar.gz
 Release:       2
 Epoch:         2
 License:       BSD
 Group:         Applications/Networking
 Source0:       https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/%{name}-%{version}.tar.gz
-# Source0-md5: 0b5662e0aa255c8d20f18dcca1bda65c
+# Source0-md5: a95119f402dfa0166c9dd1237239085c
 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
 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
@@ -53,7 +53,6 @@ Source14:       tld_sshd_config
 Patch0:                %{name}-no-pty-tests.patch
 Patch1:                %{name}-tests-reuseport.patch
 Patch2:                %{name}-pam_misc.patch
 Patch0:                %{name}-no-pty-tests.patch
 Patch1:                %{name}-tests-reuseport.patch
 Patch2:                %{name}-pam_misc.patch
-Patch3:                %{name}-sigpipe.patch
 # http://pkgs.fedoraproject.org/gitweb/?p=openssh.git;a=tree
 Patch4:                %{name}-ldap.patch
 Patch5:                %{name}-ldap-fixes.patch
 # http://pkgs.fedoraproject.org/gitweb/?p=openssh.git;a=tree
 Patch4:                %{name}-ldap.patch
 Patch5:                %{name}-ldap-fixes.patch
@@ -63,7 +62,6 @@ Patch8:               ldap-helper-sigpipe.patch
 # High Performance SSH/SCP - HPN-SSH - http://www.psc.edu/networking/projects/hpn-ssh/
 # http://www.psc.edu/networking/projects/hpn-ssh/openssh-5.2p1-hpn13v6.diff.gz
 Patch9:                %{name}-5.2p1-hpn13v6.diff
 # High Performance SSH/SCP - HPN-SSH - http://www.psc.edu/networking/projects/hpn-ssh/
 # http://www.psc.edu/networking/projects/hpn-ssh/openssh-5.2p1-hpn13v6.diff.gz
 Patch9:                %{name}-5.2p1-hpn13v6.diff
-
 Patch11:       %{name}-chroot.patch
 
 Patch13:       %{name}-skip-interop-tests.patch
 Patch11:       %{name}-chroot.patch
 
 Patch13:       %{name}-skip-interop-tests.patch
@@ -530,7 +528,6 @@ openldap-a.
 %patch -P0 -p1
 %patch -P1 -p1
 %patch -P2 -p1
 %patch -P0 -p1
 %patch -P1 -p1
 %patch -P2 -p1
-%patch -P3 -p1
 %patch -P4 -p1
 %patch -P5 -p1
 %patch -P6 -p1
 %patch -P4 -p1
 %patch -P5 -p1
 %patch -P6 -p1