summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2012-05-04 14:56:25 +0200
committerVolker Lendecke <vl@samba.org>2012-05-04 18:44:29 +0200
commitb0221ce0d83cab8832ca372a8b5c5859bb29dc89 (patch)
tree8cc5eeaef63694a6723aef9302bca4b876d7db89 /source3
parent4b59023123247896bb590943a3dafc79bc688d15 (diff)
downloadsamba-b0221ce0d83cab8832ca372a8b5c5859bb29dc89.tar.gz
samba-b0221ce0d83cab8832ca372a8b5c5859bb29dc89.tar.bz2
samba-b0221ce0d83cab8832ca372a8b5c5859bb29dc89.zip
s3: Use hex_encode_buf
Diffstat (limited to 'source3')
-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);