简体   繁体   English

如何在pam_ldap中获取当前的PAM用户?

[英]how to get current PAM user in pam_ldap?

how can I get the user name that auth by pam_ldap in C/c++? 如何在C / c ++中获得pam_ldap进行身份验证的用户名? I found "pam_get_user" API, but how can I get the pam_handle_t for this function? 我找到了“ pam_get_user” API,但是如何获得此功能的pam_handle_t?

Thanks Dma 感谢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. pamh是上述api中的输出参数。

Check more details here . 在此处查看更多详细信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM