git.samba.org
/
ira
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
cbc0b63
)
s4-netlogon: merge netr_DatabaseSync2 from s3 idl.
author
Günther Deschner
<gd@samba.org>
Tue, 28 Oct 2008 23:07:12 +0000
(
00:07
+0100)
committer
Günther Deschner
<gd@samba.org>
Wed, 29 Oct 2008 07:57:51 +0000
(08:57 +0100)
Guenther
source3/librpc/idl/netlogon.idl
patch
|
blob
|
history
source4/librpc/idl/netlogon.idl
patch
|
blob
|
history
source4/torture/rpc/netlogon.c
patch
|
blob
|
history
source4/torture/rpc/samsync.c
patch
|
blob
|
history
diff --git
a/source3/librpc/idl/netlogon.idl
b/source3/librpc/idl/netlogon.idl
index 3a6bb1d80e9e3a770d7336850962b34b2d62c756..105775ffca0f21e11becea485dacfa3f398659c8 100644
(file)
--- a/
source3/librpc/idl/netlogon.idl
+++ b/
source3/librpc/idl/netlogon.idl
@@
-943,7
+943,7
@@
interface netlogon
NTSTATUS netr_DatabaseSync2(
[in] [string,charset(UTF16)] uint16 logon_server[],
[in] [string,charset(UTF16)] uint16 computername[],
NTSTATUS netr_DatabaseSync2(
[in] [string,charset(UTF16)] uint16 logon_server[],
[in] [string,charset(UTF16)] uint16 computername[],
- [in
]
netr_Authenticator *credential,
+ [in
,ref]
netr_Authenticator *credential,
[in,out,ref] netr_Authenticator *return_authenticator,
[in] netr_SamDatabaseID database_id,
[in] uint16 restart_state,
[in,out,ref] netr_Authenticator *return_authenticator,
[in] netr_SamDatabaseID database_id,
[in] uint16 restart_state,
diff --git
a/source4/librpc/idl/netlogon.idl
b/source4/librpc/idl/netlogon.idl
index cb05b2a2c9cee3a002a1182b76c9b6815289a798..e6ac70a8638d223eb271f29a253f42e874029da0 100644
(file)
--- a/
source4/librpc/idl/netlogon.idl
+++ b/
source4/librpc/idl/netlogon.idl
@@
-940,13
+940,13
@@
interface netlogon
NTSTATUS netr_DatabaseSync2(
[in] [string,charset(UTF16)] uint16 logon_server[],
[in] [string,charset(UTF16)] uint16 computername[],
NTSTATUS netr_DatabaseSync2(
[in] [string,charset(UTF16)] uint16 logon_server[],
[in] [string,charset(UTF16)] uint16 computername[],
- [in
] netr_Authenticator
credential,
- [in,out
] netr_Authenticator
return_authenticator,
+ [in
,ref] netr_Authenticator *
credential,
+ [in,out
,ref] netr_Authenticator *
return_authenticator,
[in] netr_SamDatabaseID database_id,
[in] uint16 restart_state,
[in] netr_SamDatabaseID database_id,
[in] uint16 restart_state,
- [in,out
] uint32
sync_context,
- [
in] uint32 preferredmaximumlength
,
- [
out,unique] netr_DELTA_ENUM_ARRAY *delta_enum_array
+ [in,out
,ref] uint32 *
sync_context,
+ [
out,ref] netr_DELTA_ENUM_ARRAY **delta_enum_array
,
+ [
in] uint32 preferredmaximumlength
);
);
diff --git
a/source4/torture/rpc/netlogon.c
b/source4/torture/rpc/netlogon.c
index 29d833856c595d27cb9b1ce955432328d5cc13a0..174022248d9fb73cde28a49e0b61deddfc6cf62a 100644
(file)
--- a/
source4/torture/rpc/netlogon.c
+++ b/
source4/torture/rpc/netlogon.c
@@
-1075,6
+1075,9
@@
static bool test_DatabaseSync2(struct torture_context *tctx,
{
NTSTATUS status;
struct netr_DatabaseSync2 r;
{
NTSTATUS status;
struct netr_DatabaseSync2 r;
+ struct netr_DELTA_ENUM_ARRAY *delta_enum_array = NULL;
+ struct netr_Authenticator return_authenticator, credential;
+
struct creds_CredentialState *creds;
const uint32_t database_ids[] = {0, 1, 2};
int i;
struct creds_CredentialState *creds;
const uint32_t database_ids[] = {0, 1, 2};
int i;
@@
-1085,20
+1088,30
@@
static bool test_DatabaseSync2(struct torture_context *tctx,
return false;
}
return false;
}
+ ZERO_STRUCT(return_authenticator);
+
r.in.logon_server = talloc_asprintf(tctx, "\\\\%s", dcerpc_server_name(p));
r.in.computername = TEST_MACHINE_NAME;
r.in.preferredmaximumlength = (uint32_t)-1;
r.in.logon_server = talloc_asprintf(tctx, "\\\\%s", dcerpc_server_name(p));
r.in.computername = TEST_MACHINE_NAME;
r.in.preferredmaximumlength = (uint32_t)-1;
- ZERO_STRUCT(r.in.return_authenticator);
+ r.in.return_authenticator = &return_authenticator;
+ r.out.return_authenticator = &return_authenticator;
+ r.out.delta_enum_array = &delta_enum_array;
for (i=0;i<ARRAY_SIZE(database_ids);i++) {
for (i=0;i<ARRAY_SIZE(database_ids);i++) {
- r.in.sync_context = 0;
+
+ uint32_t sync_context = 0;
+
r.in.database_id = database_ids[i];
r.in.database_id = database_ids[i];
+ r.in.sync_context = &sync_context;
+ r.out.sync_context = &sync_context;
r.in.restart_state = 0;
torture_comment(tctx, "Testing DatabaseSync2 of id %d\n", r.in.database_id);
do {
r.in.restart_state = 0;
torture_comment(tctx, "Testing DatabaseSync2 of id %d\n", r.in.database_id);
do {
- creds_client_authenticator(creds, &r.in.credential);
+ creds_client_authenticator(creds, &credential);
+
+ r.in.credential = &credential;
status = dcerpc_netr_DatabaseSync2(p, tctx, &r);
if (NT_STATUS_EQUAL(status, STATUS_MORE_ENTRIES))
status = dcerpc_netr_DatabaseSync2(p, tctx, &r);
if (NT_STATUS_EQUAL(status, STATUS_MORE_ENTRIES))
@@
-1111,11
+1124,10
@@
static bool test_DatabaseSync2(struct torture_context *tctx,
torture_assert_ntstatus_ok(tctx, status, "DatabaseSync2");
torture_assert_ntstatus_ok(tctx, status, "DatabaseSync2");
- if (!creds_client_check(creds, &r.out.return_authenticator
.
cred)) {
+ if (!creds_client_check(creds, &r.out.return_authenticator
->
cred)) {
torture_comment(tctx, "Credential chaining failed\n");
}
torture_comment(tctx, "Credential chaining failed\n");
}
- r.in.sync_context = r.out.sync_context;
} while (NT_STATUS_EQUAL(status, STATUS_MORE_ENTRIES));
}
} while (NT_STATUS_EQUAL(status, STATUS_MORE_ENTRIES));
}
diff --git
a/source4/torture/rpc/samsync.c
b/source4/torture/rpc/samsync.c
index 489080be272613c9628946f7f2fbcf1ce310c691..12ddc934c96a8e9a24dbb34dfc0bb07667c9d355 100644
(file)
--- a/
source4/torture/rpc/samsync.c
+++ b/
source4/torture/rpc/samsync.c
@@
-1405,22
+1405,34
@@
static bool test_DatabaseSync2(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
const uint32_t database_ids[] = {0, 1, 2};
int i;
bool ret = true;
const uint32_t database_ids[] = {0, 1, 2};
int i;
bool ret = true;
+ struct netr_Authenticator return_authenticator, credential;
+ struct netr_DELTA_ENUM_ARRAY *delta_enum_array = NULL;
+
+ ZERO_STRUCT(return_authenticator);
r.in.logon_server = talloc_asprintf(mem_ctx, "\\\\%s", dcerpc_server_name(p));
r.in.computername = TEST_MACHINE_NAME;
r.in.preferredmaximumlength = (uint32_t)-1;
r.in.logon_server = talloc_asprintf(mem_ctx, "\\\\%s", dcerpc_server_name(p));
r.in.computername = TEST_MACHINE_NAME;
r.in.preferredmaximumlength = (uint32_t)-1;
- ZERO_STRUCT(r.in.return_authenticator);
+ r.in.return_authenticator = &return_authenticator;
+ r.out.return_authenticator = &return_authenticator;
+ r.out.delta_enum_array = &delta_enum_array;
for (i=0;i<ARRAY_SIZE(database_ids);i++) {
for (i=0;i<ARRAY_SIZE(database_ids);i++) {
- r.in.sync_context = 0;
+
+ uint32_t sync_context = 0;
+
r.in.database_id = database_ids[i];
r.in.database_id = database_ids[i];
+ r.in.sync_context = &sync_context;
+ r.out.sync_context = &sync_context;
r.in.restart_state = 0;
printf("Testing DatabaseSync2 of id %d\n", r.in.database_id);
do {
loop_ctx = talloc_named(mem_ctx, 0, "test_DatabaseSync2 loop context");
r.in.restart_state = 0;
printf("Testing DatabaseSync2 of id %d\n", r.in.database_id);
do {
loop_ctx = talloc_named(mem_ctx, 0, "test_DatabaseSync2 loop context");
- creds_client_authenticator(creds, &r.in.credential);
+ creds_client_authenticator(creds, &credential);
+
+ r.in.credential = &credential;
status = dcerpc_netr_DatabaseSync2(p, loop_ctx, &r);
if (!NT_STATUS_IS_OK(status) &&
status = dcerpc_netr_DatabaseSync2(p, loop_ctx, &r);
if (!NT_STATUS_IS_OK(status) &&
@@
-1429,11
+1441,10
@@
static bool test_DatabaseSync2(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
ret = false;
}
ret = false;
}
- if (!creds_client_check(creds, &r.out.return_authenticator
.
cred)) {
+ if (!creds_client_check(creds, &r.out.return_authenticator
->
cred)) {
printf("Credential chaining failed\n");
}
printf("Credential chaining failed\n");
}
- r.in.sync_context = r.out.sync_context;
talloc_free(loop_ctx);
} while (NT_STATUS_EQUAL(status, STATUS_MORE_ENTRIES));
}
talloc_free(loop_ctx);
} while (NT_STATUS_EQUAL(status, STATUS_MORE_ENTRIES));
}