summaryrefslogtreecommitdiff
path: root/debian/patches/consolekit.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/consolekit.patch')
-rw-r--r--debian/patches/consolekit.patch72
1 files changed, 35 insertions, 37 deletions
diff --git a/debian/patches/consolekit.patch b/debian/patches/consolekit.patch
index 7492daca8..e3ff4d7e4 100644
--- a/debian/patches/consolekit.patch
+++ b/debian/patches/consolekit.patch
@@ -1,10 +1,10 @@
1From f4858fd1a10d1621e5e3ad5f2400dd17d156ced7 Mon Sep 17 00:00:00 2001 1From 7a26d16efb4ee303c8d66ee82caf9d0686f4a074 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: 2013-09-14 7Last-Updated: 2014-03-20
8 8
9Patch-Name: consolekit.patch 9Patch-Name: consolekit.patch
10--- 10---
@@ -13,18 +13,18 @@ Patch-Name: consolekit.patch
13 configure.ac | 25 ++++++ 13 configure.ac | 25 ++++++
14 consolekit.c | 240 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 14 consolekit.c | 240 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
15 consolekit.h | 24 ++++++ 15 consolekit.h | 24 ++++++
16 monitor.c | 43 +++++++++++ 16 monitor.c | 42 ++++++++++
17 monitor.h | 2 + 17 monitor.h | 2 +
18 monitor_wrap.c | 31 ++++++++ 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, 522 insertions(+), 1 deletion(-) 22 11 files changed, 520 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 35c6fd6..598d55a 100644 27index ee1d2c3..3d96c05 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@@ -97,7 +97,8 @@ SSHDOBJS=sshd.o auth-rhosts.o auth-passwd.o auth-rsa.o auth-rh-rsa.o \
@@ -38,7 +38,7 @@ index 35c6fd6..598d55a 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 5a9db2d..57b68e2 100755 41index b6b5b6d..e2f12cd 100755
42--- a/configure 42--- a/configure
43+++ b/configure 43+++ b/configure
44@@ -740,6 +740,7 @@ with_privsep_user 44@@ -740,6 +740,7 @@ with_privsep_user
@@ -57,7 +57,7 @@ index 5a9db2d..57b68e2 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@@ -17215,6 +17217,135 @@ fi 60@@ -17217,6 +17219,135 @@ fi
61 61
62 62
63 63
@@ -193,7 +193,7 @@ index 5a9db2d..57b68e2 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@@ -19744,6 +19875,7 @@ echo " MD5 password support: $MD5_MSG" 196@@ -19746,6 +19877,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 5a9db2d..57b68e2 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 90eebf5..e2289cd 100644 205index d235fb0..8669271 100644
206--- a/configure.ac 206--- a/configure.ac
207+++ b/configure.ac 207+++ b/configure.ac
208@@ -4070,6 +4070,30 @@ AC_ARG_WITH([kerberos5], 208@@ -4072,6 +4072,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 90eebf5..e2289cd 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@@ -4871,6 +4895,7 @@ echo " MD5 password support: $MD5_MSG" 239@@ -4873,6 +4897,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"
@@ -521,11 +521,11 @@ index 0000000..8ce3716
521+ 521+
522+#endif /* USE_CONSOLEKIT */ 522+#endif /* USE_CONSOLEKIT */
523diff --git a/monitor.c b/monitor.c 523diff --git a/monitor.c b/monitor.c
524index 88f472e..8ffea4f 100644 524index 11eac63..7c105e6 100644
525--- a/monitor.c 525--- a/monitor.c
526+++ b/monitor.c 526+++ b/monitor.c
527@@ -98,6 +98,9 @@ 527@@ -97,6 +97,9 @@
528 #include "jpake.h" 528 #include "ssh2.h"
529 #include "roaming.h" 529 #include "roaming.h"
530 #include "authfd.h" 530 #include "authfd.h"
531+#ifdef USE_CONSOLEKIT 531+#ifdef USE_CONSOLEKIT
@@ -534,7 +534,7 @@ index 88f472e..8ffea4f 100644
534 534
535 #ifdef GSSAPI 535 #ifdef GSSAPI
536 static Gssctxt *gsscontext = NULL; 536 static Gssctxt *gsscontext = NULL;
537@@ -193,6 +196,10 @@ int mm_answer_audit_command(int, Buffer *); 537@@ -187,6 +190,10 @@ int mm_answer_audit_command(int, Buffer *);
538 538
539 static int monitor_read_log(struct monitor *); 539 static int monitor_read_log(struct monitor *);
540 540
@@ -545,7 +545,7 @@ index 88f472e..8ffea4f 100644
545 static Authctxt *authctxt; 545 static Authctxt *authctxt;
546 static BIGNUM *ssh1_challenge = NULL; /* used for ssh1 rsa auth */ 546 static BIGNUM *ssh1_challenge = NULL; /* used for ssh1 rsa auth */
547 547
548@@ -285,6 +292,9 @@ struct mon_table mon_dispatch_postauth20[] = { 548@@ -272,6 +279,9 @@ struct mon_table mon_dispatch_postauth20[] = {
549 {MONITOR_REQ_AUDIT_EVENT, MON_PERMIT, mm_answer_audit_event}, 549 {MONITOR_REQ_AUDIT_EVENT, MON_PERMIT, mm_answer_audit_event},
550 {MONITOR_REQ_AUDIT_COMMAND, MON_PERMIT, mm_answer_audit_command}, 550 {MONITOR_REQ_AUDIT_COMMAND, MON_PERMIT, mm_answer_audit_command},
551 #endif 551 #endif
@@ -555,7 +555,7 @@ index 88f472e..8ffea4f 100644
555 {0, 0, NULL} 555 {0, 0, NULL}
556 }; 556 };
557 557
558@@ -327,6 +337,9 @@ struct mon_table mon_dispatch_postauth15[] = { 558@@ -314,6 +324,9 @@ struct mon_table mon_dispatch_postauth15[] = {
559 {MONITOR_REQ_AUDIT_EVENT, MON_PERMIT, mm_answer_audit_event}, 559 {MONITOR_REQ_AUDIT_EVENT, MON_PERMIT, mm_answer_audit_event},
560 {MONITOR_REQ_AUDIT_COMMAND, MON_PERMIT|MON_ONCE, mm_answer_audit_command}, 560 {MONITOR_REQ_AUDIT_COMMAND, MON_PERMIT|MON_ONCE, mm_answer_audit_command},
561 #endif 561 #endif
@@ -565,7 +565,7 @@ index 88f472e..8ffea4f 100644
565 {0, 0, NULL} 565 {0, 0, NULL}
566 }; 566 };
567 567
568@@ -514,6 +527,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); 569 monitor_permit(mon_dispatch, MONITOR_REQ_PTY, 1);
570 monitor_permit(mon_dispatch, MONITOR_REQ_PTYCLEANUP, 1); 570 monitor_permit(mon_dispatch, MONITOR_REQ_PTYCLEANUP, 1);
571 } 571 }
@@ -575,11 +575,10 @@ index 88f472e..8ffea4f 100644
575 575
576 for (;;) 576 for (;;)
577 monitor_read(pmonitor, mon_dispatch, NULL); 577 monitor_read(pmonitor, mon_dispatch, NULL);
578@@ -2493,3 +2509,30 @@ mm_answer_jpake_check_confirm(int sock, Buffer *m) 578@@ -2269,3 +2285,29 @@ mm_answer_gss_updatecreds(int socket, Buffer *m) {
579 } 579
580 #endif /* GSSAPI */
580 581
581 #endif /* JPAKE */
582+
583+#ifdef USE_CONSOLEKIT 582+#ifdef USE_CONSOLEKIT
584+int 583+int
585+mm_answer_consolekit_register(int sock, Buffer *m) 584+mm_answer_consolekit_register(int sock, Buffer *m)
@@ -607,10 +606,10 @@ index 88f472e..8ffea4f 100644
607+} 606+}
608+#endif /* USE_CONSOLEKIT */ 607+#endif /* USE_CONSOLEKIT */
609diff --git a/monitor.h b/monitor.h 608diff --git a/monitor.h b/monitor.h
610index 3c13706..cd83428 100644 609index 4d5e8fa..10ba59e 100644
611--- a/monitor.h 610--- a/monitor.h
612+++ b/monitor.h 611+++ b/monitor.h
613@@ -75,6 +75,8 @@ enum monitor_reqtype { 612@@ -70,6 +70,8 @@ enum monitor_reqtype {
614 613
615 MONITOR_REQ_AUTHROLE = 154, 614 MONITOR_REQ_AUTHROLE = 154,
616 615
@@ -620,14 +619,13 @@ index 3c13706..cd83428 100644
620 619
621 struct mm_master; 620 struct mm_master;
622diff --git a/monitor_wrap.c b/monitor_wrap.c 621diff --git a/monitor_wrap.c b/monitor_wrap.c
623index 69bc324..670b62d 100644 622index f75dc9d..a8fb07b 100644
624--- a/monitor_wrap.c 623--- a/monitor_wrap.c
625+++ b/monitor_wrap.c 624+++ b/monitor_wrap.c
626@@ -1516,3 +1516,34 @@ mm_jpake_check_confirm(const BIGNUM *k, 625@@ -1353,3 +1353,33 @@ mm_ssh_gssapi_update_creds(ssh_gssapi_ccache *store)
627 return success; 626
628 } 627 #endif /* GSSAPI */
629 #endif /* JPAKE */ 628
630+
631+#ifdef USE_CONSOLEKIT 629+#ifdef USE_CONSOLEKIT
632+char * 630+char *
633+mm_consolekit_register(Session *s, const char *display) 631+mm_consolekit_register(Session *s, const char *display)
@@ -659,10 +657,10 @@ index 69bc324..670b62d 100644
659+} 657+}
660+#endif /* USE_CONSOLEKIT */ 658+#endif /* USE_CONSOLEKIT */
661diff --git a/monitor_wrap.h b/monitor_wrap.h 659diff --git a/monitor_wrap.h b/monitor_wrap.h
662index 4d12e29..360fb9f 100644 660index 9c2ee49..00e93fe 100644
663--- a/monitor_wrap.h 661--- a/monitor_wrap.h
664+++ b/monitor_wrap.h 662+++ b/monitor_wrap.h
665@@ -131,4 +131,8 @@ void *mm_zalloc(struct mm_master *, u_int, u_int); 663@@ -111,4 +111,8 @@ void *mm_zalloc(struct mm_master *, u_int, u_int);
666 void mm_zfree(struct mm_master *, void *); 664 void mm_zfree(struct mm_master *, void *);
667 void mm_init_compression(struct mm_master *); 665 void mm_init_compression(struct mm_master *);
668 666
@@ -672,7 +670,7 @@ index 4d12e29..360fb9f 100644
672+ 670+
673 #endif /* _MM_WRAP_H_ */ 671 #endif /* _MM_WRAP_H_ */
674diff --git a/session.c b/session.c 672diff --git a/session.c b/session.c
675index 5ddd82a..14df226 100644 673index 6848df4..9d43fc3 100644
676--- a/session.c 674--- a/session.c
677+++ b/session.c 675+++ b/session.c
678@@ -92,6 +92,7 @@ 676@@ -92,6 +92,7 @@
@@ -683,7 +681,7 @@ index 5ddd82a..14df226 100644
683 681
684 #if defined(KRB5) && defined(USE_AFS) 682 #if defined(KRB5) && defined(USE_AFS)
685 #include <kafs.h> 683 #include <kafs.h>
686@@ -1155,6 +1156,9 @@ do_setup_env(Session *s, const char *shell) 684@@ -1160,6 +1161,9 @@ do_setup_env(Session *s, const char *shell)
687 #if !defined (HAVE_LOGIN_CAP) && !defined (HAVE_CYGWIN) 685 #if !defined (HAVE_LOGIN_CAP) && !defined (HAVE_CYGWIN)
688 char *path = NULL; 686 char *path = NULL;
689 #endif 687 #endif
@@ -693,7 +691,7 @@ index 5ddd82a..14df226 100644
693 691
694 /* Initialize the environment. */ 692 /* Initialize the environment. */
695 envsize = 100; 693 envsize = 100;
696@@ -1299,6 +1303,11 @@ do_setup_env(Session *s, const char *shell) 694@@ -1304,6 +1308,11 @@ do_setup_env(Session *s, const char *shell)
697 child_set_env(&env, &envsize, "KRB5CCNAME", 695 child_set_env(&env, &envsize, "KRB5CCNAME",
698 s->authctxt->krb5_ccname); 696 s->authctxt->krb5_ccname);
699 #endif 697 #endif
@@ -705,7 +703,7 @@ index 5ddd82a..14df226 100644
705 #ifdef USE_PAM 703 #ifdef USE_PAM
706 /* 704 /*
707 * Pull in any environment variables that may have 705 * Pull in any environment variables that may have
708@@ -2348,6 +2357,10 @@ session_pty_cleanup2(Session *s) 706@@ -2353,6 +2362,10 @@ session_pty_cleanup2(Session *s)
709 707
710 debug("session_pty_cleanup: session %d release %s", s->self, s->tty); 708 debug("session_pty_cleanup: session %d release %s", s->self, s->tty);
711 709