mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
util_sock: Fix memcache bug in get_mydnsfullname.
get_mydnsfullname relied on memcache_add(); memcache_lookup() working. When run from ntlm_auth, the global_cache variable in memcache is NULL, so the add and lookup both fail. In that case, just return the result of the getaddrinfo call. Jeremy, please check.
This commit is contained in:
parent
0b85f7173d
commit
1db41ff525
@ -2080,14 +2080,14 @@ const char *get_mydnsfullname(void)
|
||||
data_blob_string_const("get_mydnsfullname"),
|
||||
data_blob_string_const(res->ai_canonname));
|
||||
|
||||
freeaddrinfo(res);
|
||||
|
||||
if (!memcache_lookup(NULL, SINGLETON_CACHE,
|
||||
data_blob_string_const("get_mydnsfullname"),
|
||||
&tmp)) {
|
||||
return NULL;
|
||||
tmp = data_blob_string_const(res->ai_canonname);
|
||||
}
|
||||
|
||||
freeaddrinfo(res);
|
||||
|
||||
return (const char *)tmp.data;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user