diff options
Diffstat (limited to 'monitor_wrap.c')
-rw-r--r-- | monitor_wrap.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/monitor_wrap.c b/monitor_wrap.c index e749efc18..7b2d06c65 100644 --- a/monitor_wrap.c +++ b/monitor_wrap.c | |||
@@ -331,10 +331,10 @@ mm_auth2_read_banner(void) | |||
331 | return (banner); | 331 | return (banner); |
332 | } | 332 | } |
333 | 333 | ||
334 | /* Inform the privileged process about service and style */ | 334 | /* Inform the privileged process about service, style, and role */ |
335 | 335 | ||
336 | void | 336 | void |
337 | mm_inform_authserv(char *service, char *style) | 337 | mm_inform_authserv(char *service, char *style, char *role) |
338 | { | 338 | { |
339 | Buffer m; | 339 | Buffer m; |
340 | 340 | ||
@@ -343,12 +343,30 @@ mm_inform_authserv(char *service, char *style) | |||
343 | buffer_init(&m); | 343 | buffer_init(&m); |
344 | buffer_put_cstring(&m, service); | 344 | buffer_put_cstring(&m, service); |
345 | buffer_put_cstring(&m, style ? style : ""); | 345 | buffer_put_cstring(&m, style ? style : ""); |
346 | buffer_put_cstring(&m, role ? role : ""); | ||
346 | 347 | ||
347 | mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_AUTHSERV, &m); | 348 | mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_AUTHSERV, &m); |
348 | 349 | ||
349 | buffer_free(&m); | 350 | buffer_free(&m); |
350 | } | 351 | } |
351 | 352 | ||
353 | /* Inform the privileged process about role */ | ||
354 | |||
355 | void | ||
356 | mm_inform_authrole(char *role) | ||
357 | { | ||
358 | Buffer m; | ||
359 | |||
360 | debug3("%s entering", __func__); | ||
361 | |||
362 | buffer_init(&m); | ||
363 | buffer_put_cstring(&m, role ? role : ""); | ||
364 | |||
365 | mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_AUTHROLE, &m); | ||
366 | |||
367 | buffer_free(&m); | ||
368 | } | ||
369 | |||
352 | /* Do the password authentication */ | 370 | /* Do the password authentication */ |
353 | int | 371 | int |
354 | mm_auth_password(struct ssh *ssh, char *password) | 372 | mm_auth_password(struct ssh *ssh, char *password) |