how to get current PAM user in pam_ldap?
how开发者_Go百科 can I get the user name that auth by pam_ldap in C/c++? I found "pam_get_user" API, but how can I get the pam_handle_t for this function?
Thanks Dma
You get the handle by calling:
int pam_start(const char *service_name, const char *user,
const struct pam_conv *pam_conversation, pam_handle_t **pamh);
pamh
- is an output parameter in above api.
Check more details here.
精彩评论