diff options
Diffstat (limited to 'debian/patches')
-rw-r--r-- | debian/patches/backport-fix-first-kex-follows.patch | 2 | ||||
-rw-r--r-- | debian/patches/debian-config.patch | 2 | ||||
-rw-r--r-- | debian/patches/series | 1 | ||||
-rw-r--r-- | debian/patches/systemd-readiness.patch | 84 |
4 files changed, 87 insertions, 2 deletions
diff --git a/debian/patches/backport-fix-first-kex-follows.patch b/debian/patches/backport-fix-first-kex-follows.patch index 0333adad1..07c86b948 100644 --- a/debian/patches/backport-fix-first-kex-follows.patch +++ b/debian/patches/backport-fix-first-kex-follows.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From ed5dcc5819cd53636938bd5c30b8c5acdd1615e1 Mon Sep 17 00:00:00 2001 | 1 | From 480b475c69faf9cfa748cc445e36201bc7a81b80 Mon Sep 17 00:00:00 2001 |
2 | From: Damien Miller <djm@mindrot.org> | 2 | From: Damien Miller <djm@mindrot.org> |
3 | Date: Tue, 15 Dec 2015 15:25:04 +0000 | 3 | Date: Tue, 15 Dec 2015 15:25:04 +0000 |
4 | Subject: upstream commit | 4 | Subject: upstream commit |
diff --git a/debian/patches/debian-config.patch b/debian/patches/debian-config.patch index cfa6ef6b7..6bd50eaad 100644 --- a/debian/patches/debian-config.patch +++ b/debian/patches/debian-config.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 9351b179c72f18dc1b1d5bb84b2a7dab5e0af3fc Mon Sep 17 00:00:00 2001 | 1 | From a466a627b806905df9c7583af7edcf39e9481201 Mon Sep 17 00:00:00 2001 |
2 | From: Colin Watson <cjwatson@debian.org> | 2 | From: Colin Watson <cjwatson@debian.org> |
3 | Date: Sun, 9 Feb 2014 16:10:18 +0000 | 3 | Date: Sun, 9 Feb 2014 16:10:18 +0000 |
4 | Subject: Various Debian-specific configuration changes | 4 | Subject: Various Debian-specific configuration changes |
diff --git a/debian/patches/series b/debian/patches/series index 340077745..f7eb1cc8b 100644 --- a/debian/patches/series +++ b/debian/patches/series | |||
@@ -24,5 +24,6 @@ ssh-agent-setgid.patch | |||
24 | no-openssl-version-status.patch | 24 | no-openssl-version-status.patch |
25 | gnome-ssh-askpass2-icon.patch | 25 | gnome-ssh-askpass2-icon.patch |
26 | sigstop.patch | 26 | sigstop.patch |
27 | systemd-readiness.patch | ||
27 | debian-config.patch | 28 | debian-config.patch |
28 | backport-fix-first-kex-follows.patch | 29 | backport-fix-first-kex-follows.patch |
diff --git a/debian/patches/systemd-readiness.patch b/debian/patches/systemd-readiness.patch new file mode 100644 index 000000000..bbe3b2cd5 --- /dev/null +++ b/debian/patches/systemd-readiness.patch | |||
@@ -0,0 +1,84 @@ | |||
1 | From 818791ef8edf087481bd49eb32335c8d7e1953d6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Michael Biebl <biebl@debian.org> | ||
3 | Date: Mon, 21 Dec 2015 16:08:47 +0000 | ||
4 | Subject: Add systemd readiness notification support | ||
5 | |||
6 | Bug-Debian: https://bugs.debian.org/778913 | ||
7 | Forwarded: no | ||
8 | Last-Update: 2015-12-21 | ||
9 | |||
10 | Patch-Name: systemd-readiness.patch | ||
11 | --- | ||
12 | configure.ac | 24 ++++++++++++++++++++++++ | ||
13 | sshd.c | 9 +++++++++ | ||
14 | 2 files changed, 33 insertions(+) | ||
15 | |||
16 | diff --git a/configure.ac b/configure.ac | ||
17 | index 128889a..eec2b72 100644 | ||
18 | --- a/configure.ac | ||
19 | +++ b/configure.ac | ||
20 | @@ -4213,6 +4213,29 @@ AC_ARG_WITH([kerberos5], | ||
21 | AC_SUBST([GSSLIBS]) | ||
22 | AC_SUBST([K5LIBS]) | ||
23 | |||
24 | +# Check whether user wants systemd support | ||
25 | +SYSTEMD_MSG="no" | ||
26 | +AC_ARG_WITH(systemd, | ||
27 | + [ --with-systemd Enable systemd support], | ||
28 | + [ if test "x$withval" != "xno" ; then | ||
29 | + AC_PATH_TOOL([PKGCONFIG], [pkg-config], [no]) | ||
30 | + if test "$PKGCONFIG" != "no"; then | ||
31 | + AC_MSG_CHECKING([for libsystemd]) | ||
32 | + if $PKGCONFIG --exists libsystemd; then | ||
33 | + SYSTEMD_CFLAGS=`$PKGCONFIG --cflags libsystemd` | ||
34 | + SYSTEMD_LIBS=`$PKGCONFIG --libs libsystemd` | ||
35 | + CPPFLAGS="$CPPFLAGS $SYSTEMD_CFLAGS" | ||
36 | + SSHDLIBS="$SSHDLIBS $SYSTEMD_LIBS" | ||
37 | + AC_MSG_RESULT([yes]) | ||
38 | + AC_DEFINE(HAVE_SYSTEMD, 1, [Define if you want systemd support.]) | ||
39 | + SYSTEMD_MSG="yes" | ||
40 | + else | ||
41 | + AC_MSG_RESULT([no]) | ||
42 | + fi | ||
43 | + fi | ||
44 | + fi ] | ||
45 | +) | ||
46 | + | ||
47 | # Looking for programs, paths and files | ||
48 | |||
49 | PRIVSEP_PATH=/var/empty | ||
50 | @@ -5014,6 +5037,7 @@ echo " MD5 password support: $MD5_MSG" | ||
51 | echo " libedit support: $LIBEDIT_MSG" | ||
52 | echo " Solaris process contract support: $SPC_MSG" | ||
53 | echo " Solaris project support: $SP_MSG" | ||
54 | +echo " systemd support: $SYSTEMD_MSG" | ||
55 | echo " IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG" | ||
56 | echo " Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG" | ||
57 | echo " BSD Auth support: $BSD_AUTH_MSG" | ||
58 | diff --git a/sshd.c b/sshd.c | ||
59 | index 7e72b9b..4d28dc0 100644 | ||
60 | --- a/sshd.c | ||
61 | +++ b/sshd.c | ||
62 | @@ -85,6 +85,10 @@ | ||
63 | #include <prot.h> | ||
64 | #endif | ||
65 | |||
66 | +#ifdef HAVE_SYSTEMD | ||
67 | +#include <systemd/sd-daemon.h> | ||
68 | +#endif | ||
69 | + | ||
70 | #include "xmalloc.h" | ||
71 | #include "ssh.h" | ||
72 | #include "ssh1.h" | ||
73 | @@ -2011,6 +2015,11 @@ main(int ac, char **av) | ||
74 | /* ignore SIGPIPE */ | ||
75 | signal(SIGPIPE, SIG_IGN); | ||
76 | |||
77 | +#ifdef HAVE_SYSTEMD | ||
78 | + /* Signal systemd that we are ready to accept connections */ | ||
79 | + sd_notify(0, "READY=1"); | ||
80 | +#endif | ||
81 | + | ||
82 | /* Get a connection, either from inetd or a listening TCP socket */ | ||
83 | if (inetd_flag) { | ||
84 | server_accept_inetd(&sock_in, &sock_out); | ||