summaryrefslogtreecommitdiff
path: root/debian/patches/consolekit.patch
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2014-10-07 13:33:15 +0100
committerColin Watson <cjwatson@debian.org>2014-10-07 14:27:30 +0100
commitf0b009aea83e9ff3a50be30f51012099a5143c16 (patch)
tree3825e6f7e3b7ea4481d06ed89aba9a7a95150df5 /debian/patches/consolekit.patch
parent47f0bad4330b16ec3bad870fcf9839c196e42c12 (diff)
parent762c062828f5a8f6ed189ed6e44ad38fd92f8b36 (diff)
Merge 6.7p1.
* New upstream release (http://www.openssh.com/txt/release-6.7): - sshd(8): The default set of ciphers and MACs has been altered to remove unsafe algorithms. In particular, CBC ciphers and arcfour* are disabled by default. The full set of algorithms remains available if configured explicitly via the Ciphers and MACs sshd_config options. - ssh(1), sshd(8): Add support for Unix domain socket forwarding. A remote TCP port may be forwarded to a local Unix domain socket and vice versa or both ends may be a Unix domain socket (closes: #236718). - ssh(1), ssh-keygen(1): Add support for SSHFP DNS records for ED25519 key types. - sftp(1): Allow resumption of interrupted uploads. - ssh(1): When rekeying, skip file/DNS lookups of the hostkey if it is the same as the one sent during initial key exchange. - sshd(8): Allow explicit ::1 and 127.0.0.1 forwarding bind addresses when GatewayPorts=no; allows client to choose address family. - sshd(8): Add a sshd_config PermitUserRC option to control whether ~/.ssh/rc is executed, mirroring the no-user-rc authorized_keys option. - ssh(1): Add a %C escape sequence for LocalCommand and ControlPath that expands to a unique identifer based on a hash of the tuple of (local host, remote user, hostname, port). Helps avoid exceeding miserly pathname limits for Unix domain sockets in multiplexing control paths. - sshd(8): Make the "Too many authentication failures" message include the user, source address, port and protocol in a format similar to the authentication success / failure messages. - Use CLOCK_BOOTTIME in preference to CLOCK_MONOTONIC when it is available. It considers time spent suspended, thereby ensuring timeouts (e.g. for expiring agent keys) fire correctly (closes: #734553). - Use prctl() to prevent sftp-server from accessing /proc/self/{mem,maps}. * Restore TCP wrappers support, removed upstream in 6.7. It is true that dropping this reduces preauth attack surface in sshd. On the other hand, this support seems to be quite widely used, and abruptly dropping it (from the perspective of users who don't read openssh-unix-dev) could easily cause more serious problems in practice. It's not entirely clear what the right long-term answer for Debian is, but it at least probably doesn't involve dropping this feature shortly before a freeze. * Replace patch to disable OpenSSL version check with an updated version of Kurt Roeckx's patch from #732940 to just avoid checking the status field.
Diffstat (limited to 'debian/patches/consolekit.patch')
-rw-r--r--debian/patches/consolekit.patch67
1 files changed, 34 insertions, 33 deletions
diff --git a/debian/patches/consolekit.patch b/debian/patches/consolekit.patch
index e3ff4d7e4..e50c77f62 100644
--- a/debian/patches/consolekit.patch
+++ b/debian/patches/consolekit.patch
@@ -1,33 +1,33 @@
1From 7a26d16efb4ee303c8d66ee82caf9d0686f4a074 Mon Sep 17 00:00:00 2001 1From f51fe0c55e54c12db952624e980d18f39c41e581 Mon Sep 17 00:00:00 2001
2From: Colin Watson <cjwatson@ubuntu.com> 2From: Colin Watson <cjwatson@ubuntu.com>
3Date: Sun, 9 Feb 2014 16:09:57 +0000 3Date: Sun, 9 Feb 2014 16:09:57 +0000
4Subject: Add support for registering ConsoleKit sessions on login 4Subject: Add support for registering ConsoleKit sessions on login
5 5
6Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=1450 6Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=1450
7Last-Updated: 2014-03-20 7Last-Updated: 2014-10-07
8 8
9Patch-Name: consolekit.patch 9Patch-Name: consolekit.patch
10--- 10---
11 Makefile.in | 3 +- 11 Makefile.in | 3 +-
12 configure | 132 +++++++++++++++++++++++++++++++ 12 configure | 132 +++++++++++++++++++++++++++++++
13 configure.ac | 25 ++++++ 13 configure.ac | 25 ++++++
14 consolekit.c | 240 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 14 consolekit.c | 241 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
15 consolekit.h | 24 ++++++ 15 consolekit.h | 24 ++++++
16 monitor.c | 42 ++++++++++ 16 monitor.c | 42 ++++++++++
17 monitor.h | 2 + 17 monitor.h | 2 +
18 monitor_wrap.c | 30 ++++++++ 18 monitor_wrap.c | 30 +++++++
19 monitor_wrap.h | 4 + 19 monitor_wrap.h | 4 +
20 session.c | 13 ++++ 20 session.c | 13 ++++
21 session.h | 6 ++ 21 session.h | 6 ++
22 11 files changed, 520 insertions(+), 1 deletion(-) 22 11 files changed, 521 insertions(+), 1 deletion(-)
23 create mode 100644 consolekit.c 23 create mode 100644 consolekit.c
24 create mode 100644 consolekit.h 24 create mode 100644 consolekit.h
25 25
26diff --git a/Makefile.in b/Makefile.in 26diff --git a/Makefile.in b/Makefile.in
27index ee1d2c3..3d96c05 100644 27index 086d8dd..c4cb8ea 100644
28--- a/Makefile.in 28--- a/Makefile.in
29+++ b/Makefile.in 29+++ b/Makefile.in
30@@ -97,7 +97,8 @@ SSHDOBJS=sshd.o auth-rhosts.o auth-passwd.o auth-rsa.o auth-rh-rsa.o \ 30@@ -107,7 +107,8 @@ SSHDOBJS=sshd.o auth-rhosts.o auth-passwd.o auth-rsa.o auth-rh-rsa.o \
31 sftp-server.o sftp-common.o \ 31 sftp-server.o sftp-common.o \
32 roaming_common.o roaming_serv.o \ 32 roaming_common.o roaming_serv.o \
33 sandbox-null.o sandbox-rlimit.o sandbox-systrace.o sandbox-darwin.o \ 33 sandbox-null.o sandbox-rlimit.o sandbox-systrace.o sandbox-darwin.o \
@@ -38,10 +38,10 @@ index ee1d2c3..3d96c05 100644
38 MANPAGES = moduli.5.out scp.1.out ssh-add.1.out ssh-agent.1.out ssh-keygen.1.out ssh-keyscan.1.out ssh.1.out sshd.8.out sftp-server.8.out sftp.1.out ssh-keysign.8.out ssh-pkcs11-helper.8.out sshd_config.5.out ssh_config.5.out 38 MANPAGES = moduli.5.out scp.1.out ssh-add.1.out ssh-agent.1.out ssh-keygen.1.out ssh-keyscan.1.out ssh.1.out sshd.8.out sftp-server.8.out sftp.1.out ssh-keysign.8.out ssh-pkcs11-helper.8.out sshd_config.5.out ssh_config.5.out
39 MANPAGES_IN = moduli.5 scp.1 ssh-add.1 ssh-agent.1 ssh-keygen.1 ssh-keyscan.1 ssh.1 sshd.8 sftp-server.8 sftp.1 ssh-keysign.8 ssh-pkcs11-helper.8 sshd_config.5 ssh_config.5 39 MANPAGES_IN = moduli.5 scp.1 ssh-add.1 ssh-agent.1 ssh-keygen.1 ssh-keyscan.1 ssh.1 sshd.8 sftp-server.8 sftp.1 ssh-keysign.8 ssh-pkcs11-helper.8 sshd_config.5 ssh_config.5
40diff --git a/configure b/configure 40diff --git a/configure b/configure
41index b6b5b6d..e2f12cd 100755 41index ea5f200..7be478a 100755
42--- a/configure 42--- a/configure
43+++ b/configure 43+++ b/configure
44@@ -740,6 +740,7 @@ with_privsep_user 44@@ -739,6 +739,7 @@ with_privsep_user
45 with_sandbox 45 with_sandbox
46 with_selinux 46 with_selinux
47 with_kerberos5 47 with_kerberos5
@@ -49,7 +49,7 @@ index b6b5b6d..e2f12cd 100755
49 with_privsep_path 49 with_privsep_path
50 with_xauth 50 with_xauth
51 enable_strip 51 enable_strip
52@@ -1432,6 +1433,7 @@ Optional Packages: 52@@ -1430,6 +1431,7 @@ Optional Packages:
53 --with-sandbox=style Specify privilege separation sandbox (no, darwin, rlimit, systrace, seccomp_filter, capsicum) 53 --with-sandbox=style Specify privilege separation sandbox (no, darwin, rlimit, systrace, seccomp_filter, capsicum)
54 --with-selinux Enable SELinux support 54 --with-selinux Enable SELinux support
55 --with-kerberos5=PATH Enable Kerberos 5 support 55 --with-kerberos5=PATH Enable Kerberos 5 support
@@ -57,7 +57,7 @@ index b6b5b6d..e2f12cd 100755
57 --with-privsep-path=xxx Path for privilege separation chroot (default=/var/empty) 57 --with-privsep-path=xxx Path for privilege separation chroot (default=/var/empty)
58 --with-xauth=PATH Specify path to xauth program 58 --with-xauth=PATH Specify path to xauth program
59 --with-maildir=/path/to/mail Specify your system mail directory 59 --with-maildir=/path/to/mail Specify your system mail directory
60@@ -17217,6 +17219,135 @@ fi 60@@ -17211,6 +17213,135 @@ fi
61 61
62 62
63 63
@@ -193,7 +193,7 @@ index b6b5b6d..e2f12cd 100755
193 # Looking for programs, paths and files 193 # Looking for programs, paths and files
194 194
195 PRIVSEP_PATH=/var/empty 195 PRIVSEP_PATH=/var/empty
196@@ -19746,6 +19877,7 @@ echo " MD5 password support: $MD5_MSG" 196@@ -19739,6 +19870,7 @@ echo " MD5 password support: $MD5_MSG"
197 echo " libedit support: $LIBEDIT_MSG" 197 echo " libedit support: $LIBEDIT_MSG"
198 echo " Solaris process contract support: $SPC_MSG" 198 echo " Solaris process contract support: $SPC_MSG"
199 echo " Solaris project support: $SP_MSG" 199 echo " Solaris project support: $SP_MSG"
@@ -202,10 +202,10 @@ index b6b5b6d..e2f12cd 100755
202 echo " Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG" 202 echo " Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG"
203 echo " BSD Auth support: $BSD_AUTH_MSG" 203 echo " BSD Auth support: $BSD_AUTH_MSG"
204diff --git a/configure.ac b/configure.ac 204diff --git a/configure.ac b/configure.ac
205index d235fb0..8669271 100644 205index 7f160f1..f5c65c5 100644
206--- a/configure.ac 206--- a/configure.ac
207+++ b/configure.ac 207+++ b/configure.ac
208@@ -4072,6 +4072,30 @@ AC_ARG_WITH([kerberos5], 208@@ -4113,6 +4113,30 @@ AC_ARG_WITH([kerberos5],
209 AC_SUBST([GSSLIBS]) 209 AC_SUBST([GSSLIBS])
210 AC_SUBST([K5LIBS]) 210 AC_SUBST([K5LIBS])
211 211
@@ -236,7 +236,7 @@ index d235fb0..8669271 100644
236 # Looking for programs, paths and files 236 # Looking for programs, paths and files
237 237
238 PRIVSEP_PATH=/var/empty 238 PRIVSEP_PATH=/var/empty
239@@ -4873,6 +4897,7 @@ echo " MD5 password support: $MD5_MSG" 239@@ -4914,6 +4938,7 @@ echo " MD5 password support: $MD5_MSG"
240 echo " libedit support: $LIBEDIT_MSG" 240 echo " libedit support: $LIBEDIT_MSG"
241 echo " Solaris process contract support: $SPC_MSG" 241 echo " Solaris process contract support: $SPC_MSG"
242 echo " Solaris project support: $SP_MSG" 242 echo " Solaris project support: $SP_MSG"
@@ -246,10 +246,10 @@ index d235fb0..8669271 100644
246 echo " BSD Auth support: $BSD_AUTH_MSG" 246 echo " BSD Auth support: $BSD_AUTH_MSG"
247diff --git a/consolekit.c b/consolekit.c 247diff --git a/consolekit.c b/consolekit.c
248new file mode 100644 248new file mode 100644
249index 0000000..f1039e6 249index 0000000..0266f06
250--- /dev/null 250--- /dev/null
251+++ b/consolekit.c 251+++ b/consolekit.c
252@@ -0,0 +1,240 @@ 252@@ -0,0 +1,241 @@
253+/* 253+/*
254+ * Copyright (c) 2008 Colin Watson. All rights reserved. 254+ * Copyright (c) 2008 Colin Watson. All rights reserved.
255+ * 255+ *
@@ -305,6 +305,7 @@ index 0000000..f1039e6
305+#include "hostfile.h" 305+#include "hostfile.h"
306+#include "auth.h" 306+#include "auth.h"
307+#include "log.h" 307+#include "log.h"
308+#include "misc.h"
308+#include "servconf.h" 309+#include "servconf.h"
309+#include "canohost.h" 310+#include "canohost.h"
310+#include "session.h" 311+#include "session.h"
@@ -521,10 +522,10 @@ index 0000000..8ce3716
521+ 522+
522+#endif /* USE_CONSOLEKIT */ 523+#endif /* USE_CONSOLEKIT */
523diff --git a/monitor.c b/monitor.c 524diff --git a/monitor.c b/monitor.c
524index 11eac63..7c105e6 100644 525index 94b194d..cc15ce4 100644
525--- a/monitor.c 526--- a/monitor.c
526+++ b/monitor.c 527+++ b/monitor.c
527@@ -97,6 +97,9 @@ 528@@ -100,6 +100,9 @@
528 #include "ssh2.h" 529 #include "ssh2.h"
529 #include "roaming.h" 530 #include "roaming.h"
530 #include "authfd.h" 531 #include "authfd.h"
@@ -534,7 +535,7 @@ index 11eac63..7c105e6 100644
534 535
535 #ifdef GSSAPI 536 #ifdef GSSAPI
536 static Gssctxt *gsscontext = NULL; 537 static Gssctxt *gsscontext = NULL;
537@@ -187,6 +190,10 @@ int mm_answer_audit_command(int, Buffer *); 538@@ -190,6 +193,10 @@ int mm_answer_audit_command(int, Buffer *);
538 539
539 static int monitor_read_log(struct monitor *); 540 static int monitor_read_log(struct monitor *);
540 541
@@ -543,9 +544,9 @@ index 11eac63..7c105e6 100644
543+#endif 544+#endif
544+ 545+
545 static Authctxt *authctxt; 546 static Authctxt *authctxt;
546 static BIGNUM *ssh1_challenge = NULL; /* used for ssh1 rsa auth */
547 547
548@@ -272,6 +279,9 @@ struct mon_table mon_dispatch_postauth20[] = { 548 #ifdef WITH_SSH1
549@@ -282,6 +289,9 @@ struct mon_table mon_dispatch_postauth20[] = {
549 {MONITOR_REQ_AUDIT_EVENT, MON_PERMIT, mm_answer_audit_event}, 550 {MONITOR_REQ_AUDIT_EVENT, MON_PERMIT, mm_answer_audit_event},
550 {MONITOR_REQ_AUDIT_COMMAND, MON_PERMIT, mm_answer_audit_command}, 551 {MONITOR_REQ_AUDIT_COMMAND, MON_PERMIT, mm_answer_audit_command},
551 #endif 552 #endif
@@ -555,17 +556,17 @@ index 11eac63..7c105e6 100644
555 {0, 0, NULL} 556 {0, 0, NULL}
556 }; 557 };
557 558
558@@ -314,6 +324,9 @@ struct mon_table mon_dispatch_postauth15[] = { 559@@ -327,6 +337,9 @@ struct mon_table mon_dispatch_postauth15[] = {
559 {MONITOR_REQ_AUDIT_EVENT, MON_PERMIT, mm_answer_audit_event}, 560 {MONITOR_REQ_AUDIT_EVENT, MON_PERMIT, mm_answer_audit_event},
560 {MONITOR_REQ_AUDIT_COMMAND, MON_PERMIT|MON_ONCE, mm_answer_audit_command}, 561 {MONITOR_REQ_AUDIT_COMMAND, MON_PERMIT|MON_ONCE, mm_answer_audit_command},
561 #endif 562 #endif
562+#ifdef USE_CONSOLEKIT 563+#ifdef USE_CONSOLEKIT
563+ {MONITOR_REQ_CONSOLEKIT_REGISTER, 0, mm_answer_consolekit_register}, 564+ {MONITOR_REQ_CONSOLEKIT_REGISTER, 0, mm_answer_consolekit_register},
564+#endif 565+#endif
566 #endif /* WITH_SSH1 */
565 {0, 0, NULL} 567 {0, 0, NULL}
566 }; 568 };
567 569@@ -509,6 +522,9 @@ monitor_child_postauth(struct monitor *pmonitor)
568@@ -492,6 +505,9 @@ monitor_child_postauth(struct monitor *pmonitor)
569 monitor_permit(mon_dispatch, MONITOR_REQ_PTY, 1); 570 monitor_permit(mon_dispatch, MONITOR_REQ_PTY, 1);
570 monitor_permit(mon_dispatch, MONITOR_REQ_PTYCLEANUP, 1); 571 monitor_permit(mon_dispatch, MONITOR_REQ_PTYCLEANUP, 1);
571 } 572 }
@@ -575,7 +576,7 @@ index 11eac63..7c105e6 100644
575 576
576 for (;;) 577 for (;;)
577 monitor_read(pmonitor, mon_dispatch, NULL); 578 monitor_read(pmonitor, mon_dispatch, NULL);
578@@ -2269,3 +2285,29 @@ mm_answer_gss_updatecreds(int socket, Buffer *m) { 579@@ -2296,3 +2312,29 @@ mm_answer_gss_updatecreds(int socket, Buffer *m) {
579 580
580 #endif /* GSSAPI */ 581 #endif /* GSSAPI */
581 582
@@ -619,10 +620,10 @@ index 4d5e8fa..10ba59e 100644
619 620
620 struct mm_master; 621 struct mm_master;
621diff --git a/monitor_wrap.c b/monitor_wrap.c 622diff --git a/monitor_wrap.c b/monitor_wrap.c
622index f75dc9d..a8fb07b 100644 623index 6dc890a..4c57d4d 100644
623--- a/monitor_wrap.c 624--- a/monitor_wrap.c
624+++ b/monitor_wrap.c 625+++ b/monitor_wrap.c
625@@ -1353,3 +1353,33 @@ mm_ssh_gssapi_update_creds(ssh_gssapi_ccache *store) 626@@ -1363,3 +1363,33 @@ mm_ssh_gssapi_update_creds(ssh_gssapi_ccache *store)
626 627
627 #endif /* GSSAPI */ 628 #endif /* GSSAPI */
628 629
@@ -670,10 +671,10 @@ index 9c2ee49..00e93fe 100644
670+ 671+
671 #endif /* _MM_WRAP_H_ */ 672 #endif /* _MM_WRAP_H_ */
672diff --git a/session.c b/session.c 673diff --git a/session.c b/session.c
673index 6848df4..9d43fc3 100644 674index 6f389ac..6250c20 100644
674--- a/session.c 675--- a/session.c
675+++ b/session.c 676+++ b/session.c
676@@ -92,6 +92,7 @@ 677@@ -93,6 +93,7 @@
677 #include "kex.h" 678 #include "kex.h"
678 #include "monitor_wrap.h" 679 #include "monitor_wrap.h"
679 #include "sftp.h" 680 #include "sftp.h"
@@ -681,7 +682,7 @@ index 6848df4..9d43fc3 100644
681 682
682 #if defined(KRB5) && defined(USE_AFS) 683 #if defined(KRB5) && defined(USE_AFS)
683 #include <kafs.h> 684 #include <kafs.h>
684@@ -1160,6 +1161,9 @@ do_setup_env(Session *s, const char *shell) 685@@ -1143,6 +1144,9 @@ do_setup_env(Session *s, const char *shell)
685 #if !defined (HAVE_LOGIN_CAP) && !defined (HAVE_CYGWIN) 686 #if !defined (HAVE_LOGIN_CAP) && !defined (HAVE_CYGWIN)
686 char *path = NULL; 687 char *path = NULL;
687 #endif 688 #endif
@@ -691,7 +692,7 @@ index 6848df4..9d43fc3 100644
691 692
692 /* Initialize the environment. */ 693 /* Initialize the environment. */
693 envsize = 100; 694 envsize = 100;
694@@ -1304,6 +1308,11 @@ do_setup_env(Session *s, const char *shell) 695@@ -1287,6 +1291,11 @@ do_setup_env(Session *s, const char *shell)
695 child_set_env(&env, &envsize, "KRB5CCNAME", 696 child_set_env(&env, &envsize, "KRB5CCNAME",
696 s->authctxt->krb5_ccname); 697 s->authctxt->krb5_ccname);
697 #endif 698 #endif
@@ -703,7 +704,7 @@ index 6848df4..9d43fc3 100644
703 #ifdef USE_PAM 704 #ifdef USE_PAM
704 /* 705 /*
705 * Pull in any environment variables that may have 706 * Pull in any environment variables that may have
706@@ -2353,6 +2362,10 @@ session_pty_cleanup2(Session *s) 707@@ -2350,6 +2359,10 @@ session_pty_cleanup2(Session *s)
707 708
708 debug("session_pty_cleanup: session %d release %s", s->self, s->tty); 709 debug("session_pty_cleanup: session %d release %s", s->self, s->tty);
709 710