diff options
Diffstat (limited to 'source4/torture')
-rw-r--r-- | source4/torture/rpc/rpc.c | 1 | ||||
-rw-r--r-- | source4/torture/rpc/samr.c | 21 |
2 files changed, 18 insertions, 4 deletions
diff --git a/source4/torture/rpc/rpc.c b/source4/torture/rpc/rpc.c index 7efc90b33c..ad1e5492d8 100644 --- a/source4/torture/rpc/rpc.c +++ b/source4/torture/rpc/rpc.c @@ -503,6 +503,7 @@ NTSTATUS torture_rpc_init(void) torture_suite_add_suite(suite, torture_rpc_samr_passwords_pwdlastset(suite)); torture_suite_add_suite(suite, torture_rpc_samr_passwords_badpwdcount(suite)); torture_suite_add_suite(suite, torture_rpc_samr_passwords_lockout(suite)); + torture_suite_add_suite(suite, torture_rpc_samr_passwords_validate(suite)); torture_suite_add_suite(suite, torture_rpc_samr_user_privileges(suite)); torture_suite_add_suite(suite, torture_rpc_samr_large_dc(suite)); torture_suite_add_suite(suite, torture_rpc_samr_priv(suite)); diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c index f17f0d746c..6a4f653f2c 100644 --- a/source4/torture/rpc/samr.c +++ b/source4/torture/rpc/samr.c @@ -8047,8 +8047,8 @@ static bool test_Connect(struct dcerpc_binding_handle *b, } -static bool test_samr_ValidatePassword(struct dcerpc_pipe *p, - struct torture_context *tctx) +static bool test_samr_ValidatePassword(struct torture_context *tctx, + struct dcerpc_pipe *p) { struct samr_ValidatePassword r; union samr_ValidatePasswordReq req; @@ -8060,6 +8060,10 @@ static bool test_samr_ValidatePassword(struct dcerpc_pipe *p, torture_comment(tctx, "Testing samr_ValidatePassword\n"); + if (p->conn->transport.transport != NCACN_IP_TCP) { + torture_comment(tctx, "samr_ValidatePassword only should succeed over NCACN_IP_TCP!\n"); + } + ZERO_STRUCT(r); r.in.level = NetValidatePasswordReset; r.in.req = &req; @@ -8183,8 +8187,6 @@ bool torture_rpc_samr_passwords(struct torture_context *torture) ret &= test_samr_handle_Close(b, torture, &ctx->handle); - ret &= test_samr_ValidatePassword(p, torture); - return ret; } @@ -8479,4 +8481,15 @@ struct torture_suite *torture_rpc_samr_passwords_lockout(TALLOC_CTX *mem_ctx) return suite; } +struct torture_suite *torture_rpc_samr_passwords_validate(TALLOC_CTX *mem_ctx) +{ + struct torture_suite *suite = torture_suite_create(mem_ctx, "samr.passwords.validate"); + struct torture_rpc_tcase *tcase; + + tcase = torture_suite_add_rpc_iface_tcase(suite, "samr", + &ndr_table_samr); + torture_rpc_tcase_add_test(tcase, "validate", + test_samr_ValidatePassword); + return suite; +} |