[SCM] Samba Shared Repository - branch master updated
Jeremy Allison
jra at samba.org
Tue Jan 11 22:04:02 UTC 2022
The branch, master has been updated
via 1243f52f7ae s4:rpc_server/netlogon: let CSDVersion="" wipe operatingSystemServicePack
via 4a0a0d2fc95 s4:torture/rpc: test how CSDVersion="" wipes operatingSystemServicePack
from c7488bf9e39 lib: util: Make nt_time_to_full_timespec() call nt_time_to_unix_timespec_raw() for the conversion.
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 1243f52f7ae58de1005c431e20563f2f1902dfce
Author: Stefan Metzmacher <metze at samba.org>
Date: Tue Dec 21 14:00:34 2021 +0100
s4:rpc_server/netlogon: let CSDVersion="" wipe operatingSystemServicePack
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14936
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
Autobuild-User(master): Jeremy Allison <jra at samba.org>
Autobuild-Date(master): Tue Jan 11 22:03:03 UTC 2022 on sn-devel-184
commit 4a0a0d2fc9555dc8ff7692607b1d51189785bd47
Author: Stefan Metzmacher <metze at samba.org>
Date: Tue Dec 21 13:58:07 2021 +0100
s4:torture/rpc: test how CSDVersion="" wipes operatingSystemServicePack
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14936
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
-----------------------------------------------------------------------
Summary of changes:
source4/rpc_server/netlogon/dcerpc_netlogon.c | 11 ++++++++---
source4/torture/rpc/netlogon.c | 10 +++++-----
2 files changed, 13 insertions(+), 8 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source4/rpc_server/netlogon/dcerpc_netlogon.c b/source4/rpc_server/netlogon/dcerpc_netlogon.c
index 269bea7c6fc..cfd6d148b0a 100644
--- a/source4/rpc_server/netlogon/dcerpc_netlogon.c
+++ b/source4/rpc_server/netlogon/dcerpc_netlogon.c
@@ -2602,9 +2602,14 @@ static NTSTATUS dcesrv_netr_LogonGetDomainInfo(struct dcesrv_call_state *dce_cal
os_version->BuildNumber);
NT_STATUS_HAVE_NO_MEMORY(os_version_str);
- ret = ldb_msg_add_string(new_msg,
- "operatingSystemServicePack",
- os_version->CSDVersion);
+ if (strlen(os_version->CSDVersion) != 0) {
+ ret = ldb_msg_add_string(new_msg,
+ "operatingSystemServicePack",
+ os_version->CSDVersion);
+ } else {
+ ret = samdb_msg_add_delete(sam_ctx, mem_ctx, new_msg,
+ "operatingSystemServicePack");
+ }
if (ret != LDB_SUCCESS) {
return NT_STATUS_NO_MEMORY;
}
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 */
--
Samba Shared Repository
More information about the samba-cvs
mailing list