r23039: merge from SAMBA_3_0_26:
authorStefan Metzmacher <metze@samba.org>
Mon, 21 May 2007 13:40:27 +0000 (13:40 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:22:16 +0000 (12:22 -0500)
use a helper function to construct the TDB_DATA key
as strlen_m() is totally wrong here anyway

metze

source/nsswitch/winbindd_cache.c

index 28a0a0942288d53403ad567d31c7228d4d9b25eb..aa38bb6971349796699b13b71ad32135d08622ec 100644 (file)
@@ -3566,8 +3566,7 @@ static TDB_DATA make_tdc_key( const char *domain_name )
               
                
        asprintf( &keystr, "TRUSTDOMCACHE/%s", domain_name );
-       key.dptr = (unsigned char*)keystr;
-       key.dsize = strlen_m(keystr) + 1;
+       key = string_term_tdb_data(keystr);
        
        return key;     
 }