summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/passdb/passdb.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c
index 6d3f42e720..f09273705e 100644
--- a/source3/passdb/passdb.c
+++ b/source3/passdb/passdb.c
@@ -381,9 +381,7 @@ uint32_t pdb_decode_acct_ctrl(const char *p)
void pdb_sethexpwd(char p[33], const unsigned char *pwd, uint32_t acct_ctrl)
{
if (pwd != NULL) {
- int i;
- for (i = 0; i < 16; i++)
- slprintf(&p[i*2], 3, "%02X", pwd[i]);
+ hex_encode_buf(p, pwd, 16);
} else {
if (acct_ctrl & ACB_PWNOTREQ)
strlcpy(p, "NO PASSWORDXXXXXXXXXXXXXXXXXXXXX", 33);