From 498f98f126de6da5aff7f054a85270f315c7a400 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Tue, 11 Dec 2012 13:34:49 +0100 Subject: s4:torture:rpc:samr: fix password age calculation in test_ChangePasswordUser3() The min_password_age field is the negative of the age. Pair-Programmed-With: Stefan Metzmacher Signed-off-by: Michael Adam Signed-off-by: Stefan Metzmacher --- source4/torture/rpc/samr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4') diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c index 01f4c0fdc2..f17f0d746c 100644 --- a/source4/torture/rpc/samr.c +++ b/source4/torture/rpc/samr.c @@ -2490,8 +2490,8 @@ bool test_ChangePasswordUser3(struct dcerpc_pipe *p, struct torture_context *tct Guenther */ - if ((dominfo->min_password_age > 0) && !null_nttime(last_password_change) && - (last_password_change + dominfo->min_password_age > t)) { + if ((dominfo->min_password_age < 0) && !null_nttime(last_password_change) && + (last_password_change - dominfo->min_password_age > t)) { if (reject->extendedFailureReason != SAM_PWD_CHANGE_NO_ERROR) { torture_warning(tctx, "expected SAM_PWD_CHANGE_NO_ERROR (%d), got %d\n", -- cgit