enum wbcSidType type;
fstring full_name;
struct wbcDomainSid wsid;
- char *sid_str = NULL;
+ char sid_str[WBC_SID_STRING_BUFLEN];
struct dom_sid user_sid;
uint32_t num_groups;
gid_t *groups = NULL;
return false;
}
- wbc_status = wbcSidToString(&wsid, &sid_str);
- if (!WBC_ERROR_IS_OK(wbc_status)) {
- return false;
- }
+ wbcSidToStringBuf(&wsid, sid_str, sizeof(sid_str));
if (type != WBC_SID_NAME_USER) {
- wbcFreeMemory(sid_str);
DEBUG(1, ("%s is not a user\n", full_name));
return false;
}
return false;
}
- wbcFreeMemory(sid_str);
- sid_str = NULL;
-
init_user_token(token, &user_sid);
/* And now the groups winbind knows about */
return false;
}
- wbc_status = wbcSidToString(&wsid, &sid_str);
- if (!WBC_ERROR_IS_OK(wbc_status)) {
- wbcFreeMemory(groups);
- return false;
- }
+ wbcSidToStringBuf(&wsid, sid_str, sizeof(sid_str));
DEBUG(3, (" %s\n", sid_str));
string_to_sid(&sid, sid_str);
- wbcFreeMemory(sid_str);
- sid_str = NULL;
-
add_sid_to_token(token, &sid);
}
wbcFreeMemory(groups);