user_info->full_name = talloc_strdup(user_info,
user->base.full_name.string);
+ if (user_info->full_name == NULL) {
+ /* this might fail so we dont check the return code */
+ wcache_query_user_fullname(domain,
+ mem_ctx,
+ user_sid,
+ &user_info->full_name);
+ }
+
status = NT_STATUS_OK;
goto done;
}
sid_compose(&user_sid, info3->base.domain_sid,
info3->base.rid);
+ if (info3->base.full_name.string == NULL) {
+ struct netr_SamInfo3 *cached_info3;
+
+ cached_info3 = netsamlogon_cache_get(state->mem_ctx,
+ &user_sid);
+ if (cached_info3 != NULL &&
+ cached_info3->base.full_name.string != NULL) {
+ info3->base.full_name.string =
+ talloc_strdup(info3,
+ cached_info3->base.full_name.string);
+ } else {
+
+ /* this might fail so we dont check the return code */
+ wcache_query_user_fullname(domain,
+ info3,
+ &user_sid,
+ &info3->base.full_name.string);
+ }
+ }
+
wcache_invalidate_samlogon(find_domain_from_name(name_domain),
&user_sid);
netsamlogon_cache_store(name_user, info3);
sid_compose(&user_sid, (*info3)->base.domain_sid,
(*info3)->base.rid);
+
+ if ((*info3)->base.full_name.string == NULL) {
+ struct netr_SamInfo3 *cached_info3;
+
+ cached_info3 = netsamlogon_cache_get(mem_ctx,
+ &user_sid);
+ if (cached_info3 != NULL &&
+ cached_info3->base.full_name.string != NULL) {
+ (*info3)->base.full_name.string =
+ talloc_strdup(*info3,
+ cached_info3->base.full_name.string);
+ } else {
+
+ /* this might fail so we dont check the return code */
+ wcache_query_user_fullname(domain,
+ *info3,
+ &user_sid,
+ &(*info3)->base.full_name.string);
+ }
+ }
+
wcache_invalidate_samlogon(find_domain_from_name(name_domain),
&user_sid);
netsamlogon_cache_store(name_user, *info3);