samr: filterModuleName is a lsa_String in userPwdChangeFailureInformation.
authorGünther Deschner <gd@samba.org>
Tue, 8 Nov 2011 15:00:10 +0000 (16:00 +0100)
committerGünther Deschner <gd@samba.org>
Tue, 8 Nov 2011 23:41:13 +0000 (00:41 +0100)
The entire marshalling of samr_ChangePasswordUser3 broke with c2685cdedb430ae75a94e86f34484292b4269363.

Matthias, the bad effect of this change was that actually all failed password
change attempts will always return NT_STATUS_OK because the last 4 bytes (the
resulting status code) were not marshalled anymore.

Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Nov  9 00:41:13 CET 2011 on sn-devel-104

librpc/idl/samr.idl
source4/torture/ndr/samr.c

index 4113a5432d76e53dc272ae66cd63fd908cf877c7..b9d1d34ae33f9a01d3e4615e276368f93e1b11bc 100644 (file)
@@ -1448,7 +1448,7 @@ import "misc.idl", "lsa.idl", "security.idl";
 
        typedef struct {
                samPwdChangeReason extendedFailureReason;
-               [string,charset(UTF16)] uint16 *filterModuleName;
+               lsa_String filterModuleName;
        } userPwdChangeFailureInformation;
 
        [public] NTSTATUS samr_ChangePasswordUser3(
index ce4d76c326940d16c480df6d8118aefc793737ed..91bb4d7d54fc0999c2c960b549599c95f4496636 100644 (file)
@@ -298,6 +298,8 @@ static bool samr_changepassworduser3_w2k8r2_out_check(struct torture_context *tc
        torture_assert_u64_equal(tctx, dominfo->min_password_age, 0x0000000000000000, "min_password_age");
 
        torture_assert_int_equal(tctx, reject->extendedFailureReason, SAM_PWD_CHANGE_NOT_COMPLEX, "extendedFailureReason");
+       torture_assert_int_equal(tctx, reject->filterModuleName.length, 0, "filterModuleName.length");
+       torture_assert_int_equal(tctx, reject->filterModuleName.size, 0, "filterModuleName.size");
 
        torture_assert_ntstatus_equal(tctx, r->out.result, NT_STATUS_PASSWORD_RESTRICTION, "result");