From 64ed94cf94016ac88b9daae50926619ce9ea286e Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 4 May 2012 14:56:25 +0200 Subject: s3: Use hex_encode_buf Autobuild-User: Volker Lendecke Autobuild-Date: Fri May 4 20:32:37 CEST 2012 on sn-devel-104 --- source3/passdb/passdb.c | 5 +---- 1 file changed, 1 insertion(+), 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); } -- cgit