libsmb: Simplify netsamlogon_cache_get
authorVolker Lendecke <vl@samba.org>
Fri, 12 Dec 2014 10:44:06 +0000 (11:44 +0100)
committerJeremy Allison <jra@samba.org>
Fri, 12 Dec 2014 19:47:06 +0000 (20:47 +0100)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/libsmb/samlogon_cache.c

index 9e194b514209ed1b4a287740482530f21aaa2013..4e50c786882ba99851968bd4031164080888417f 100644 (file)
@@ -211,7 +211,7 @@ struct netr_SamInfo3 *netsamlogon_cache_get(TALLOC_CTX *mem_ctx, const struct do
 {
        struct netr_SamInfo3 *info3 = NULL;
        TDB_DATA data;
-       fstring keystr, tmp;
+       fstring keystr;
        enum ndr_err_code ndr_err;
        DATA_BLOB blob;
        struct netsamlogoncache_entry r;
@@ -223,7 +223,7 @@ struct netr_SamInfo3 *netsamlogon_cache_get(TALLOC_CTX *mem_ctx, const struct do
        }
 
        /* Prepare key as DOMAIN-SID/USER-RID string */
-       slprintf(keystr, sizeof(keystr), "%s", sid_to_fstring(tmp, user_sid));
+       sid_to_fstring(keystr, user_sid);
        DEBUG(10,("netsamlogon_cache_get: SID [%s]\n", keystr));
        data = tdb_fetch_bystring( netsamlogon_tdb, keystr );