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:
b0221ce
)
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 18:32:37 +0000
(20:32 +0200)
Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Fri May 4 20:32:37 CEST 2012 on sn-devel-104
source3/passdb/passdb.c
patch
|
blob
|
history
diff --git
a/source3/passdb/passdb.c
b/source3/passdb/passdb.c
index f09273705e6875fec652813b2d47f710f050345e..71afb339fa646d75070f2a4931571ca467d70992 100644
(file)
--- 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);
}