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 20c37ebd2..d69e4cce7 100644
--- a/monitor_wrap.c
+++ b/monitor_wrap.c
@@ -280,10 +280,10 @@ mm_auth2_read_banner(void)
280 return (banner); 280 return (banner);
281} 281}
282 282
283/* Inform the privileged process about service and style */ 283/* Inform the privileged process about service, style, and role */
284 284
285void 285void
286mm_inform_authserv(char *service, char *style) 286mm_inform_authserv(char *service, char *style, char *role)
287{ 287{
288 Buffer m; 288 Buffer m;
289 289
@@ -292,12 +292,30 @@ mm_inform_authserv(char *service, char *style)
292 buffer_init(&m); 292 buffer_init(&m);
293 buffer_put_cstring(&m, service); 293 buffer_put_cstring(&m, service);
294 buffer_put_cstring(&m, style ? style : ""); 294 buffer_put_cstring(&m, style ? style : "");
295 buffer_put_cstring(&m, role ? role : "");
295 296
296 mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_AUTHSERV, &m); 297 mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_AUTHSERV, &m);
297 298
298 buffer_free(&m); 299 buffer_free(&m);
299} 300}
300 301
302/* Inform the privileged process about role */
303
304void
305mm_inform_authrole(char *role)
306{
307 Buffer m;
308
309 debug3("%s entering", __func__);
310
311 buffer_init(&m);
312 buffer_put_cstring(&m, role ? role : "");
313
314 mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_AUTHROLE, &m);
315
316 buffer_free(&m);
317}
318
301/* Do the password authentication */ 319/* Do the password authentication */
302int 320int
303mm_auth_password(Authctxt *authctxt, char *password) 321mm_auth_password(Authctxt *authctxt, char *password)