summaryrefslogtreecommitdiff
path: root/monitor_wrap.c
diff options
context:
space:
mode:
Diffstat (limited to 'monitor_wrap.c')
-rw-r--r--monitor_wrap.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/monitor_wrap.c b/monitor_wrap.c
index 60b987dce..f75dc9d71 100644
--- a/monitor_wrap.c
+++ b/monitor_wrap.c
@@ -318,10 +318,10 @@ mm_auth2_read_banner(void)
318 return (banner); 318 return (banner);
319} 319}
320 320
321/* Inform the privileged process about service and style */ 321/* Inform the privileged process about service, style, and role */
322 322
323void 323void
324mm_inform_authserv(char *service, char *style) 324mm_inform_authserv(char *service, char *style, char *role)
325{ 325{
326 Buffer m; 326 Buffer m;
327 327
@@ -330,12 +330,30 @@ mm_inform_authserv(char *service, char *style)
330 buffer_init(&m); 330 buffer_init(&m);
331 buffer_put_cstring(&m, service); 331 buffer_put_cstring(&m, service);
332 buffer_put_cstring(&m, style ? style : ""); 332 buffer_put_cstring(&m, style ? style : "");
333 buffer_put_cstring(&m, role ? role : "");
333 334
334 mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_AUTHSERV, &m); 335 mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_AUTHSERV, &m);
335 336
336 buffer_free(&m); 337 buffer_free(&m);
337} 338}
338 339
340/* Inform the privileged process about role */
341
342void
343mm_inform_authrole(char *role)
344{
345 Buffer m;
346
347 debug3("%s entering", __func__);
348
349 buffer_init(&m);
350 buffer_put_cstring(&m, role ? role : "");
351
352 mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_AUTHROLE, &m);
353
354 buffer_free(&m);
355}
356
339/* Do the password authentication */ 357/* Do the password authentication */
340int 358int
341mm_auth_password(Authctxt *authctxt, char *password) 359mm_auth_password(Authctxt *authctxt, char *password)