diff options
Diffstat (limited to 'monitor_wrap.c')
-rw-r--r-- | monitor_wrap.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/monitor_wrap.c b/monitor_wrap.c index fc6bbcd2e..f46be660d 100644 --- a/monitor_wrap.c +++ b/monitor_wrap.c | |||
@@ -318,10 +318,10 @@ mm_auth2_read_banner(void) | |||
318 | return (banner); | 318 | return (banner); |
319 | } | 319 | } |
320 | 320 | ||
321 | /* Inform the privileged process about service and style */ | 321 | /* Inform the privileged process about service, style, and role */ |
322 | 322 | ||
323 | void | 323 | void |
324 | mm_inform_authserv(char *service, char *style) | 324 | mm_inform_authserv(char *service, char *style, char *role) |
325 | { | 325 | { |
326 | Buffer m; | 326 | Buffer m; |
327 | 327 | ||
@@ -330,12 +330,30 @@ mm_inform_authserv(char *service, char *style) | |||
330 | buffer_init(&m); | 330 | buffer_init(&m); |
331 | buffer_put_cstring(&m, service); | 331 | buffer_put_cstring(&m, service); |
332 | buffer_put_cstring(&m, style ? style : ""); | 332 | buffer_put_cstring(&m, style ? style : ""); |
333 | buffer_put_cstring(&m, role ? role : ""); | ||
333 | 334 | ||
334 | mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_AUTHSERV, &m); | 335 | mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_AUTHSERV, &m); |
335 | 336 | ||
336 | buffer_free(&m); | 337 | buffer_free(&m); |
337 | } | 338 | } |
338 | 339 | ||
340 | /* Inform the privileged process about role */ | ||
341 | |||
342 | void | ||
343 | mm_inform_authrole(char *role) | ||
344 | { | ||
345 | Buffer m; | ||
346 | |||
347 | debug3("%s entering", __func__); | ||
348 | |||
349 | buffer_init(&m); | ||
350 | buffer_put_cstring(&m, role ? role : ""); | ||
351 | |||
352 | mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_AUTHROLE, &m); | ||
353 | |||
354 | buffer_free(&m); | ||
355 | } | ||
356 | |||
339 | /* Do the password authentication */ | 357 | /* Do the password authentication */ |
340 | int | 358 | int |
341 | mm_auth_password(Authctxt *authctxt, char *password) | 359 | mm_auth_password(Authctxt *authctxt, char *password) |