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