summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/librpc/idl/lsa.idl4
-rw-r--r--source4/librpc/idl/netlogon.idl23
-rw-r--r--source4/torture/rpc/netlogon.c38
3 files changed, 36 insertions, 29 deletions
diff --git a/source4/librpc/idl/lsa.idl b/source4/librpc/idl/lsa.idl
index c90654d941..d4829097bd 100644
--- a/source4/librpc/idl/lsa.idl
+++ b/source4/librpc/idl/lsa.idl
@@ -55,7 +55,7 @@
/******************/
/* Function: 0x03 */
- typedef struct {
+ typedef [public] struct {
uint32 size;
[subcontext(4)] security_descriptor *sd;
} sec_desc_buf;
@@ -216,7 +216,7 @@
dom_sid2 *sid;
} lsa_SidPtr;
- typedef struct {
+ typedef [public] struct {
uint32 num_sids;
[size_is(num_sids)] lsa_SidPtr *sids;
} lsa_SidArray;
diff --git a/source4/librpc/idl/netlogon.idl b/source4/librpc/idl/netlogon.idl
index a7c61d852a..7e15102043 100644
--- a/source4/librpc/idl/netlogon.idl
+++ b/source4/librpc/idl/netlogon.idl
@@ -336,7 +336,7 @@ interface netlogon
uint16 CodePage;
USER_PRIVATE_INFO user_private_info;
uint32 SecurityInformation;
- security_descriptor sec_desc;
+ sec_desc_buf sdbuf;
netr_String unknown1;
netr_String unknown2;
netr_String unknown3;
@@ -358,7 +358,7 @@ interface netlogon
NTTIME domain_modify_time;
NTTIME domain_create_time;
uint32 SecurityInformation;
- security_descriptor sec_desc;
+ sec_desc_buf sdbuf;
netr_String unknown1;
netr_String unknown2;
netr_String unknown3;
@@ -374,7 +374,7 @@ interface netlogon
netr_GroupMembership group_membership;
netr_String comment;
uint32 SecurityInformation;
- security_descriptor sec_desc;
+ sec_desc_buf sdbuf;
netr_String unknown1;
netr_String unknown2;
netr_String unknown3;
@@ -412,7 +412,7 @@ interface netlogon
netr_String alias_name;
uint32 rid;
uint32 SecurityInformation;
- security_descriptor sec_desc;
+ sec_desc_buf sdbuf;
netr_String unknown1;
netr_String unknown2;
netr_String unknown3;
@@ -424,12 +424,7 @@ interface netlogon
} DELTA_ALIAS;
typedef struct {
- uint32 count;
- [size_is(count)] dom_sid2 *sids;
- } netr_SidArray;
-
- typedef struct {
- netr_SidArray sids;
+ lsa_SidArray sids;
uint32 unknown1;
uint32 unknown2;
uint32 unknown3;
@@ -457,7 +452,7 @@ interface netlogon
NTTIME db_modify_time;
NTTIME db_create_time;
uint32 SecurityInformation;
- security_descriptor sec_desc;
+ sec_desc_buf sdbuf;
netr_String unknown1;
netr_String unknown2;
netr_String unknown3;
@@ -473,7 +468,7 @@ interface netlogon
uint32 num_controllers;
[size_is(num_controllers)] netr_String *controller_names;
uint32 SecurityInformation;
- security_descriptor sec_desc;
+ sec_desc_buf sdbuf;
netr_String unknown1;
netr_String unknown2;
netr_String unknown3;
@@ -491,7 +486,7 @@ interface netlogon
[size_is(privilege_entries)] netr_String *privilege_name;
QUOTA_LIMITS quotalimits;
uint32 SecurityInformation;
- security_descriptor sec_desc;
+ sec_desc_buf sdbuf;
netr_String unknown1;
netr_String unknown2;
netr_String unknown3;
@@ -514,7 +509,7 @@ interface netlogon
CIPHER_VALUE old_cipher;
NTTIME old_cipher_set_time;
uint32 SecurityInformation;
- security_descriptor sec_desc;
+ sec_desc_buf sdbuf;
netr_String unknown1;
netr_String unknown2;
netr_String unknown3;
diff --git a/source4/torture/rpc/netlogon.c b/source4/torture/rpc/netlogon.c
index a99ee642f5..d8bacac87c 100644
--- a/source4/torture/rpc/netlogon.c
+++ b/source4/torture/rpc/netlogon.c
@@ -248,33 +248,45 @@ static BOOL test_DatabaseSync(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
NTSTATUS status;
struct netr_DatabaseSync r;
struct netr_CredentialState creds;
+ const uint32 database_ids[] = {0, 1, 2};
+ int i;
+ BOOL ret = True;
if (!test_SetupCredentials(p, mem_ctx, &creds)) {
return False;
}
- creds_client_authenticator(&creds, &r.in.credential);
- ZERO_STRUCT(r.in.return_authenticator);
-
r.in.logonserver = talloc_asprintf(mem_ctx, "\\\\%s", dcerpc_server_name(p));
r.in.computername = lp_netbios_name();
- r.in.database_id = 1;
r.in.sync_context = 0;
r.in.preferredmaximumlength = (uint32)-1;
+ ZERO_STRUCT(r.in.return_authenticator);
- printf("Testing DatabaseSync\n");
+ for (i=0;i<ARRAY_SIZE(database_ids);i++) {
+ r.in.database_id = database_ids[i];
- status = dcerpc_netr_DatabaseSync(p, mem_ctx, &r);
- if (!NT_STATUS_IS_OK(status)) {
- printf("DatabaseSync - %s\n", nt_errstr(status));
- return False;
- }
+ printf("Testing DatabaseSync of id %d\n", r.in.database_id);
- if (!creds_client_check(&creds, &r.out.return_authenticator.cred)) {
- printf("Credential chaining failed\n");
+ do {
+ creds_client_authenticator(&creds, &r.in.credential);
+
+ status = dcerpc_netr_DatabaseSync(p, mem_ctx, &r);
+ if (!NT_STATUS_IS_OK(status) &&
+ !NT_STATUS_EQUAL(status, STATUS_MORE_ENTRIES)) {
+ printf("DatabaseSync - %s\n", nt_errstr(status));
+ ret = False;
+ break;
+ }
+
+ if (!creds_client_check(&creds, &r.out.return_authenticator.cred)) {
+ printf("Credential chaining failed\n");
+ }
+
+ r.in.sync_context = r.out.sync_context;
+ } while (NT_STATUS_EQUAL(status, STATUS_MORE_ENTRIES));
}
- return True;
+ return ret;
}