summaryrefslogtreecommitdiff
path: root/monitor.c
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2015-11-24 20:45:21 +0000
committerColin Watson <cjwatson@debian.org>2015-11-24 20:49:53 +0000
commit1d6c1c2b9f5e85070c9c12442a140f592ebc0064 (patch)
tree298b8a4b9b7bd25c92dd9dcd9c6df65791a6a3da /monitor.c
parentc1f965684b54bed51e8cb1e7a2f3d2003d64d341 (diff)
parent11ff24a98751edfc86ef0eed102f840eaa50d4e1 (diff)
Drop ConsoleKit session registration patch; it was only ever enabled for Ubuntu, which no longer needs it (LP: #1334916, #1502045).
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c42
1 files changed, 0 insertions, 42 deletions
diff --git a/monitor.c b/monitor.c
index e8541b4fa..c063ad1a0 100644
--- a/monitor.c
+++ b/monitor.c
@@ -104,9 +104,6 @@
104#include "authfd.h" 104#include "authfd.h"
105#include "match.h" 105#include "match.h"
106#include "ssherr.h" 106#include "ssherr.h"
107#ifdef USE_CONSOLEKIT
108#include "consolekit.h"
109#endif
110 107
111#ifdef GSSAPI 108#ifdef GSSAPI
112static Gssctxt *gsscontext = NULL; 109static Gssctxt *gsscontext = NULL;
@@ -172,10 +169,6 @@ int mm_answer_audit_command(int, Buffer *);
172 169
173static int monitor_read_log(struct monitor *); 170static int monitor_read_log(struct monitor *);
174 171
175#ifdef USE_CONSOLEKIT
176int mm_answer_consolekit_register(int, Buffer *);
177#endif
178
179static Authctxt *authctxt; 172static Authctxt *authctxt;
180 173
181#ifdef WITH_SSH1 174#ifdef WITH_SSH1
@@ -268,9 +261,6 @@ struct mon_table mon_dispatch_postauth20[] = {
268 {MONITOR_REQ_AUDIT_EVENT, MON_PERMIT, mm_answer_audit_event}, 261 {MONITOR_REQ_AUDIT_EVENT, MON_PERMIT, mm_answer_audit_event},
269 {MONITOR_REQ_AUDIT_COMMAND, MON_PERMIT, mm_answer_audit_command}, 262 {MONITOR_REQ_AUDIT_COMMAND, MON_PERMIT, mm_answer_audit_command},
270#endif 263#endif
271#ifdef USE_CONSOLEKIT
272 {MONITOR_REQ_CONSOLEKIT_REGISTER, 0, mm_answer_consolekit_register},
273#endif
274 {0, 0, NULL} 264 {0, 0, NULL}
275}; 265};
276 266
@@ -316,9 +306,6 @@ struct mon_table mon_dispatch_postauth15[] = {
316 {MONITOR_REQ_AUDIT_EVENT, MON_PERMIT, mm_answer_audit_event}, 306 {MONITOR_REQ_AUDIT_EVENT, MON_PERMIT, mm_answer_audit_event},
317 {MONITOR_REQ_AUDIT_COMMAND, MON_PERMIT|MON_ONCE, mm_answer_audit_command}, 307 {MONITOR_REQ_AUDIT_COMMAND, MON_PERMIT|MON_ONCE, mm_answer_audit_command},
318#endif 308#endif
319#ifdef USE_CONSOLEKIT
320 {MONITOR_REQ_CONSOLEKIT_REGISTER, 0, mm_answer_consolekit_register},
321#endif
322#endif /* WITH_SSH1 */ 309#endif /* WITH_SSH1 */
323 {0, 0, NULL} 310 {0, 0, NULL}
324}; 311};
@@ -501,9 +488,6 @@ monitor_child_postauth(struct monitor *pmonitor)
501 monitor_permit(mon_dispatch, MONITOR_REQ_PTY, 1); 488 monitor_permit(mon_dispatch, MONITOR_REQ_PTY, 1);
502 monitor_permit(mon_dispatch, MONITOR_REQ_PTYCLEANUP, 1); 489 monitor_permit(mon_dispatch, MONITOR_REQ_PTYCLEANUP, 1);
503 } 490 }
504#ifdef USE_CONSOLEKIT
505 monitor_permit(mon_dispatch, MONITOR_REQ_CONSOLEKIT_REGISTER, 1);
506#endif
507 491
508 for (;;) 492 for (;;)
509 monitor_read(pmonitor, mon_dispatch, NULL); 493 monitor_read(pmonitor, mon_dispatch, NULL);
@@ -2207,29 +2191,3 @@ mm_answer_gss_updatecreds(int socket, Buffer *m) {
2207 2191
2208#endif /* GSSAPI */ 2192#endif /* GSSAPI */
2209 2193
2210#ifdef USE_CONSOLEKIT
2211int
2212mm_answer_consolekit_register(int sock, Buffer *m)
2213{
2214 Session *s;
2215 char *tty, *display;
2216 char *cookie = NULL;
2217
2218 debug3("%s entering", __func__);
2219
2220 tty = buffer_get_string(m, NULL);
2221 display = buffer_get_string(m, NULL);
2222 s = session_by_tty(tty);
2223 if (s != NULL)
2224 cookie = consolekit_register(s, display);
2225 buffer_clear(m);
2226 buffer_put_cstring(m, cookie != NULL ? cookie : "");
2227 mm_request_send(sock, MONITOR_ANS_CONSOLEKIT_REGISTER, m);
2228
2229 free(cookie);
2230 free(display);
2231 free(tty);
2232
2233 return (0);
2234}
2235#endif /* USE_CONSOLEKIT */