summaryrefslogtreecommitdiff
path: root/debian/patches/consolekit.patch
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2014-02-09 16:10:19 +0000
committerColin Watson <cjwatson@debian.org>2014-02-09 16:25:52 +0000
commitd26565af8589d88f824b26f31da493f1056efcf4 (patch)
treeff5e3b9c0fbb553f4f4c6e8836070659f266108e /debian/patches/consolekit.patch
parent16fb149cbb42efe0cb13f3edbafcb1a21ecfe574 (diff)
parentbb5616c94d6d6b97890e90dd01a7ad07c663dc0b (diff)
Initialize git-dpm
Diffstat (limited to 'debian/patches/consolekit.patch')
-rw-r--r--debian/patches/consolekit.patch186
1 files changed, 104 insertions, 82 deletions
diff --git a/debian/patches/consolekit.patch b/debian/patches/consolekit.patch
index fd064a848..f43e78500 100644
--- a/debian/patches/consolekit.patch
+++ b/debian/patches/consolekit.patch
@@ -1,13 +1,33 @@
1Description: Add support for registering ConsoleKit sessions on login 1From cfae2bfa1e95cbb6c7a9799f13b82e8e804ca869 Mon Sep 17 00:00:00 2001
2Author: Colin Watson <cjwatson@ubuntu.com> 2From: Colin Watson <cjwatson@ubuntu.com>
3Date: Sun, 9 Feb 2014 16:09:57 +0000
4Subject: Add support for registering ConsoleKit sessions on login
5
3Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=1450 6Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=1450
4Last-Updated: 2013-09-14 7Last-Updated: 2013-09-14
5 8
6Index: b/Makefile.in 9Patch-Name: consolekit.patch
7=================================================================== 10---
11 Makefile.in | 3 +-
12 configure | 132 +++++++++++++++++++++++++++++++
13 configure.ac | 25 ++++++
14 consolekit.c | 240 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
15 consolekit.h | 24 ++++++
16 monitor.c | 43 +++++++++++
17 monitor.h | 2 +
18 monitor_wrap.c | 31 ++++++++
19 monitor_wrap.h | 4 +
20 session.c | 13 ++++
21 session.h | 6 ++
22 11 files changed, 522 insertions(+), 1 deletion(-)
23 create mode 100644 consolekit.c
24 create mode 100644 consolekit.h
25
26diff --git a/Makefile.in b/Makefile.in
27index b8f5099..ca6eee5 100644
8--- a/Makefile.in 28--- a/Makefile.in
9+++ b/Makefile.in 29+++ b/Makefile.in
10@@ -96,7 +96,8 @@ 30@@ -96,7 +96,8 @@ SSHDOBJS=sshd.o auth-rhosts.o auth-passwd.o auth-rsa.o auth-rh-rsa.o \
11 sftp-server.o sftp-common.o \ 31 sftp-server.o sftp-common.o \
12 roaming_common.o roaming_serv.o \ 32 roaming_common.o roaming_serv.o \
13 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 \
@@ -17,54 +37,11 @@ Index: b/Makefile.in
17 37
18 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 ssh-vulnkey.1.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 ssh-vulnkey.1.out sshd_config.5.out ssh_config.5.out
19 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 ssh-vulnkey.1 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 ssh-vulnkey.1 sshd_config.5 ssh_config.5
20Index: b/configure.ac 40diff --git a/configure b/configure
21=================================================================== 41index ceb1b5d..78bbcd0 100755
22--- a/configure.ac
23+++ b/configure.ac
24@@ -3841,6 +3841,30 @@
25 AC_SUBST([GSSLIBS])
26 AC_SUBST([K5LIBS])
27
28+# Check whether user wants ConsoleKit support
29+CONSOLEKIT_MSG="no"
30+LIBCK_CONNECTOR=""
31+AC_ARG_WITH(consolekit,
32+ [ --with-consolekit Enable ConsoleKit support],
33+ [ if test "x$withval" != "xno" ; then
34+ AC_PATH_TOOL([PKGCONFIG], [pkg-config], [no])
35+ if test "$PKGCONFIG" != "no"; then
36+ AC_MSG_CHECKING([for ck-connector])
37+ if $PKGCONFIG --exists ck-connector; then
38+ CKCON_CFLAGS=`$PKGCONFIG --cflags ck-connector`
39+ CKCON_LIBS=`$PKGCONFIG --libs ck-connector`
40+ CPPFLAGS="$CPPFLAGS $CKCON_CFLAGS"
41+ SSHDLIBS="$SSHDLIBS $CKCON_LIBS"
42+ AC_MSG_RESULT([yes])
43+ AC_DEFINE(USE_CONSOLEKIT, 1, [Define if you want ConsoleKit support.])
44+ CONSOLEKIT_MSG="yes"
45+ else
46+ AC_MSG_RESULT([no])
47+ fi
48+ fi
49+ fi ]
50+)
51+
52 # Looking for programs, paths and files
53
54 PRIVSEP_PATH=/var/empty
55@@ -4641,6 +4665,7 @@
56 echo " libedit support: $LIBEDIT_MSG"
57 echo " Solaris process contract support: $SPC_MSG"
58 echo " Solaris project support: $SP_MSG"
59+echo " ConsoleKit support: $CONSOLEKIT_MSG"
60 echo " IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG"
61 echo " Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG"
62 echo " BSD Auth support: $BSD_AUTH_MSG"
63Index: b/configure
64===================================================================
65--- a/configure 42--- a/configure
66+++ b/configure 43+++ b/configure
67@@ -738,6 +738,7 @@ 44@@ -738,6 +738,7 @@ with_privsep_user
68 with_sandbox 45 with_sandbox
69 with_selinux 46 with_selinux
70 with_kerberos5 47 with_kerberos5
@@ -72,7 +49,7 @@ Index: b/configure
72 with_privsep_path 49 with_privsep_path
73 with_xauth 50 with_xauth
74 enable_strip 51 enable_strip
75@@ -1428,6 +1429,7 @@ 52@@ -1428,6 +1429,7 @@ Optional Packages:
76 --with-sandbox=style Specify privilege separation sandbox (no, darwin, rlimit, systrace, seccomp_filter) 53 --with-sandbox=style Specify privilege separation sandbox (no, darwin, rlimit, systrace, seccomp_filter)
77 --with-selinux Enable SELinux support 54 --with-selinux Enable SELinux support
78 --with-kerberos5=PATH Enable Kerberos 5 support 55 --with-kerberos5=PATH Enable Kerberos 5 support
@@ -80,7 +57,7 @@ Index: b/configure
80 --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)
81 --with-xauth=PATH Specify path to xauth program 58 --with-xauth=PATH Specify path to xauth program
82 --with-maildir=/path/to/mail Specify your system mail directory 59 --with-maildir=/path/to/mail Specify your system mail directory
83@@ -16375,6 +16377,135 @@ 60@@ -16375,6 +16377,135 @@ fi
84 61
85 62
86 63
@@ -216,7 +193,50 @@ Index: b/configure
216 # Looking for programs, paths and files 193 # Looking for programs, paths and files
217 194
218 PRIVSEP_PATH=/var/empty 195 PRIVSEP_PATH=/var/empty
219@@ -18902,6 +19033,7 @@ 196@@ -18902,6 +19033,7 @@ echo " MD5 password support: $MD5_MSG"
197 echo " libedit support: $LIBEDIT_MSG"
198 echo " Solaris process contract support: $SPC_MSG"
199 echo " Solaris project support: $SP_MSG"
200+echo " ConsoleKit support: $CONSOLEKIT_MSG"
201 echo " IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG"
202 echo " Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG"
203 echo " BSD Auth support: $BSD_AUTH_MSG"
204diff --git a/configure.ac b/configure.ac
205index 4c1a658..d7d500a 100644
206--- a/configure.ac
207+++ b/configure.ac
208@@ -3841,6 +3841,30 @@ AC_ARG_WITH([kerberos5],
209 AC_SUBST([GSSLIBS])
210 AC_SUBST([K5LIBS])
211
212+# Check whether user wants ConsoleKit support
213+CONSOLEKIT_MSG="no"
214+LIBCK_CONNECTOR=""
215+AC_ARG_WITH(consolekit,
216+ [ --with-consolekit Enable ConsoleKit support],
217+ [ if test "x$withval" != "xno" ; then
218+ AC_PATH_TOOL([PKGCONFIG], [pkg-config], [no])
219+ if test "$PKGCONFIG" != "no"; then
220+ AC_MSG_CHECKING([for ck-connector])
221+ if $PKGCONFIG --exists ck-connector; then
222+ CKCON_CFLAGS=`$PKGCONFIG --cflags ck-connector`
223+ CKCON_LIBS=`$PKGCONFIG --libs ck-connector`
224+ CPPFLAGS="$CPPFLAGS $CKCON_CFLAGS"
225+ SSHDLIBS="$SSHDLIBS $CKCON_LIBS"
226+ AC_MSG_RESULT([yes])
227+ AC_DEFINE(USE_CONSOLEKIT, 1, [Define if you want ConsoleKit support.])
228+ CONSOLEKIT_MSG="yes"
229+ else
230+ AC_MSG_RESULT([no])
231+ fi
232+ fi
233+ fi ]
234+)
235+
236 # Looking for programs, paths and files
237
238 PRIVSEP_PATH=/var/empty
239@@ -4641,6 +4665,7 @@ echo " MD5 password support: $MD5_MSG"
220 echo " libedit support: $LIBEDIT_MSG" 240 echo " libedit support: $LIBEDIT_MSG"
221 echo " Solaris process contract support: $SPC_MSG" 241 echo " Solaris process contract support: $SPC_MSG"
222 echo " Solaris project support: $SP_MSG" 242 echo " Solaris project support: $SP_MSG"
@@ -224,8 +244,9 @@ Index: b/configure
224 echo " IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG" 244 echo " IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG"
225 echo " Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG" 245 echo " Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG"
226 echo " BSD Auth support: $BSD_AUTH_MSG" 246 echo " BSD Auth support: $BSD_AUTH_MSG"
227Index: b/consolekit.c 247diff --git a/consolekit.c b/consolekit.c
228=================================================================== 248new file mode 100644
249index 0000000..f1039e6
229--- /dev/null 250--- /dev/null
230+++ b/consolekit.c 251+++ b/consolekit.c
231@@ -0,0 +1,240 @@ 252@@ -0,0 +1,240 @@
@@ -469,8 +490,9 @@ Index: b/consolekit.c
469+} 490+}
470+ 491+
471+#endif /* USE_CONSOLEKIT */ 492+#endif /* USE_CONSOLEKIT */
472Index: b/consolekit.h 493diff --git a/consolekit.h b/consolekit.h
473=================================================================== 494new file mode 100644
495index 0000000..8ce3716
474--- /dev/null 496--- /dev/null
475+++ b/consolekit.h 497+++ b/consolekit.h
476@@ -0,0 +1,24 @@ 498@@ -0,0 +1,24 @@
@@ -498,8 +520,8 @@ Index: b/consolekit.h
498+void consolekit_unregister(struct Session *); 520+void consolekit_unregister(struct Session *);
499+ 521+
500+#endif /* USE_CONSOLEKIT */ 522+#endif /* USE_CONSOLEKIT */
501Index: b/monitor.c 523diff --git a/monitor.c b/monitor.c
502=================================================================== 524index e8d63eb..9bc4f0b 100644
503--- a/monitor.c 525--- a/monitor.c
504+++ b/monitor.c 526+++ b/monitor.c
505@@ -98,6 +98,9 @@ 527@@ -98,6 +98,9 @@
@@ -512,7 +534,7 @@ Index: b/monitor.c
512 534
513 #ifdef GSSAPI 535 #ifdef GSSAPI
514 static Gssctxt *gsscontext = NULL; 536 static Gssctxt *gsscontext = NULL;
515@@ -193,6 +196,10 @@ 537@@ -193,6 +196,10 @@ int mm_answer_audit_command(int, Buffer *);
516 538
517 static int monitor_read_log(struct monitor *); 539 static int monitor_read_log(struct monitor *);
518 540
@@ -523,7 +545,7 @@ Index: b/monitor.c
523 static Authctxt *authctxt; 545 static Authctxt *authctxt;
524 static BIGNUM *ssh1_challenge = NULL; /* used for ssh1 rsa auth */ 546 static BIGNUM *ssh1_challenge = NULL; /* used for ssh1 rsa auth */
525 547
526@@ -285,6 +292,9 @@ 548@@ -285,6 +292,9 @@ struct mon_table mon_dispatch_postauth20[] = {
527 {MONITOR_REQ_AUDIT_EVENT, MON_PERMIT, mm_answer_audit_event}, 549 {MONITOR_REQ_AUDIT_EVENT, MON_PERMIT, mm_answer_audit_event},
528 {MONITOR_REQ_AUDIT_COMMAND, MON_PERMIT, mm_answer_audit_command}, 550 {MONITOR_REQ_AUDIT_COMMAND, MON_PERMIT, mm_answer_audit_command},
529 #endif 551 #endif
@@ -533,7 +555,7 @@ Index: b/monitor.c
533 {0, 0, NULL} 555 {0, 0, NULL}
534 }; 556 };
535 557
536@@ -327,6 +337,9 @@ 558@@ -327,6 +337,9 @@ struct mon_table mon_dispatch_postauth15[] = {
537 {MONITOR_REQ_AUDIT_EVENT, MON_PERMIT, mm_answer_audit_event}, 559 {MONITOR_REQ_AUDIT_EVENT, MON_PERMIT, mm_answer_audit_event},
538 {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},
539 #endif 561 #endif
@@ -543,7 +565,7 @@ Index: b/monitor.c
543 {0, 0, NULL} 565 {0, 0, NULL}
544 }; 566 };
545 567
546@@ -514,6 +527,9 @@ 568@@ -514,6 +527,9 @@ monitor_child_postauth(struct monitor *pmonitor)
547 monitor_permit(mon_dispatch, MONITOR_REQ_PTY, 1); 569 monitor_permit(mon_dispatch, MONITOR_REQ_PTY, 1);
548 monitor_permit(mon_dispatch, MONITOR_REQ_PTYCLEANUP, 1); 570 monitor_permit(mon_dispatch, MONITOR_REQ_PTYCLEANUP, 1);
549 } 571 }
@@ -553,7 +575,7 @@ Index: b/monitor.c
553 575
554 for (;;) 576 for (;;)
555 monitor_read(pmonitor, mon_dispatch, NULL); 577 monitor_read(pmonitor, mon_dispatch, NULL);
556@@ -2492,3 +2508,30 @@ 578@@ -2492,3 +2508,30 @@ mm_answer_jpake_check_confirm(int sock, Buffer *m)
557 } 579 }
558 580
559 #endif /* JPAKE */ 581 #endif /* JPAKE */
@@ -584,11 +606,11 @@ Index: b/monitor.c
584+ return (0); 606+ return (0);
585+} 607+}
586+#endif /* USE_CONSOLEKIT */ 608+#endif /* USE_CONSOLEKIT */
587Index: b/monitor.h 609diff --git a/monitor.h b/monitor.h
588=================================================================== 610index 3c13706..cd83428 100644
589--- a/monitor.h 611--- a/monitor.h
590+++ b/monitor.h 612+++ b/monitor.h
591@@ -75,6 +75,8 @@ 613@@ -75,6 +75,8 @@ enum monitor_reqtype {
592 614
593 MONITOR_REQ_AUTHROLE = 154, 615 MONITOR_REQ_AUTHROLE = 154,
594 616
@@ -597,11 +619,11 @@ Index: b/monitor.h
597 }; 619 };
598 620
599 struct mm_master; 621 struct mm_master;
600Index: b/monitor_wrap.c 622diff --git a/monitor_wrap.c b/monitor_wrap.c
601=================================================================== 623index 69bc324..670b62d 100644
602--- a/monitor_wrap.c 624--- a/monitor_wrap.c
603+++ b/monitor_wrap.c 625+++ b/monitor_wrap.c
604@@ -1516,3 +1516,34 @@ 626@@ -1516,3 +1516,34 @@ mm_jpake_check_confirm(const BIGNUM *k,
605 return success; 627 return success;
606 } 628 }
607 #endif /* JPAKE */ 629 #endif /* JPAKE */
@@ -636,11 +658,11 @@ Index: b/monitor_wrap.c
636+ return (cookie); 658+ return (cookie);
637+} 659+}
638+#endif /* USE_CONSOLEKIT */ 660+#endif /* USE_CONSOLEKIT */
639Index: b/monitor_wrap.h 661diff --git a/monitor_wrap.h b/monitor_wrap.h
640=================================================================== 662index 4d12e29..360fb9f 100644
641--- a/monitor_wrap.h 663--- a/monitor_wrap.h
642+++ b/monitor_wrap.h 664+++ b/monitor_wrap.h
643@@ -131,4 +131,8 @@ 665@@ -131,4 +131,8 @@ void *mm_zalloc(struct mm_master *, u_int, u_int);
644 void mm_zfree(struct mm_master *, void *); 666 void mm_zfree(struct mm_master *, void *);
645 void mm_init_compression(struct mm_master *); 667 void mm_init_compression(struct mm_master *);
646 668
@@ -649,8 +671,8 @@ Index: b/monitor_wrap.h
649+#endif /* USE_CONSOLEKIT */ 671+#endif /* USE_CONSOLEKIT */
650+ 672+
651 #endif /* _MM_WRAP_H_ */ 673 #endif /* _MM_WRAP_H_ */
652Index: b/session.c 674diff --git a/session.c b/session.c
653=================================================================== 675index b4d74d9..15bdb1b 100644
654--- a/session.c 676--- a/session.c
655+++ b/session.c 677+++ b/session.c
656@@ -92,6 +92,7 @@ 678@@ -92,6 +92,7 @@
@@ -661,7 +683,7 @@ Index: b/session.c
661 683
662 #if defined(KRB5) && defined(USE_AFS) 684 #if defined(KRB5) && defined(USE_AFS)
663 #include <kafs.h> 685 #include <kafs.h>
664@@ -1132,6 +1133,9 @@ 686@@ -1132,6 +1133,9 @@ do_setup_env(Session *s, const char *shell)
665 #if !defined (HAVE_LOGIN_CAP) && !defined (HAVE_CYGWIN) 687 #if !defined (HAVE_LOGIN_CAP) && !defined (HAVE_CYGWIN)
666 char *path = NULL; 688 char *path = NULL;
667 #endif 689 #endif
@@ -671,7 +693,7 @@ Index: b/session.c
671 693
672 /* Initialize the environment. */ 694 /* Initialize the environment. */
673 envsize = 100; 695 envsize = 100;
674@@ -1276,6 +1280,11 @@ 696@@ -1276,6 +1280,11 @@ do_setup_env(Session *s, const char *shell)
675 child_set_env(&env, &envsize, "KRB5CCNAME", 697 child_set_env(&env, &envsize, "KRB5CCNAME",
676 s->authctxt->krb5_ccname); 698 s->authctxt->krb5_ccname);
677 #endif 699 #endif
@@ -683,7 +705,7 @@ Index: b/session.c
683 #ifdef USE_PAM 705 #ifdef USE_PAM
684 /* 706 /*
685 * Pull in any environment variables that may have 707 * Pull in any environment variables that may have
686@@ -2320,6 +2329,10 @@ 708@@ -2320,6 +2329,10 @@ session_pty_cleanup2(Session *s)
687 709
688 debug("session_pty_cleanup: session %d release %s", s->self, s->tty); 710 debug("session_pty_cleanup: session %d release %s", s->self, s->tty);
689 711
@@ -694,8 +716,8 @@ Index: b/session.c
694 /* Record that the user has logged out. */ 716 /* Record that the user has logged out. */
695 if (s->pid != 0) 717 if (s->pid != 0)
696 record_logout(s->pid, s->tty, s->pw->pw_name); 718 record_logout(s->pid, s->tty, s->pw->pw_name);
697Index: b/session.h 719diff --git a/session.h b/session.h
698=================================================================== 720index cb4f196..7e51b6a 100644
699--- a/session.h 721--- a/session.h
700+++ b/session.h 722+++ b/session.h
701@@ -26,6 +26,8 @@ 723@@ -26,6 +26,8 @@
@@ -707,7 +729,7 @@ Index: b/session.h
707 #define TTYSZ 64 729 #define TTYSZ 64
708 typedef struct Session Session; 730 typedef struct Session Session;
709 struct Session { 731 struct Session {
710@@ -60,6 +62,10 @@ 732@@ -60,6 +62,10 @@ struct Session {
711 char *name; 733 char *name;
712 char *val; 734 char *val;
713 } *env; 735 } *env;