diff options
author | Stefan Metzmacher <metze@samba.org> | 2007-03-27 09:30:40 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:18:54 -0500 |
commit | 1c98e62118df05dd87ee71711b20280faeed9053 (patch) | |
tree | 391466bd8b26e7036516a01cc4af585072d75fbd /source3 | |
parent | 38afa759654a8875babf00d86adee46be807d9e0 (diff) | |
download | samba-1c98e62118df05dd87ee71711b20280faeed9053.tar.gz samba-1c98e62118df05dd87ee71711b20280faeed9053.tar.bz2 samba-1c98e62118df05dd87ee71711b20280faeed9053.zip |
r21975: if we use the _bystring() version when storing, we should use it on fetch too...
metze
(This used to be commit d105723f063d617ef9f8394e7921749b21f1d755)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/libsmb/samlogon_cache.c | 6 |
1 files changed, 2 insertions, 4 deletions
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 ) { |