summaryrefslogtreecommitdiff
path: root/libcli/auth
diff options
context:
space:
mode:
authorJoseph Sutton <josephsutton@catalyst.net.nz>2022-08-02 14:35:50 +1200
committerAndrew Bartlett <abartlet@samba.org>2022-09-12 23:07:38 +0000
commit6edf88f5c40421b9881666a2e78038ea9c547c24 (patch)
tree10bececea8c56a472f5632a99c4aa1ed543066f2 /libcli/auth
parent03a50d8f7d872b6ef701d1207061c88b73d171bb (diff)
downloadsamba-6edf88f5c40421b9881666a2e78038ea9c547c24.tar.gz
libcli:auth: Keep passwords from convert_string_talloc() secret
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'libcli/auth')
-rw-r--r--libcli/auth/smbencrypt.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libcli/auth/smbencrypt.c b/libcli/auth/smbencrypt.c
index 7abf6613d80..8492202ea93 100644
--- a/libcli/auth/smbencrypt.c
+++ b/libcli/auth/smbencrypt.c
@@ -975,6 +975,7 @@ bool decode_pw_buffer(TALLOC_CTX *ctx,
DBG_ERR("Failed to convert incoming password\n");
return false;
}
+ talloc_keep_secret(*pp_new_pwrd);
#ifdef DEBUG_PASSWORD
DEBUG(100,("decode_pw_buffer: new_pwrd: "));
@@ -1067,6 +1068,7 @@ bool decode_pwd_string_from_buffer514(TALLOC_CTX *mem_ctx,
if (!ok) {
return false;
}
+ talloc_keep_secret(decoded_password->data);
return true;
}