开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜