URL:
https://github.com/SSSD/sssd/pull/44
Title: #44: libwbclient-sssd: update interface to version 0.13
sumit-bose commented:
"""
On Thu, Oct 13, 2016 at 01:45:34AM -0700, fidencio wrote:
fidencio commented on this pull request.
I didn't run any kind of tests/CI/etc.
The code looks good apart from one minor comment.
I'm not moving the label to "Request changes", as the change may not be
needed.
> + case WBC_ID_TYPE_UID:
+ wbc_status = wbcUidToSid(ids[c].id.uid, &sids[c]);
+ break;
+ case WBC_ID_TYPE_GID:
+ wbc_status = wbcGidToSid(ids[c].id.gid, &sids[c]);
+ break;
+ default:
+ wbc_status = WBC_ERR_INVALID_PARAM;
+ }
+
+ if (!WBC_ERROR_IS_OK(wbc_status)) {
+ sids[c] = (struct wbcDomainSid) {0};
+ };
+ }
+
+ return WBC_ERR_SUCCESS;
@sumit-bose,
I didn't get why the function *always* return WBC_ERR_SUCCESS. Is it intended or
shall we return the wbc_status when WBC_ERROR_IS_OK() fails?
no, this call converts a list of POSIX IDs to SIDs. If a single
translation fails the returned SID in the list is just '(struct
wbcDomainSid) {0}'. The return value of the call is just used to
indicate if something fundamentally went wrong.
HTH
bye,
Sumit
"""
See the full comment at
https://github.com/SSSD/sssd/pull/44#issuecomment-253460158