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 5a9f1b52d..11e3a6956 100644
--- a/monitor_wrap.c
+++ b/monitor_wrap.c
@@ -328,10 +328,10 @@ mm_auth2_read_banner(void)
328 return (banner); 328 return (banner);
329} 329}
330 330
331/* Inform the privileged process about service and style */ 331/* Inform the privileged process about service, style, and role */
332 332
333void 333void
334mm_inform_authserv(char *service, char *style) 334mm_inform_authserv(char *service, char *style, char *role)
335{ 335{
336 Buffer m; 336 Buffer m;
337 337
@@ -340,12 +340,30 @@ mm_inform_authserv(char *service, char *style)
340 buffer_init(&m); 340 buffer_init(&m);
341 buffer_put_cstring(&m, service); 341 buffer_put_cstring(&m, service);
342 buffer_put_cstring(&m, style ? style : ""); 342 buffer_put_cstring(&m, style ? style : "");
343 buffer_put_cstring(&m, role ? role : "");
343 344
344 mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_AUTHSERV, &m); 345 mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_AUTHSERV, &m);
345 346
346 buffer_free(&m); 347 buffer_free(&m);
347} 348}
348 349
350/* Inform the privileged process about role */
351
352void
353mm_inform_authrole(char *role)
354{
355 Buffer m;
356
357 debug3("%s entering", __func__);
358
359 buffer_init(&m);
360 buffer_put_cstring(&m, role ? role : "");
361
362 mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_AUTHROLE, &m);
363
364 buffer_free(&m);
365}
366
349/* Do the password authentication */ 367/* Do the password authentication */
350int 368int
351mm_auth_password(Authctxt *authctxt, char *password) 369mm_auth_password(Authctxt *authctxt, char *password)