Changeset View
Changeset View
Standalone View
Standalone View
crypto/openssh/monitor_wrap.c
Context not available. | |||||
return (0); | return (0); | ||||
} | } | ||||
login_cap_t * | |||||
mm_login_getpwclass(const struct passwd *pwent) | |||||
{ | |||||
Buffer m; | |||||
login_cap_t *lc; | |||||
u_int len; | |||||
debug3("%s entering", __func__); | |||||
buffer_init(&m); | |||||
buffer_put_string(&m, pwent, sizeof(struct passwd)); | |||||
buffer_put_cstring(&m, pwent->pw_name); | |||||
buffer_put_cstring(&m, "*"); | |||||
#ifdef HAVE_STRUCT_PASSWD_PW_GECOS | |||||
buffer_put_cstring(&m, pwent->pw_gecos); | |||||
#endif | |||||
#ifdef HAVE_STRUCT_PASSWD_PW_CLASS | |||||
buffer_put_cstring(&m, pwent->pw_class); | |||||
#endif | |||||
buffer_put_cstring(&m, pwent->pw_dir); | |||||
buffer_put_cstring(&m, pwent->pw_shell); | |||||
mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_GETPWCLASS, &m); | |||||
debug3("%s: waiting for MONITOR_ANS_GETPWCLASS", __func__); | |||||
mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_GETPWCLASS, &m); | |||||
if (buffer_get_char(&m) == 0) { | |||||
lc = NULL; | |||||
goto out; | |||||
} | |||||
lc = buffer_get_string(&m, &len); | |||||
if (len != sizeof(login_cap_t)) | |||||
fatal("%s: login_cap_t size mismatch", __func__); | |||||
lc->lc_class = buffer_get_string(&m, NULL); | |||||
lc->lc_cap = buffer_get_string(&m, NULL); | |||||
lc->lc_style = buffer_get_string(&m, NULL); | |||||
out: | |||||
buffer_free(&m); | |||||
return (lc); | |||||
} | |||||
struct passwd * | struct passwd * | ||||
mm_getpwnamallow(const char *username) | mm_getpwnamallow(const char *username) | ||||
{ | { | ||||
Context not available. |