s3:winbind: Refactor winbindd_dual_pam_auth_cached(), delay out variable assignment
authorSamuel Cabrero <scabrero@samba.org>
Wed, 30 Mar 2022 16:12:46 +0000 (18:12 +0200)
committerJeremy Allison <jra@samba.org>
Fri, 8 Apr 2022 20:13:37 +0000 (20:13 +0000)
commit6e017e217e620add239de5397a88415afad0b990
treec83f8ad2a5ebcd8b24f8c1eb54c21479a1548e7a
parent7a3888113a62f3263cb887c75fc748d972a709e5
s3:winbind: Refactor winbindd_dual_pam_auth_cached(), delay out variable assignment

Delay the assignment of the out varible and assign it only if
returning NT_STATUS_OK, the caller does not use the returned
netr_SamInfo3 if the function does not return NT_STATUS_OK.

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/winbindd/winbindd_pam.c