git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4b59023
)
s3: Use hex_encode_buf
author
Volker Lendecke
<vl@samba.org>
Fri, 4 May 2012 12:56:25 +0000
(14:56 +0200)
committer
Volker Lendecke
<vl@samba.org>
Fri, 4 May 2012 16:44:29 +0000
(18:44 +0200)
source3/passdb/passdb.c
patch
|
blob
|
history
diff --git
a/source3/passdb/passdb.c
b/source3/passdb/passdb.c
index 6d3f42e720ffc10fb19f75326aa05297315d1fdb..f09273705e6875fec652813b2d47f710f050345e 100644
(file)
--- 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);