diff options
author | Joseph Sutton <josephsutton@catalyst.net.nz> | 2022-06-14 17:19:00 +1200 |
---|---|---|
committer | Douglas Bagnall <dbagnall@samba.org> | 2022-07-28 22:47:37 +0000 |
commit | e38b75a50f79c1d1ea2d7d4489896ca5aa16d9d9 (patch) | |
tree | c88d7553ba29a02d52c5a8a4b5d5c43cc8650ec0 /source4 | |
parent | b41691d0e546795bda994d94091b8e0a03ab96d6 (diff) | |
download | samba-e38b75a50f79c1d1ea2d7d4489896ca5aa16d9d9.tar.gz |
CVE-2022-32743 s4:torture/rpc: Fix tests to match Windows
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14833
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Diffstat (limited to 'source4')
-rw-r--r-- | source4/torture/rpc/netlogon.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/source4/torture/rpc/netlogon.c b/source4/torture/rpc/netlogon.c index 11f950d3aab..59d7feb43f1 100644 --- a/source4/torture/rpc/netlogon.c +++ b/source4/torture/rpc/netlogon.c @@ -5251,9 +5251,9 @@ static bool test_GetDomainInfo(struct torture_context *tctx, torture_assert(tctx, ldb_msg_find_attr_as_string(res[0], "operatingSystemServicePack", NULL) == NULL, "'operatingSystemServicePack' shouldn't stick!"); - torture_assert(tctx, - ldb_msg_find_attr_as_string(res[0], "operatingSystemVersion", NULL) == NULL, - "'operatingSystemVersion' shouldn't stick!"); + torture_assert_str_equal(tctx, + ldb_msg_find_attr_as_string(res[0], "operatingSystemVersion", NULL), + version_str, "'operatingSystemVersion' wrong!"); /* The DNS host name shouldn't have been updated by the server */ @@ -5387,9 +5387,11 @@ static bool test_GetDomainInfo(struct torture_context *tctx, torture_assert(tctx, odiT->domainname.string != NULL, "trust_list domainname should be valid"); - if (texT->trust_type == LSA_TRUST_TYPE_DOWNLEVEL) { + if (texT->trust_type == LSA_TRUST_TYPE_DOWNLEVEL || + texT->trust_type == LSA_TRUST_TYPE_MIT) + { torture_assert(tctx, odiT->dns_domainname.string == NULL, - "trust_list dns_domainname should be NULL for downlevel"); + "trust_list dns_domainname should be NULL for downlevel or MIT"); } else { torture_assert(tctx, odiT->dns_domainname.string != NULL, "trust_list dns_domainname should be valid for uplevel"); |