开发者

how to get current PAM user in pam_ldap?

开发者 https://www.devze.com 2023-03-15 00:46 出处:网络
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?

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

精彩评论

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