idmap_rfc2307: Do not return SID from unixids_to_sids on type mismatch
commit79dd4b133c37451c98fe7f7c45da881e89e91ffc
authorChristof Schmitt <cs@samba.org>
Fri, 5 Mar 2021 23:01:13 +0000 (5 16:01 -0700)
committerVolker Lendecke <vl@samba.org>
Thu, 11 Mar 2021 07:28:37 +0000 (11 07:28 +0000)
treed5f403d4b5f29ec5a15e8fb2540dbf88b8ef00e2
parentdb2afa57e4aa926b478db1be4d693edbdf4d2a23
idmap_rfc2307: Do not return SID from unixids_to_sids on type mismatch

The call to winbind_lookup_name already wrote the result in the id_map
array. The later check for the type detected a mismatch, but that did
not remove the SID from the result struct.

Change this by first assigning the SID to a temporary variable and only
write it to the id_map array after the type checks.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14663

Signed-off-by: Christof Schmitt <cs@samba.org>
source3/winbindd/idmap_rfc2307.c
source3/winbindd/winbindd_dual_srv.c