From: Stefan Metzmacher Date: Tue, 21 Dec 2021 12:58:07 +0000 (+0100) Subject: s4:torture/rpc: test how CSDVersion="" wipes operatingSystemServicePack X-Git-Tag: tdb-1.4.6~168 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4a0a0d2fc9555dc8ff7692607b1d51189785bd47;p=thirdparty%2Fsamba.git s4:torture/rpc: test how CSDVersion="" wipes operatingSystemServicePack BUG: https://bugzilla.samba.org/show_bug.cgi?id=14936 Signed-off-by: Stefan Metzmacher Reviewed-by: Jeremy Allison --- diff --git a/selftest/knownfail.d/samba4.rpc.netlogon b/selftest/knownfail.d/samba4.rpc.netlogon new file mode 100644 index 00000000000..12d871e7014 --- /dev/null +++ b/selftest/knownfail.d/samba4.rpc.netlogon @@ -0,0 +1,9 @@ +^samba4.rpc.netlogon.on.ncacn_np.with.seal,padcheck.netlogon.GetDomainInfo\(ad_dc_ntvfs\) +^samba4.rpc.netlogon.on.ncacn_ip_tcp.with.seal,padcheck.netlogon.GetDomainInfo\(ad_dc_ntvfs\) +^samba4.rpc.netlogon.on.ncacn_np.with.validate.netlogon.GetDomainInfo\(ad_dc_ntvfs\) +^samba4.rpc.netlogon.on.ncacn_ip_tcp.with.validate.netlogon.GetDomainInfo\(ad_dc_ntvfs\) +^samba4.rpc.netlogon.on.ncacn_np.with.bigendian.netlogon.GetDomainInfo\(ad_dc_ntvfs\) +^samba4.rpc.netlogon.on.ncacn_ip_tcp.with.bigendian.netlogon.GetDomainInfo\(ad_dc_ntvfs\) +^samba4.rpc.netlogon.with.seal,padcheck.netlogon.GetDomainInfo\(ad_dc\) +^samba4.rpc.netlogon.with.validate.netlogon.GetDomainInfo\(ad_dc\) +^samba4.rpc.netlogon.with.bigendian.netlogon.GetDomainInfo\(ad_dc\) diff --git a/source4/torture/rpc/netlogon.c b/source4/torture/rpc/netlogon.c index 0d8926b6d81..11f950d3aab 100644 --- a/source4/torture/rpc/netlogon.c +++ b/source4/torture/rpc/netlogon.c @@ -5143,8 +5143,8 @@ static bool test_GetDomainInfo(struct torture_context *tctx, torture_comment(tctx, "Testing netr_LogonGetDomainInfo 2nd call (variation of DNS hostname doesn't work)\n"); netlogon_creds_client_authenticator(creds, &a); - /* Wipe out the osVersion, and prove which values still 'stick' */ - q1.os_version.os = NULL; + /* Wipe out the CSDVersion, and prove which values still 'stick' */ + os.os.CSDVersion = ""; /* Change also the DNS hostname to test differences in behaviour */ talloc_free(discard_const_p(char, q1.dns_hostname)); @@ -5175,9 +5175,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 */