pastebin - collaborative debugging tool
rovema.kpaste.net RSS


Debian OpenSSH backport to Jessie
Posted by Anonymous on Fri 17th Feb 2023 15:10
raw | new post
view followups (newest first): Debian OpenSSH backport to Jessie by Anonymous
modification of post by Anonymous (view diff)

  1. # Debian OpenSSH backport to Debian/Jessie
  2. #
  3. # git clone https://salsa.debian.org/ssh-team/openssh.git
  4. # cd openssh/
  5. # patch -p1 <this_patch.patch
  6. # debuild -b -uc -us 2>&1 | tee buildlog.log
  7. #
  8. diff --git a/.gitattributes b/.gitattributes
  9. new file mode 100644
  10. index 0000000..204822d
  11. --- /dev/null
  12. +++ b/.gitattributes
  13. @@ -0,0 +1,6 @@
  14. +configure      -diff
  15. +aclocal.m4     -diff
  16. +config.guess   -diff
  17. +aclocal.m4     -diff
  18. +config.guess   -diff
  19. +config.sub     -diff
  20. diff --git a/config.h.in b/config.h.in
  21. index f80d542..abb987a 100644
  22. --- a/config.h.in
  23. +++ b/config.h.in
  24. @@ -984,6 +984,9 @@
  25.  /* Define to 1 if you have the `memmove' function. */
  26.  #undef HAVE_MEMMOVE
  27.  
  28. +/* Define to 1 if you have the <memory.h> header file. */
  29. +#undef HAVE_MEMORY_H
  30. +
  31.  /* Define to 1 if you have the `memset_s' function. */
  32.  #undef HAVE_MEMSET_S
  33.  
  34. @@ -1355,9 +1358,6 @@
  35.  /* Define to 1 if you have the <stdint.h> header file. */
  36.  #undef HAVE_STDINT_H
  37.  
  38. -/* Define to 1 if you have the <stdio.h> header file. */
  39. -#undef HAVE_STDIO_H
  40. -
  41.  /* Define to 1 if you have the <stdlib.h> header file. */
  42.  #undef HAVE_STDLIB_H
  43.  
  44. @@ -1478,6 +1478,9 @@
  45.  /* Define if you have syslen in utmpx.h */
  46.  #undef HAVE_SYSLEN_IN_UTMPX
  47.  
  48. +/* Define if you want systemd support. */
  49. +#undef HAVE_SYSTEMD
  50. +
  51.  /* Define to 1 if you have the <sys/audit.h> header file. */
  52.  #undef HAVE_SYS_AUDIT_H
  53.  
  54. @@ -1775,6 +1778,9 @@
  55.  /* Define if pututxline updates lastlog too */
  56.  #undef LASTLOG_WRITE_PUTUTXLINE
  57.  
  58. +/* Define if you want TCP Wrappers support */
  59. +#undef LIBWRAP
  60. +
  61.  /* Define to whatever link() returns for "not supported" if it doesn't return
  62.     EOPNOTSUPP. */
  63.  #undef LINK_OPNOTSUPP_ERRNO
  64. @@ -1979,9 +1985,7 @@
  65.  /* Prepend the address family to IP tunnel traffic */
  66.  #undef SSH_TUN_PREPEND_AF
  67.  
  68. -/* Define to 1 if all of the C90 standard headers exist (not just the ones
  69. -   required in a freestanding environment). This macro is provided for
  70. -   backward compatibility; new code need not use it. */
  71. +/* Define to 1 if you have the ANSI C header files. */
  72.  #undef STDC_HEADERS
  73.  
  74.  /* Define if you want a different $PATH for the superuser */
  75. @@ -2008,6 +2012,9 @@
  76.  /* Use btmp to log bad logins */
  77.  #undef USE_BTMP
  78.  
  79. +/* platform uses an in-memory credentials cache */
  80. +#undef USE_CCAPI
  81. +
  82.  /* Use libedit for sftp */
  83.  #undef USE_LIBEDIT
  84.  
  85. @@ -2023,6 +2030,9 @@
  86.  /* Use PIPES instead of a socketpair() */
  87.  #undef USE_PIPES
  88.  
  89. +/* platform has the Security Authorization Session API */
  90. +#undef USE_SECURITY_SESSION_API
  91. +
  92.  /* Define if you have Solaris privileges */
  93.  #undef USE_SOLARIS_PRIVS
  94.  
  95. @@ -2081,6 +2091,11 @@
  96.  /* Define if xauth is found in your path */
  97.  #undef XAUTH_PATH
  98.  
  99. +/* Enable large inode numbers on Mac OS X 10.5.  */
  100. +#ifndef _DARWIN_USE_64_BIT_INODE
  101. +# define _DARWIN_USE_64_BIT_INODE 1
  102. +#endif
  103. +
  104.  /* Number of bits in a file offset, on hosts where this is settable. */
  105.  #undef _FILE_OFFSET_BITS
  106.  
  107. diff --git a/contrib/gnome-ssh-askpass3.c b/contrib/gnome-ssh-askpass3.c
  108. index e1a0533..6a6d25c 100644
  109. --- a/contrib/gnome-ssh-askpass3.c
  110. +++ b/contrib/gnome-ssh-askpass3.c
  111. @@ -63,6 +63,22 @@
  112.  #include <gdk/gdkkeysyms.h>
  113.  
  114.  static void
  115. +report_failed_grab (GtkWidget *parent_window, const char *what)
  116. +{
  117. +       GtkWidget *err;
  118. +
  119. +       err = gtk_message_dialog_new(GTK_WINDOW(parent_window), 0,
  120. +           GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
  121. +           "Could not grab %s. A malicious client may be eavesdropping "
  122. +           "on your session.", what);
  123. +       gtk_window_set_position(GTK_WINDOW(err), GTK_WIN_POS_CENTER);
  124. +
  125. +       gtk_dialog_run(GTK_DIALOG(err));
  126. +
  127. +       gtk_widget_destroy(err);
  128. +}
  129. +
  130. +static void
  131.  ok_dialog(GtkWidget *entry, gpointer dialog)
  132.  {
  133.         g_return_if_fail(GTK_IS_DIALOG(dialog));
  134. @@ -137,12 +153,9 @@ passphrase_dialog(char *message, int prompt_type)
  135.         char *passphrase, *local;
  136.         int result, grab_tries, grab_server, grab_pointer;
  137.         int buttons, default_response;
  138. -       GtkWidget *parent_window, *dialog, *entry, *err;
  139. +       GtkWidget *parent_window, *dialog, *entry;
  140.         GdkGrabStatus status;
  141.         GdkColor fg, bg;
  142. -       GdkSeat *seat;
  143. -       GdkDisplay *display;
  144. -       GdkSeatCapabilities caps;
  145.         int fg_set = 0, bg_set = 0;
  146.  
  147.         grab_server = (getenv("GNOME_SSH_ASKPASS_GRAB_SERVER") != NULL);
  148. @@ -213,30 +226,48 @@ passphrase_dialog(char *message, int prompt_type)
  149.                             G_CALLBACK(check_none), dialog);
  150.                 }
  151.         }
  152. +
  153.         /* Grab focus */
  154.         gtk_widget_show_now(dialog);
  155. -       display = gtk_widget_get_display(GTK_WIDGET(dialog));
  156. -       seat = gdk_display_get_default_seat(display);
  157. -       caps = GDK_SEAT_CAPABILITY_KEYBOARD;
  158. -       if (grab_pointer)
  159. -               caps |= GDK_SEAT_CAPABILITY_ALL_POINTING;
  160. -       if (grab_server)
  161. -               caps = GDK_SEAT_CAPABILITY_ALL;
  162. -       for (;;) {
  163. -               status = gdk_seat_grab(seat, gtk_widget_get_window(dialog),
  164. -                   caps, TRUE, NULL, NULL, NULL, NULL);
  165. +       if (grab_pointer) {
  166. +               for(;;) {
  167. +                       status = gdk_pointer_grab(
  168. +                           (gtk_widget_get_window(GTK_WIDGET(dialog))), TRUE,
  169. +                           0, NULL, NULL, GDK_CURRENT_TIME);
  170. +                       if (status == GDK_GRAB_SUCCESS)
  171. +                               break;
  172. +                       usleep(GRAB_WAIT * 1000);
  173. +                       if (++grab_tries > GRAB_TRIES) {
  174. +                               failed = "mouse";
  175. +                               goto nograb;
  176. +                       }
  177. +               }
  178. +       }
  179. +       for(;;) {
  180. +               status = gdk_keyboard_grab(
  181. +                   gtk_widget_get_window(GTK_WIDGET(dialog)), FALSE,
  182. +                   GDK_CURRENT_TIME);
  183.                 if (status == GDK_GRAB_SUCCESS)
  184.                         break;
  185.                 usleep(GRAB_WAIT * 1000);
  186. -               if (++grab_tries > GRAB_TRIES)
  187. -                       goto nograb;
  188. +               if (++grab_tries > GRAB_TRIES) {
  189. +                       failed = "keyboard";
  190. +                       goto nograbkb;
  191. +               }
  192. +       }
  193. +       if (grab_server) {
  194. +               gdk_x11_grab_server();
  195.         }
  196.  
  197.         result = gtk_dialog_run(GTK_DIALOG(dialog));
  198.  
  199.         /* Ungrab */
  200. -       gdk_seat_ungrab(seat);
  201. -       gdk_display_flush(display);
  202. +       if (grab_server)
  203. +               XUngrabServer(gdk_x11_get_default_xdisplay());
  204. +       if (grab_pointer)
  205. +               gdk_pointer_ungrab(GDK_CURRENT_TIME);
  206. +       gdk_keyboard_ungrab(GDK_CURRENT_TIME);
  207. +       gdk_flush();
  208.  
  209.         /* Report passphrase if user selected OK */
  210.         if (prompt_type == PROMPT_ENTRY) {
  211. @@ -264,16 +295,21 @@ passphrase_dialog(char *message, int prompt_type)
  212.                 return -1;
  213.         return 0;
  214.  
  215. + nograbkb:
  216. +       /*
  217. +        * At least one grab failed - ungrab what we got, and report
  218. +        * the failure to the user.  Note that XGrabServer() cannot
  219. +        * fail.
  220. +        */
  221. +       gdk_pointer_ungrab(GDK_CURRENT_TIME);
  222.   nograb:
  223. +       if (grab_server)
  224. +               XUngrabServer(gdk_x11_get_default_xdisplay());
  225.         gtk_widget_destroy(dialog);
  226. -       err = gtk_message_dialog_new(GTK_WINDOW(parent_window), 0,
  227. -           GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
  228. -           "Could not grab input. A malicious client may be eavesdropping "
  229. -           "on your session.");
  230. -       gtk_window_set_position(GTK_WINDOW(err), GTK_WIN_POS_CENTER);
  231. -       gtk_dialog_run(GTK_DIALOG(err));
  232. -       gtk_widget_destroy(err);
  233. -       return -1;
  234. +
  235. +       report_failed_grab(parent_window, failed);
  236. +
  237. +       return (-1);
  238.  }
  239.  
  240.  int
  241. @@ -284,6 +320,8 @@ main(int argc, char **argv)
  242.  
  243.         gtk_init(&argc, &argv);
  244.  
  245. +       gtk_window_set_default_icon_from_file ("/usr/share/pixmaps/ssh-askpass-gnome.png", NULL);
  246. +
  247.         if (argc > 1) {
  248.                 message = g_strjoinv(" ", argv + 1);
  249.         } else {
  250. diff --git a/debian/compat b/debian/compat
  251. new file mode 100644
  252. index 0000000..f599e28
  253. --- /dev/null
  254. +++ b/debian/compat
  255. @@ -0,0 +1 @@
  256. +10
  257. diff --git a/debian/control b/debian/control
  258. index f3ed979..e34486f 100644
  259. --- a/debian/control
  260. +++ b/debian/control
  261. @@ -2,18 +2,15 @@ Source: openssh
  262.  Section: net
  263.  Priority: standard
  264.  Maintainer: Debian OpenSSH Maintainers <debian-ssh@lists.debian.org>
  265. -Build-Depends: debhelper (>= 13.1~),
  266. -               debhelper-compat (= 13),
  267. +Build-Depends: debhelper,
  268.                 dh-exec,
  269. -               dh-runit (>= 2.8.8),
  270.                 libaudit-dev [linux-any],
  271.                 libedit-dev,
  272. -               libfido2-dev (>= 1.5.0) [linux-any],
  273.                 libgtk-3-dev <!pkg.openssh.nognome>,
  274.                 libkrb5-dev | heimdal-dev,
  275.                 libpam0g-dev | libpam-dev,
  276.                 libselinux1-dev [linux-any],
  277. -               libssl-dev (>= 1.1.0g),
  278. +               libssl-dev ,
  279.                 libsystemd-dev [linux-any] | libelogind-dev [linux-any],
  280.                 libwrap0-dev | libwrap-dev,
  281.                 pkg-config,
  282. @@ -24,7 +21,6 @@ Uploaders: Colin Watson <cjwatson@debian.org>,
  283.  Homepage: https://www.openssh.com/
  284.  Vcs-Git: https://salsa.debian.org/ssh-team/openssh.git
  285.  Vcs-Browser: https://salsa.debian.org/ssh-team/openssh
  286. -Rules-Requires-Root: no
  287.  
  288.  Package: openssh-client
  289.  Architecture: any
  290. @@ -161,7 +157,6 @@ Architecture: any
  291.  Depends: openssh-client (= ${binary:Version}),
  292.           openssh-server (= ${binary:Version}),
  293.           openssh-sftp-server (= ${binary:Version}),
  294. -         openssl,
  295.           putty-tools (>= 0.67-2),
  296.           python3-twisted,
  297.           ${misc:Depends},
  298. diff --git a/debian/rules b/debian/rules
  299. index 18b2bf3..ba2a111 100755
  300. --- a/debian/rules
  301. +++ b/debian/rules
  302. @@ -73,12 +73,17 @@ confflags += --with-tcp-wrappers
  303.  confflags += --with-pam
  304.  confflags += --with-libedit
  305.  confflags += --with-kerberos5=/usr
  306. -confflags += --with-ssl-engine
  307. +# disabled because of --without-openssl# confflags += --with-ssl-engine
  308. +
  309. +# rovema: Fix OpenSSL version hell Debian/Jessie vs. Debian/Jessie-backports
  310. +# this limits the available crypto opens!
  311. +confflags += --without-openssl
  312. +
  313.  ifeq ($(DEB_HOST_ARCH_OS),linux)
  314.  confflags += --with-selinux
  315.  confflags += --with-audit=linux
  316.  confflags += --with-systemd
  317. -confflags += --with-security-key-builtin
  318. +#confflags += --with-security-key-builtin
  319.  endif
  320.  
  321.  # The deb build wants xauth; the udeb build doesn't.
  322. @@ -98,15 +103,15 @@ confflags += --with-cflags='$(cflags)'
  323.  confflags_udeb += --with-cflags='$(cflags_udeb)'
  324.  
  325.  # Linker flags.
  326. -confflags += --with-ldflags='$(strip -Wl,--as-needed $(LDFLAGS))'
  327. -confflags_udeb += --with-ldflags='-Wl,--as-needed'
  328. +#confflags += --with-ldflags='$(strip -Wl,--as-needed $(LDFLAGS))'
  329. +#confflags_udeb += --with-ldflags='-Wl,--as-needed'
  330.  
  331.  ifeq ($(shell dpkg-vendor --is Ubuntu && echo yes) $(DEB_HOST_ARCH), yes i386)
  332.    BUILD_PACKAGES += -Nopenssh-tests
  333.  endif
  334.  
  335.  %:
  336. -       dh $@ --with=runit $(BUILD_PACKAGES)
  337. +       dh $@ $(BUILD_PACKAGES)
  338.  
  339.  override_dh_autoreconf-indep:
  340.  
  341. diff --git a/kex.c b/kex.c
  342. index e7b7316..6256584 100644
  343. --- a/kex.c
  344. +++ b/kex.c
  345. @@ -102,8 +102,10 @@ static const struct kexalg kexalgs[] = {
  346.         { KEX_DHGEX_SHA256, KEX_DH_GEX_SHA256, 0, SSH_DIGEST_SHA256 },
  347.  #endif /* HAVE_EVP_SHA256 */
  348.  #ifdef OPENSSL_HAS_ECC
  349. +#if 0
  350.         { KEX_ECDH_SHA2_NISTP256, KEX_ECDH_SHA2,
  351.             NID_X9_62_prime256v1, SSH_DIGEST_SHA256 },
  352. +#endif
  353.         { KEX_ECDH_SHA2_NISTP384, KEX_ECDH_SHA2, NID_secp384r1,
  354.             SSH_DIGEST_SHA384 },
  355.  # ifdef OPENSSL_HAS_NISTP521
  356. @@ -129,8 +131,10 @@ static const struct kexalg gss_kexalgs[] = {
  357.         { KEX_GSS_GRP14_SHA1_ID, KEX_GSS_GRP14_SHA1, 0, SSH_DIGEST_SHA1 },
  358.         { KEX_GSS_GRP14_SHA256_ID, KEX_GSS_GRP14_SHA256, 0, SSH_DIGEST_SHA256 },
  359.         { KEX_GSS_GRP16_SHA512_ID, KEX_GSS_GRP16_SHA512, 0, SSH_DIGEST_SHA512 },
  360. +#if 0
  361.         { KEX_GSS_NISTP256_SHA256_ID, KEX_GSS_NISTP256_SHA256,
  362.             NID_X9_62_prime256v1, SSH_DIGEST_SHA256 },
  363. +#endif
  364.         { KEX_GSS_C25519_SHA256_ID, KEX_GSS_C25519_SHA256, 0, SSH_DIGEST_SHA256 },
  365.  #endif
  366.         { NULL, 0, -1, -1},

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with {%HIGHLIGHT}




All content is user-submitted.
The administrators of this site (kpaste.net) are not responsible for their content.
Abuse reports should be emailed to us at