/* $OpenLDAP$ */
/*
- * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
/*
}
{
- char host[MAXHOSTNAMELEN];
+ char host[MAXHOSTNAMELEN+1];
if( gethostname( host, MAXHOSTNAMELEN ) != 0 ) {
krb5_free_principal( context, client );
return 1;
}
+ host[MAXHOSTNAMELEN] = '\0';
+
ret = krb5_sname_to_principal( context,
host, "ldap", KRB5_NT_SRV_HST, &server );
}
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);
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;
const struct berval *passwd )
{
lutil_MD5_CTX MD5context;
- unsigned char MD5digest[16];
+ unsigned char MD5digest[LUTIL_MD5_BYTES];
struct berval digest;
return pw_string( scheme, &hash );
}
#endif
-#endif
\ No newline at end of file
+#endif