mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
The previous commit contained a stupid mistake: ctxt->pam_[cp]sock was
initialized after the call to pthread_create() instead of before. It just happened to work with threads enabled because ctxt is shared, but of course it doesn't work when we use a child process instead of threads.
This commit is contained in:
parent
148f804340
commit
d46e273b14
1 changed files with 2 additions and 2 deletions
|
|
@ -294,6 +294,8 @@ pam_init_ctx(Authctxt *authctxt)
|
|||
xfree(ctxt);
|
||||
return (NULL);
|
||||
}
|
||||
ctxt->pam_psock = socks[0];
|
||||
ctxt->pam_csock = socks[1];
|
||||
if (pthread_create(&ctxt->pam_thread, NULL, pam_thread, ctxt) == -1) {
|
||||
error("PAM: failed to start authentication thread: %s",
|
||||
strerror(errno));
|
||||
|
|
@ -302,8 +304,6 @@ pam_init_ctx(Authctxt *authctxt)
|
|||
xfree(ctxt);
|
||||
return (NULL);
|
||||
}
|
||||
ctxt->pam_psock = socks[0];
|
||||
ctxt->pam_csock = socks[1];
|
||||
fatal_add_cleanup(pam_thread_cleanup, ctxt);
|
||||
return (ctxt);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue