diff options
author | Colin Watson <cjwatson@debian.org> | 2013-05-09 09:32:45 +0100 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2013-05-09 09:32:45 +0100 |
commit | 2bf02f2429738d820fd98de1078b5265696dbbb5 (patch) | |
tree | 5dc37df17c0e03f77b544eb87c0b5de9d6647ed7 /monitor.c | |
parent | 0d6a7068412ff99144c5755d741dee7dd9cd97b2 (diff) |
Fix consolekit mismerges in monitor.c and monitor_wrap.c.
Diffstat (limited to 'monitor.c')
-rw-r--r-- | monitor.c | 56 |
1 files changed, 28 insertions, 28 deletions
@@ -2248,34 +2248,6 @@ mm_answer_gss_sign(int socket, Buffer *m) | |||
2248 | buffer_put_int(m, major); | 2248 | buffer_put_int(m, major); |
2249 | buffer_put_string(m, hash.value, hash.length); | 2249 | buffer_put_string(m, hash.value, hash.length); |
2250 | 2250 | ||
2251 | #ifdef USE_CONSOLEKIT | ||
2252 | int | ||
2253 | mm_answer_consolekit_register(int sock, Buffer *m) | ||
2254 | { | ||
2255 | Session *s; | ||
2256 | char *tty, *display; | ||
2257 | char *cookie = NULL; | ||
2258 | |||
2259 | debug3("%s entering", __func__); | ||
2260 | |||
2261 | tty = buffer_get_string(m, NULL); | ||
2262 | display = buffer_get_string(m, NULL); | ||
2263 | s = session_by_tty(tty); | ||
2264 | if (s != NULL) | ||
2265 | cookie = consolekit_register(s, display); | ||
2266 | buffer_clear(m); | ||
2267 | buffer_put_cstring(m, cookie != NULL ? cookie : ""); | ||
2268 | mm_request_send(sock, MONITOR_ANS_CONSOLEKIT_REGISTER, m); | ||
2269 | |||
2270 | if (cookie != NULL) | ||
2271 | xfree(cookie); | ||
2272 | xfree(display); | ||
2273 | xfree(tty); | ||
2274 | |||
2275 | return (0); | ||
2276 | } | ||
2277 | #endif /* USE_CONSOLEKIT */ | ||
2278 | |||
2279 | mm_request_send(socket, MONITOR_ANS_GSSSIGN, m); | 2251 | mm_request_send(socket, MONITOR_ANS_GSSSIGN, m); |
2280 | 2252 | ||
2281 | gss_release_buffer(&minor, &hash); | 2253 | gss_release_buffer(&minor, &hash); |
@@ -2516,3 +2488,31 @@ mm_answer_jpake_check_confirm(int sock, Buffer *m) | |||
2516 | } | 2488 | } |
2517 | 2489 | ||
2518 | #endif /* JPAKE */ | 2490 | #endif /* JPAKE */ |
2491 | |||
2492 | #ifdef USE_CONSOLEKIT | ||
2493 | int | ||
2494 | mm_answer_consolekit_register(int sock, Buffer *m) | ||
2495 | { | ||
2496 | Session *s; | ||
2497 | char *tty, *display; | ||
2498 | char *cookie = NULL; | ||
2499 | |||
2500 | debug3("%s entering", __func__); | ||
2501 | |||
2502 | tty = buffer_get_string(m, NULL); | ||
2503 | display = buffer_get_string(m, NULL); | ||
2504 | s = session_by_tty(tty); | ||
2505 | if (s != NULL) | ||
2506 | cookie = consolekit_register(s, display); | ||
2507 | buffer_clear(m); | ||
2508 | buffer_put_cstring(m, cookie != NULL ? cookie : ""); | ||
2509 | mm_request_send(sock, MONITOR_ANS_CONSOLEKIT_REGISTER, m); | ||
2510 | |||
2511 | if (cookie != NULL) | ||
2512 | xfree(cookie); | ||
2513 | xfree(display); | ||
2514 | xfree(tty); | ||
2515 | |||
2516 | return (0); | ||
2517 | } | ||
2518 | #endif /* USE_CONSOLEKIT */ | ||