From c5765e3827bc6c69fec4c374ee17aabb522b6f00 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Sat, 3 Jun 2000 17:24:21 +0000 Subject: [PATCH] Use provided macros and comment --- libraries/liblutil/authpasswd.c | 6 +++--- libraries/liblutil/ntservice.c | 7 ++++++- libraries/liblutil/passwd.c | 6 +++--- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/libraries/liblutil/authpasswd.c b/libraries/liblutil/authpasswd.c index 7546650271..1fc4d74c71 100644 --- a/libraries/liblutil/authpasswd.c +++ b/libraries/liblutil/authpasswd.c @@ -823,7 +823,7 @@ static struct berval *hash_sha1( const struct berval *passwd ) { lutil_SHA1_CTX SHA1context; - unsigned char SHA1digest[20]; + unsigned char SHA1digest[LUTIL_SHA1_BYTES]; struct berval digest; digest.bv_val = SHA1digest; digest.bv_len = sizeof(SHA1digest); @@ -841,7 +841,7 @@ static struct berval *hash_smd5( const struct berval *passwd ) { lutil_MD5_CTX MD5context; - unsigned char MD5digest[16]; + unsigned char MD5digest[LUTIL_MD5_BYTES]; unsigned char saltdata[4]; struct berval digest; struct berval salt; @@ -870,7 +870,7 @@ static struct berval *hash_md5( const struct berval *passwd ) { lutil_MD5_CTX MD5context; - unsigned char MD5digest[16]; + unsigned char MD5digest[LUTIL_MD5_BYTES]; struct berval digest; diff --git a/libraries/liblutil/ntservice.c b/libraries/liblutil/ntservice.c index 47f52e49b7..45f6e8adb4 100644 --- a/libraries/liblutil/ntservice.c +++ b/libraries/liblutil/ntservice.c @@ -3,7 +3,12 @@ * Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved. * COPYING RESTRICTIONS APPLY, see COPYRIGHT file */ -/* ntservice.c */ + +/* + * NT Service manager utilities for OpenLDAP services + * these should NOT be slapd specific, but are + */ + #include "portable.h" #ifdef HAVE_NT_SERVICE_MANAGER diff --git a/libraries/liblutil/passwd.c b/libraries/liblutil/passwd.c index a963dd28c4..becde0e6c5 100644 --- a/libraries/liblutil/passwd.c +++ b/libraries/liblutil/passwd.c @@ -942,7 +942,7 @@ static struct berval *hash_sha1( const struct berval *passwd ) { lutil_SHA1_CTX SHA1context; - unsigned char SHA1digest[20]; + unsigned char SHA1digest[LUTIL_SHA1_BYTES]; struct berval digest; digest.bv_val = SHA1digest; digest.bv_len = sizeof(SHA1digest); @@ -960,7 +960,7 @@ static struct berval *hash_smd5( const struct berval *passwd ) { lutil_MD5_CTX MD5context; - unsigned char MD5digest[16]; + unsigned char MD5digest[LUTIL_MD5_BYTES]; unsigned char saltdata[4]; struct berval digest; struct berval salt; @@ -989,7 +989,7 @@ static struct berval *hash_md5( const struct berval *passwd ) { lutil_MD5_CTX MD5context; - unsigned char MD5digest[16]; + unsigned char MD5digest[LUTIL_MD5_BYTES]; struct berval digest; -- 2.39.5