diff options
author | Günther Deschner <gd@samba.org> | 2007-08-14 20:43:02 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:29:47 -0500 |
commit | d8248816c3f79c96a97140fb6f427ee6cb65258e (patch) | |
tree | 88989d36fce17e7c6f198a378b3405c3bafa00f3 | |
parent | a9f02f46b11b6b40f66079355e7ae13cd3824b84 (diff) | |
download | samba-d8248816c3f79c96a97140fb6f427ee6cb65258e.tar.gz samba-d8248816c3f79c96a97140fb6f427ee6cb65258e.tar.bz2 samba-d8248816c3f79c96a97140fb6f427ee6cb65258e.zip |
r24438: Use dump_data_pw() instead of dump_data() on sensitive data in winbindd.
Guenther
(This used to be commit adaa5e423dd022e3dc2cbe657146f3978fb59de3)
-rw-r--r-- | source3/nsswitch/winbindd_cache.c | 11 | ||||
-rw-r--r-- | source3/nsswitch/winbindd_creds.c | 4 | ||||
-rw-r--r-- | source3/nsswitch/winbindd_pam.c | 8 |
3 files changed, 8 insertions, 15 deletions
diff --git a/source3/nsswitch/winbindd_cache.c b/source3/nsswitch/winbindd_cache.c index b432d78936..395bee42d3 100644 --- a/source3/nsswitch/winbindd_cache.c +++ b/source3/nsswitch/winbindd_cache.c @@ -1015,12 +1015,11 @@ NTSTATUS wcache_get_creds(struct winbindd_domain *domain, *cached_salt = NULL; } -#if DEBUG_PASSWORD - dump_data(100, *cached_nt_pass, NT_HASH_LEN); + dump_data_pw("cached_nt_pass", *cached_nt_pass, NT_HASH_LEN); if (*cached_salt) { - dump_data(100, *cached_salt, NT_HASH_LEN); + dump_data_pw("cached_salt", *cached_salt, NT_HASH_LEN); } -#endif + status = centry->status; DEBUG(10,("wcache_get_creds: [Cached] - cached creds for user %s status: %s\n", @@ -1056,9 +1055,7 @@ NTSTATUS wcache_save_creds(struct winbindd_domain *domain, return NT_STATUS_INTERNAL_DB_ERROR; } -#if DEBUG_PASSWORD - dump_data(100, nt_pass, NT_HASH_LEN); -#endif + dump_data_pw("nt_pass", nt_pass, NT_HASH_LEN); centry_put_time(centry, time(NULL)); diff --git a/source3/nsswitch/winbindd_creds.c b/source3/nsswitch/winbindd_creds.c index c38b915e9f..62facb6769 100644 --- a/source3/nsswitch/winbindd_creds.c +++ b/source3/nsswitch/winbindd_creds.c @@ -117,9 +117,7 @@ NTSTATUS winbindd_store_creds(struct winbindd_domain *domain, E_md4hash(pass, nt_pass); -#if DEBUG_PASSWORD - dump_data(100, nt_pass, NT_HASH_LEN); -#endif + dump_data_pw("nt_pass", nt_pass, NT_HASH_LEN); status = wcache_save_creds(domain, mem_ctx, &cred_sid, nt_pass); if (!NT_STATUS_IS_OK(status)) { diff --git a/source3/nsswitch/winbindd_pam.c b/source3/nsswitch/winbindd_pam.c index 1196f2cbeb..2c0017cbce 100644 --- a/source3/nsswitch/winbindd_pam.c +++ b/source3/nsswitch/winbindd_pam.c @@ -686,13 +686,11 @@ 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, new_nt_pass, NT_HASH_LEN); - dump_data(100, cached_nt_pass, NT_HASH_LEN); + dump_data_pw("new_nt_pass", new_nt_pass, NT_HASH_LEN); + dump_data_pw("cached_nt_pass", cached_nt_pass, NT_HASH_LEN); if (cached_salt) { - dump_data(100, cached_salt, NT_HASH_LEN); + dump_data_pw("cached_salt", cached_salt, NT_HASH_LEN); } -#endif if (cached_salt) { /* In this case we didn't store the nt_hash itself, |