diff options
author | Volker Lendecke <vl@samba.org> | 2015-05-08 10:12:21 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2015-05-13 01:44:20 +0200 |
commit | c8e9574f41f912b26a9947c4973752f24c7ad904 (patch) | |
tree | 67aca51d76d99139c945ac91d5360e2195716622 /source4/utils | |
parent | 7ceded5ed7cc8b061c16f65c33c3cfc50ebdcc69 (diff) | |
download | samba-c8e9574f41f912b26a9947c4973752f24c7ad904.tar.gz |
ntlm_auth: Remove two uses of hex_encode()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source4/utils')
-rw-r--r-- | source4/utils/ntlm_auth.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/source4/utils/ntlm_auth.c b/source4/utils/ntlm_auth.c index f44e782f664..f7c95ebff70 100644 --- a/source4/utils/ntlm_auth.c +++ b/source4/utils/ntlm_auth.c @@ -796,8 +796,6 @@ static void manage_ntlm_server_1_request(enum stdio_helper_mode stdio_helper_mod SAFE_FREE(error_string); } else { static char zeros[16]; - char *hex_lm_key; - char *hex_user_session_key; mux_printf(mux_id, "Authenticated: Yes\n"); @@ -805,22 +803,22 @@ static void manage_ntlm_server_1_request(enum stdio_helper_mode stdio_helper_mod && lm_key.length && (memcmp(zeros, lm_key.data, lm_key.length) != 0)) { - hex_encode(lm_key.data, - lm_key.length, - &hex_lm_key); + char hex_lm_key[lm_key.length*2+1]; + hex_encode_buf(hex_lm_key, lm_key.data, + lm_key.length); mux_printf(mux_id, "LANMAN-Session-Key: %s\n", hex_lm_key); - SAFE_FREE(hex_lm_key); } if (ntlm_server_1_user_session_key && user_session_key.length && (memcmp(zeros, user_session_key.data, user_session_key.length) != 0)) { - hex_encode(user_session_key.data, - user_session_key.length, - &hex_user_session_key); + char hex_user_session_key[ + user_session_key.length*2+1]; + hex_encode_buf(hex_user_session_key, + user_session_key.data, + user_session_key.length); mux_printf(mux_id, "User-Session-Key: %s\n", hex_user_session_key); - SAFE_FREE(hex_user_session_key); } } } |