From: Volker Lendecke Date: Fri, 4 May 2012 12:56:25 +0000 (+0200) Subject: s3: Use hex_encode_buf X-Git-Tag: samba-4.0.0alpha21~339 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=64ed94cf94016ac88b9daae50926619ce9ea286e;p=thirdparty%2Fsamba.git s3: Use hex_encode_buf Autobuild-User: Volker Lendecke Autobuild-Date: Fri May 4 20:32:37 CEST 2012 on sn-devel-104 --- diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c index f09273705e6..71afb339fa6 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); }