From 308f89ce6a95e8566bc5f4d1c633a5d9ac11958c Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Wed, 25 Aug 2021 14:11:28 +0200 Subject: [PATCH] samr:idl: add samr_SupportedFeatures for samr_Connect5() Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher --- librpc/idl/samr.idl | 9 ++++++++- source3/rpc_server/samr/srv_samr_nt.c | 2 +- source4/rpc_server/samr/dcesrv_samr.c | 2 +- source4/torture/rpc/samr.c | 2 +- source4/torture/rpc/samr_accessmask.c | 2 +- source4/torture/rpc/samr_handletype.c | 2 +- 6 files changed, 13 insertions(+), 6 deletions(-) diff --git a/librpc/idl/samr.idl b/librpc/idl/samr.idl index ab9d6d763e8..d897047ea87 100644 --- a/librpc/idl/samr.idl +++ b/librpc/idl/samr.idl @@ -1479,9 +1479,16 @@ import "misc.idl", "lsa.idl", "security.idl"; /************************/ /* Function 0x40 */ + typedef [v1_enum] enum { + SAMR_CONNECT_FEATURE_RID_ONLY = 0x00000001, + SAMR_CONNECT_FEATURE_RESRVED1 = 0x00000002, + SAMR_CONNECT_FEATURE_RESRVED2 = 0x00000004, + SAMR_CONNECT_FEATURE_USE_AES = 0x00000010 + } samr_SupportedFeatures; + typedef struct { samr_ConnectVersion client_version; /* w2k3 gives 3 */ - uint32 unknown2; /* w2k3 gives 0 */ + samr_SupportedFeatures supported_features; } samr_ConnectInfo1; typedef union { diff --git a/source3/rpc_server/samr/srv_samr_nt.c b/source3/rpc_server/samr/srv_samr_nt.c index 7f2c0a861f5..2eb7c28cd47 100644 --- a/source3/rpc_server/samr/srv_samr_nt.c +++ b/source3/rpc_server/samr/srv_samr_nt.c @@ -4197,7 +4197,7 @@ NTSTATUS _samr_Connect5(struct pipes_struct *p, struct samr_ConnectInfo1 info1; info1.client_version = SAMR_CONNECT_AFTER_W2K; - info1.unknown2 = 0; + info1.supported_features = 0; c.in.system_name = r->in.system_name; c.in.access_mask = r->in.access_mask; diff --git a/source4/rpc_server/samr/dcesrv_samr.c b/source4/rpc_server/samr/dcesrv_samr.c index 10c53b19e0d..79704373ace 100644 --- a/source4/rpc_server/samr/dcesrv_samr.c +++ b/source4/rpc_server/samr/dcesrv_samr.c @@ -4953,7 +4953,7 @@ static NTSTATUS dcesrv_samr_Connect5(struct dcesrv_call_state *dce_call, TALLOC_ status = dcesrv_samr_Connect(dce_call, mem_ctx, &c); r->out.info_out->info1.client_version = SAMR_CONNECT_AFTER_W2K; - r->out.info_out->info1.unknown2 = 0; + r->out.info_out->info1.supported_features = 0; *r->out.level_out = r->in.level_in; return status; diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c index b8bab9825e2..c2523f860e3 100644 --- a/source4/torture/rpc/samr.c +++ b/source4/torture/rpc/samr.c @@ -8580,7 +8580,7 @@ static bool test_Connect(struct dcerpc_binding_handle *b, torture_comment(tctx, "Testing samr_Connect5\n"); info.info1.client_version = 0; - info.info1.unknown2 = 0; + info.info1.supported_features = 0; r5.in.system_name = ""; r5.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; diff --git a/source4/torture/rpc/samr_accessmask.c b/source4/torture/rpc/samr_accessmask.c index 118026f80ff..0d4c69b9b7f 100644 --- a/source4/torture/rpc/samr_accessmask.c +++ b/source4/torture/rpc/samr_accessmask.c @@ -57,7 +57,7 @@ static NTSTATUS torture_samr_Connect5(struct torture_context *tctx, uint32_t level_out = 0; info.info1.client_version = 0; - info.info1.unknown2 = 0; + info.info1.supported_features = 0; r5.in.system_name = ""; r5.in.level_in = 1; r5.in.info_in = &info; diff --git a/source4/torture/rpc/samr_handletype.c b/source4/torture/rpc/samr_handletype.c index f4800f4320c..ab5e7d03d6e 100644 --- a/source4/torture/rpc/samr_handletype.c +++ b/source4/torture/rpc/samr_handletype.c @@ -60,7 +60,7 @@ static NTSTATUS torture_samr_Connect5(struct torture_context *tctx, uint32_t level_out = 0; info.info1.client_version = 0; - info.info1.unknown2 = 0; + info.info1.supported_features = 0; r5.in.system_name = ""; r5.in.level_in = 1; r5.in.info_in = &info;