mirror of
https://github.com/3proxy/3proxy.git
synced 2025-02-23 10:35:40 +08:00
pam_auth; lock only pam_start
This commit is contained in:
parent
32ff114787
commit
556fea670e
@ -94,6 +94,7 @@ static int pamfunc(struct clientparam *param)
|
||||
{
|
||||
retval = pam_start ((char *)service, "3proxy@" , &conv, &pamh);
|
||||
}
|
||||
pthread_mutex_unlock(&pam_mutex);
|
||||
if (retval == PAM_SUCCESS)
|
||||
retval = pam_set_item (pamh, PAM_USER, param->username);
|
||||
/*fprintf(stderr,"pam_set_item1 rc=%d\n",retval);*/
|
||||
@ -111,7 +112,6 @@ static int pamfunc(struct clientparam *param)
|
||||
retval = pam_end (pamh, retval);
|
||||
if (retval != PAM_SUCCESS)
|
||||
{ pamh = NULL; }
|
||||
pthread_mutex_unlock(&pam_mutex);
|
||||
|
||||
return rc;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user