From 99315a19be4d28146e18dac7104ee2d18b798a48 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 17 Oct 2008 12:41:02 +1100 Subject: Fix errrors in new password handling code found by RPC-SAMR. I'm very glad we have such a comprehensive testsuite for the SAMR password change process, as it makes this a much easier task to get right. Andrew Bartlett --- source4/dsdb/common/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/dsdb/common') diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c index 0a87c5ffe1..6a6f370943 100644 --- a/source4/dsdb/common/util.c +++ b/source4/dsdb/common/util.c @@ -1644,7 +1644,7 @@ NTSTATUS samdb_set_password(struct ldb_context *ctx, TALLOC_CTX *mem_ctx, char *new_pass; /* check the various password restrictions */ - if (restrictions && minPwdLength > utf16_len_n(new_password->data, (new_password->length / 2))) { + if (restrictions && minPwdLength > utf16_len_n(new_password->data, new_password->length) / 2) { if (reject_reason) { *reject_reason = SAMR_REJECT_TOO_SHORT; } -- cgit