diff options
author | Andrew Bartlett <abartlet@samba.org> | 2008-10-17 12:41:02 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2008-10-17 12:41:02 +1100 |
commit | 99315a19be4d28146e18dac7104ee2d18b798a48 (patch) | |
tree | d77c3cffc3b4e0f403cb170a32dfcb64cc67cc2a /source4/dsdb/common | |
parent | 7c88ea8aadfc2be0726cbe555543cfab8804c470 (diff) | |
download | samba-99315a19be4d28146e18dac7104ee2d18b798a48.tar.gz samba-99315a19be4d28146e18dac7104ee2d18b798a48.tar.bz2 samba-99315a19be4d28146e18dac7104ee2d18b798a48.zip |
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
Diffstat (limited to 'source4/dsdb/common')
-rw-r--r-- | source4/dsdb/common/util.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |