[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-test-1593-g1db41ff

Kai Blin kai at samba.org
Mon Jan 21 12:28:24 GMT 2008


The branch, v3-2-test has been updated
       via  1db41ff52565e9f336a22fb9ffd80d51677e023b (commit)
      from  0b85f7173d0770f8d9a0bac9e43355eb45bc181f (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test


- Log -----------------------------------------------------------------
commit 1db41ff52565e9f336a22fb9ffd80d51677e023b
Author: Kai Blin <kai at samba.org>
Date:   Mon Jan 21 13:18:38 2008 +0100

    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.

-----------------------------------------------------------------------

Summary of changes:
 source/lib/util_sock.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/lib/util_sock.c b/source/lib/util_sock.c
index 1042811..f524d0d 100644
--- a/source/lib/util_sock.c
+++ b/source/lib/util_sock.c
@@ -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;
 }
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list