From 1c98e62118df05dd87ee71711b20280faeed9053 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 27 Mar 2007 09:30:40 +0000 Subject: r21975: if we use the _bystring() version when storing, we should use it on fetch too... metze (This used to be commit d105723f063d617ef9f8394e7921749b21f1d755) --- source3/libsmb/samlogon_cache.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'source3') diff --git a/source3/libsmb/samlogon_cache.c b/source3/libsmb/samlogon_cache.c index b242d0ef55..270ad27deb 100644 --- a/source3/libsmb/samlogon_cache.c +++ b/source3/libsmb/samlogon_cache.c @@ -181,7 +181,7 @@ BOOL netsamlogon_cache_store( const char *username, NET_USER_INFO_3 *user ) NET_USER_INFO_3* netsamlogon_cache_get( TALLOC_CTX *mem_ctx, const DOM_SID *user_sid) { NET_USER_INFO_3 *user = NULL; - TDB_DATA data, key; + TDB_DATA data; prs_struct ps; fstring keystr; uint32 t; @@ -194,9 +194,7 @@ NET_USER_INFO_3* netsamlogon_cache_get( TALLOC_CTX *mem_ctx, const DOM_SID *user /* Prepare key as DOMAIN-SID/USER-RID string */ slprintf(keystr, sizeof(keystr), "%s", sid_string_static(user_sid)); DEBUG(10,("netsamlogon_cache_get: SID [%s]\n", keystr)); - key.dptr = keystr; - key.dsize = strlen(keystr)+1; - data = tdb_fetch( netsamlogon_tdb, key ); + data = tdb_fetch_bystring( netsamlogon_tdb, keystr ); if ( data.dptr ) { -- cgit