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 0e171a6a6..d806bb2e7 100644
--- a/monitor_wrap.c
+++ b/monitor_wrap.c
@@ -336,10 +336,10 @@ mm_auth2_read_banner(void)
336 return (banner); 336 return (banner);
337} 337}
338 338
339/* Inform the privileged process about service and style */ 339/* Inform the privileged process about service, style, and role */
340 340
341void 341void
342mm_inform_authserv(char *service, char *style) 342mm_inform_authserv(char *service, char *style, char *role)
343{ 343{
344 Buffer m; 344 Buffer m;
345 345
@@ -348,12 +348,30 @@ mm_inform_authserv(char *service, char *style)
348 buffer_init(&m); 348 buffer_init(&m);
349 buffer_put_cstring(&m, service); 349 buffer_put_cstring(&m, service);
350 buffer_put_cstring(&m, style ? style : ""); 350 buffer_put_cstring(&m, style ? style : "");
351 buffer_put_cstring(&m, role ? role : "");
351 352
352 mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_AUTHSERV, &m); 353 mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_AUTHSERV, &m);
353 354
354 buffer_free(&m); 355 buffer_free(&m);
355} 356}
356 357
358/* Inform the privileged process about role */
359
360void
361mm_inform_authrole(char *role)
362{
363 Buffer m;
364
365 debug3("%s entering", __func__);
366
367 buffer_init(&m);
368 buffer_put_cstring(&m, role ? role : "");
369
370 mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_AUTHROLE, &m);
371
372 buffer_free(&m);
373}
374
357/* Do the password authentication */ 375/* Do the password authentication */
358int 376int
359mm_auth_password(Authctxt *authctxt, char *password) 377mm_auth_password(Authctxt *authctxt, char *password)