]> git.samba.org - obnox/samba/samba-obnox.git/blobdiff - source3/libsmb/samlogon_cache.c
libsmb: Only print decoded netsamlogon cache entries
[obnox/samba/samba-obnox.git] / source3 / libsmb / samlogon_cache.c
index 0041a77c888a166f2048005d1f4bf1b89b67c945..9e194b514209ed1b4a287740482530f21aaa2013 100644 (file)
@@ -241,10 +241,6 @@ struct netr_SamInfo3 *netsamlogon_cache_get(TALLOC_CTX *mem_ctx, const struct do
        ndr_err = ndr_pull_struct_blob(&blob, mem_ctx, &r,
                                      (ndr_pull_flags_fn_t)ndr_pull_netsamlogoncache_entry);
 
-       if (DEBUGLEVEL >= 10) {
-               NDR_PRINT_DEBUG(netsamlogoncache_entry, &r);
-       }
-
        if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
                DEBUG(0,("netsamlogon_cache_get: failed to pull entry from cache\n"));
                tdb_delete_bystring(netsamlogon_tdb, keystr);
@@ -252,6 +248,10 @@ struct netr_SamInfo3 *netsamlogon_cache_get(TALLOC_CTX *mem_ctx, const struct do
                goto done;
        }
 
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_DEBUG(netsamlogoncache_entry, &r);
+       }
+
        info3 = (struct netr_SamInfo3 *)talloc_memdup(mem_ctx, &r.info3,
                                                      sizeof(r.info3));