diff options
author | Volker Lendecke <vl@samba.org> | 2012-05-04 14:56:25 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2012-05-04 20:32:37 +0200 |
commit | 64ed94cf94016ac88b9daae50926619ce9ea286e (patch) | |
tree | 8176c5c2d58b231e622bd9326d055a85ecd35e78 /source3/passdb | |
parent | b0221ce0d83cab8832ca372a8b5c5859bb29dc89 (diff) | |
download | samba-64ed94cf94016ac88b9daae50926619ce9ea286e.tar.gz samba-64ed94cf94016ac88b9daae50926619ce9ea286e.tar.bz2 samba-64ed94cf94016ac88b9daae50926619ce9ea286e.zip |
s3: Use hex_encode_buf
Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Fri May 4 20:32:37 CEST 2012 on sn-devel-104
Diffstat (limited to 'source3/passdb')
-rw-r--r-- | source3/passdb/passdb.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c index f09273705e..71afb339fa 100644 --- a/source3/passdb/passdb.c +++ b/source3/passdb/passdb.c @@ -430,10 +430,7 @@ bool pdb_gethexpwd(const char *p, unsigned char *pwd) void pdb_sethexhours(char *p, const unsigned char *hours) { if (hours != NULL) { - int i; - for (i = 0; i < 21; i++) { - slprintf(&p[i*2], 3, "%02X", hours[i]); - } + hex_encode_buf(p, hours, 21); } else { strlcpy(p, "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF", 44); } |