Hi,
this patch fixes an issue in SSSD's implementation of libwbclient.
wbcSidsToUnixIds() translates a list of SID to POSIX IDs and it is
expected that if one SID cannot be mapped the related output entry
should just get type WBC_ID_TYPE_NOT_SPECIFIED. Currently the request
fail completely if one SID cannot be mapped.
To test, use 'wbinfo --sids-to-unix-ids' with an invalid SID.
Without fix:
$ wbinfo --sids-to-unix-ids=S-1-5-21-3692237560-1981608775-3610128199-1104,S-1-5-21-3692237560-1981608775-3610128199-5
wbcSidsToUnixIds failed: WBC_ERR_UNKNOWN_FAILURE
wbinfo_sids_to_unix_ids failed
With fix:
$ wbinfo --sids-to-unix-ids=S-1-5-21-3692237560-1981608775-3610128199-1104,S-1-5-21-3692237560-1981608775-3610128199-5
S-1-5-21-3692237560-1981608775-3610128199-1104 -> uid 700201104
S-1-5-21-3692237560-1981608775-3610128199-5 -> unmapped
Even with completely random SIDs you should see a proper output:
$ wbinfo --sids-to-unix-ids=S-2-3-4,S-5-6-7
S-2-3-4 -> unmapped
S-5-6-7 -> unmapped
bye,
Sumit