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