r14674: Further cleanup for cached logins, only dump hashes with DEBUG_PASSWORD.
authorGünther Deschner <gd@samba.org>
Thu, 23 Mar 2006 12:50:25 +0000 (12:50 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 16:15:43 +0000 (11:15 -0500)
Guenther
(This used to be commit 24afdda2ae7626b8c0b378d158ede391924d1274)

source3/nsswitch/winbindd_cache.c
source3/nsswitch/winbindd_creds.c
source3/nsswitch/winbindd_pam.c

index a9381504f2bbd491940522dad1212c60b46ee7f8..12592178d97068655e5667555a5eb0c22b7828c2 100644 (file)
@@ -841,7 +841,9 @@ NTSTATUS wcache_get_creds(struct winbindd_domain *domain,
        t = centry_time(centry);
        *cached_nt_pass = (const uint8 *)centry_string(centry, mem_ctx);
 
-       dump_data(10, (const char *)cached_nt_pass, NT_HASH_LEN);
+#if DEBUG_PASSWORD
+       dump_data(100, (const char *)cached_nt_pass, NT_HASH_LEN);
+#endif
        status = centry->status;
 
        DEBUG(10,("wcache_get_creds: [Cached] - cached creds for user %s status %s\n",
@@ -865,7 +867,9 @@ NTSTATUS wcache_save_creds(struct winbindd_domain *domain,
                return NT_STATUS_INTERNAL_DB_ERROR;
        }
 
+#if DEBUG_PASSWORD
        dump_data(100, (const char *)nt_pass, NT_HASH_LEN);
+#endif
 
        centry_put_time(centry, time(NULL));
        centry_put_string(centry, (const char *)nt_pass);
index d37e9019dbd680388efce3c0096e654feec00661..414dd24af9ec75171d235c2b44d2a99923f93567 100644 (file)
@@ -117,7 +117,9 @@ NTSTATUS winbindd_store_creds(struct winbindd_domain *domain,
 
                E_md4hash(pass, nt_pass);
 
+#if DEBUG_PASSWORD
                dump_data(100, (const char *)nt_pass, NT_HASH_LEN);
+#endif
 
                status = wcache_save_creds(domain, mem_ctx, &cred_sid, nt_pass);
                if (!NT_STATUS_IS_OK(status)) {
index 97689cb3dcc9314eb78599b8014410c3daf2cc62..95dcd788d32b079707bd48dea5ed236a7a38cb96 100644 (file)
@@ -716,8 +716,10 @@ NTSTATUS winbindd_dual_pam_auth_cached(struct winbindd_domain *domain,
 
        E_md4hash(state->request.data.auth.pass, new_nt_pass);
 
+#if DEBUG_PASSWORD
        dump_data(100, (const char *)new_nt_pass, NT_HASH_LEN);
        dump_data(100, (const char *)cached_nt_pass, NT_HASH_LEN);
+#endif
 
        if (!memcmp(cached_nt_pass, new_nt_pass, NT_HASH_LEN)) {