summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2018-01-23 21:32:53 +0100
committerRalph Boehme <slow@samba.org>2018-02-10 08:35:17 +0100
commit2b0181877806f171eee053c246dcb2eda2300261 (patch)
tree2795ed7968cbda88da6f355ffd3a2828324bbe21 /source3
parentd4ba23fd353ad387a374a5d7f6f6d085a0699d2c (diff)
downloadsamba-2b0181877806f171eee053c246dcb2eda2300261.tar.gz
s3/rpc_client: add map_info6_to_validation()
Bug: https://bugzilla.samba.org/show_bug.cgi?id=13261 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_client/util_netlogon.c25
-rw-r--r--source3/rpc_client/util_netlogon.h4
2 files changed, 29 insertions, 0 deletions
diff --git a/source3/rpc_client/util_netlogon.c b/source3/rpc_client/util_netlogon.c
index 008861f00d1..2d73bc95cea 100644
--- a/source3/rpc_client/util_netlogon.c
+++ b/source3/rpc_client/util_netlogon.c
@@ -360,3 +360,28 @@ NTSTATUS map_info3_to_validation(TALLOC_CTX *mem_ctx,
*_validation = validation;
return NT_STATUS_OK;
}
+
+NTSTATUS map_info6_to_validation(TALLOC_CTX *mem_ctx,
+ const struct netr_SamInfo6 *info6,
+ uint16_t *_validation_level,
+ union netr_Validation **_validation)
+{
+ union netr_Validation *validation = NULL;
+ NTSTATUS status;
+
+ validation = talloc_zero(mem_ctx, union netr_Validation);
+ if (validation == NULL) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ status = copy_netr_SamInfo6(mem_ctx,
+ info6,
+ &validation->sam6);
+ if (!NT_STATUS_IS_OK(status)) {
+ return status;
+ }
+
+ * _validation_level = 6;
+ *_validation = validation;
+ return NT_STATUS_OK;
+}
diff --git a/source3/rpc_client/util_netlogon.h b/source3/rpc_client/util_netlogon.h
index fc1da1face3..c3ed3f67201 100644
--- a/source3/rpc_client/util_netlogon.h
+++ b/source3/rpc_client/util_netlogon.h
@@ -43,5 +43,9 @@ NTSTATUS map_info3_to_validation(TALLOC_CTX *mem_ctx,
struct netr_SamInfo3 *info3,
uint16_t *_validation_level,
union netr_Validation **_validation);
+NTSTATUS map_info6_to_validation(TALLOC_CTX *mem_ctx,
+ const struct netr_SamInfo6 *info6,
+ uint16_t *_validation_level,
+ union netr_Validation **_validation);
#endif /* _RPC_CLIENT_UTIL_NETLOGON_H_ */