[SCM] Samba Shared Repository - branch master updated -
e941e4ad5223816d3d022e6d87a8e88a74db2850
Günther Deschner
gd at samba.org
Fri Oct 17 08:54:18 GMT 2008
The branch, master has been updated
via e941e4ad5223816d3d022e6d87a8e88a74db2850 (commit)
via 6503ffaa04bef3dd40a69d38b9d004abf2e85e92 (commit)
via bd07fdcebe304dc7281d42178c56e879369c0eec (commit)
via d2a007b62925256e9faba3c38468ecde445dc321 (commit)
from c35b0d9ab5d01e37cb06d02083a329e18ae59566 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit e941e4ad5223816d3d022e6d87a8e88a74db2850
Author: Günther Deschner <gd at samba.org>
Date: Fri Oct 17 10:52:23 2008 +0200
s4: merge from s3 drsuapi.idl.
Guenther
commit 6503ffaa04bef3dd40a69d38b9d004abf2e85e92
Author: Günther Deschner <gd at samba.org>
Date: Fri Oct 17 10:50:28 2008 +0200
s3: fix s3 drsuapi callers.
Guenther
commit bd07fdcebe304dc7281d42178c56e879369c0eec
Author: Günther Deschner <gd at samba.org>
Date: Fri Oct 17 10:49:22 2008 +0200
s3-build: re-run make samba3-idl.
Guenther
commit d2a007b62925256e9faba3c38468ecde445dc321
Author: Günther Deschner <gd at samba.org>
Date: Fri Oct 17 10:48:09 2008 +0200
s3: merge from s4 drsuapi.idl.
Guenther
-----------------------------------------------------------------------
Summary of changes:
source3/libnet/libnet_dssync.c | 2 +-
source3/librpc/gen_ndr/drsuapi.h | 4 +-
source3/librpc/gen_ndr/ndr_drsuapi.c | 2 +-
source3/librpc/idl/drsuapi.idl | 7 ++---
source3/rpcclient/cmd_drsuapi.c | 4 +-
source4/librpc/idl/drsuapi.idl | 36 +++++++++++++------------
source4/torture/rpc/drsuapi.c | 49 ++++++++++++++++++---------------
source4/torture/rpc/dssync.c | 25 +++++++++-------
8 files changed, 69 insertions(+), 60 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/libnet/libnet_dssync.c b/source3/libnet/libnet_dssync.c
index d388615..81866c8 100644
--- a/source3/libnet/libnet_dssync.c
+++ b/source3/libnet/libnet_dssync.c
@@ -297,7 +297,7 @@ static NTSTATUS libnet_dssync_lookup_nc(TALLOC_CTX *mem_ctx,
req.req1.count = 1;
req.req1.names = names;
req.req1.format_flags = DRSUAPI_DS_NAME_FLAG_NO_FLAGS;
- req.req1.format_offered = DRSUAPI_DS_NAME_FORMAT_UKNOWN;
+ req.req1.format_offered = DRSUAPI_DS_NAME_FORMAT_UNKNOWN;
req.req1.format_desired = DRSUAPI_DS_NAME_FORMAT_FQDN_1779;
status = rpccli_drsuapi_DsCrackNames(ctx->cli, mem_ctx,
diff --git a/source3/librpc/gen_ndr/drsuapi.h b/source3/librpc/gen_ndr/drsuapi.h
index 77ecd9f..ba01e8f 100644
--- a/source3/librpc/gen_ndr/drsuapi.h
+++ b/source3/librpc/gen_ndr/drsuapi.h
@@ -798,7 +798,7 @@ enum drsuapi_DsNameFlags
enum drsuapi_DsNameFormat
#ifndef USE_UINT_ENUMS
{
- DRSUAPI_DS_NAME_FORMAT_UKNOWN=0,
+ DRSUAPI_DS_NAME_FORMAT_UNKNOWN=0,
DRSUAPI_DS_NAME_FORMAT_FQDN_1779=1,
DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT=2,
DRSUAPI_DS_NAME_FORMAT_DISPLAY=3,
@@ -812,7 +812,7 @@ enum drsuapi_DsNameFormat
}
#else
{ __donnot_use_enum_drsuapi_DsNameFormat=0x7FFFFFFF}
-#define DRSUAPI_DS_NAME_FORMAT_UKNOWN ( 0 )
+#define DRSUAPI_DS_NAME_FORMAT_UNKNOWN ( 0 )
#define DRSUAPI_DS_NAME_FORMAT_FQDN_1779 ( 1 )
#define DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT ( 2 )
#define DRSUAPI_DS_NAME_FORMAT_DISPLAY ( 3 )
diff --git a/source3/librpc/gen_ndr/ndr_drsuapi.c b/source3/librpc/gen_ndr/ndr_drsuapi.c
index 4651d50..c2a4aee 100644
--- a/source3/librpc/gen_ndr/ndr_drsuapi.c
+++ b/source3/librpc/gen_ndr/ndr_drsuapi.c
@@ -4714,7 +4714,7 @@ _PUBLIC_ void ndr_print_drsuapi_DsNameFormat(struct ndr_print *ndr, const char *
const char *val = NULL;
switch (r) {
- case DRSUAPI_DS_NAME_FORMAT_UKNOWN: val = "DRSUAPI_DS_NAME_FORMAT_UKNOWN"; break;
+ case DRSUAPI_DS_NAME_FORMAT_UNKNOWN: val = "DRSUAPI_DS_NAME_FORMAT_UNKNOWN"; break;
case DRSUAPI_DS_NAME_FORMAT_FQDN_1779: val = "DRSUAPI_DS_NAME_FORMAT_FQDN_1779"; break;
case DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT: val = "DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT"; break;
case DRSUAPI_DS_NAME_FORMAT_DISPLAY: val = "DRSUAPI_DS_NAME_FORMAT_DISPLAY"; break;
diff --git a/source3/librpc/idl/drsuapi.idl b/source3/librpc/idl/drsuapi.idl
index adcd2d7..9d7c9d9 100644
--- a/source3/librpc/idl/drsuapi.idl
+++ b/source3/librpc/idl/drsuapi.idl
@@ -807,7 +807,7 @@ interface drsuapi
[case(1)] drsuapi_DsGetMembershipsRequest1 req1;
} drsuapi_DsGetMembershipsRequest;
- WERROR drsuapi_DsGetMemberships(
+ [todo] WERROR drsuapi_DsGetMemberships(
[in] policy_handle *bind_handle,
[in] int32 level,
[in,ref] [switch_is(level)] drsuapi_DsGetMembershipsRequest *req,
@@ -850,7 +850,7 @@ interface drsuapi
[case(1)] drsuapi_DsGetNT4ChangeLogInfo1 info1;
} drsuapi_DsGetNT4ChangeLogInfo;
- WERROR drsuapi_DsGetNT4ChangeLog(
+ [todo] WERROR drsuapi_DsGetNT4ChangeLog(
[in] policy_handle *bind_handle,
[in] uint32 level,
[in,ref] [switch_is(level)] drsuapi_DsGetNT4ChangeLogRequest *req,
@@ -880,7 +880,7 @@ interface drsuapi
} drsuapi_DsNameFlags;
typedef [v1_enum] enum {
- DRSUAPI_DS_NAME_FORMAT_UKNOWN = 0,
+ DRSUAPI_DS_NAME_FORMAT_UNKNOWN = 0,
DRSUAPI_DS_NAME_FORMAT_FQDN_1779 = 1,
DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT = 2,
DRSUAPI_DS_NAME_FORMAT_DISPLAY = 3,
@@ -1556,7 +1556,6 @@ interface drsuapi
[out,ref] [switch_is(*level_out)] drsuapi_DsGetMemberships2Ctr *ctr
);
-
/*****************/
/* Function 0x16 */
[todo] WERROR DRSUAPI_REPLICA_VERIFY_OBJECTS();
diff --git a/source3/rpcclient/cmd_drsuapi.c b/source3/rpcclient/cmd_drsuapi.c
index 004810e..8fbd798 100644
--- a/source3/rpcclient/cmd_drsuapi.c
+++ b/source3/rpcclient/cmd_drsuapi.c
@@ -103,7 +103,7 @@ static WERROR cmd_drsuapi_cracknames(struct rpc_pipe_client *cli,
werr = cracknames(cli, mem_ctx,
&bind_handle,
- DRSUAPI_DS_NAME_FORMAT_UKNOWN,
+ DRSUAPI_DS_NAME_FORMAT_UNKNOWN,
DRSUAPI_DS_NAME_FORMAT_FQDN_1779,
1,
argv+1,
@@ -419,7 +419,7 @@ static WERROR cmd_drsuapi_getncchanges(struct rpc_pipe_client *cli,
werr = cracknames(cli, mem_ctx,
&bind_handle,
- DRSUAPI_DS_NAME_FORMAT_UKNOWN,
+ DRSUAPI_DS_NAME_FORMAT_UNKNOWN,
DRSUAPI_DS_NAME_FORMAT_FQDN_1779,
1,
&name,
diff --git a/source4/librpc/idl/drsuapi.idl b/source4/librpc/idl/drsuapi.idl
index b0fb583..f89d9e1 100644
--- a/source4/librpc/idl/drsuapi.idl
+++ b/source4/librpc/idl/drsuapi.idl
@@ -808,9 +808,10 @@ interface drsuapi
[todo] WERROR drsuapi_DsGetMemberships(
[in] policy_handle *bind_handle,
- [in,out] int32 level,
- [in] [switch_is(level)] drsuapi_DsGetMembershipsRequest req,
- [out] [switch_is(level)] drsuapi_DsGetMembershipsCtr ctr
+ [in] int32 level,
+ [in,ref] [switch_is(level)] drsuapi_DsGetMembershipsRequest *req,
+ [out,ref] int32 *level_out,
+ [out,ref] [switch_is(*level_out)] drsuapi_DsGetMembershipsCtr *ctr
);
/*****************/
@@ -850,9 +851,10 @@ interface drsuapi
[todo] WERROR drsuapi_DsGetNT4ChangeLog(
[in] policy_handle *bind_handle,
- [in,out] uint32 level,
- [in] [switch_is(level)] drsuapi_DsGetNT4ChangeLogRequest req,
- [out] [switch_is(level)] drsuapi_DsGetNT4ChangeLogInfo info
+ [in] uint32 level,
+ [in,ref] [switch_is(level)] drsuapi_DsGetNT4ChangeLogRequest *req,
+ [out,ref] uint32 *level_out,
+ [out,ref] [switch_is(*level_out)] drsuapi_DsGetNT4ChangeLogInfo *info
);
/*****************/
@@ -1356,7 +1358,7 @@ interface drsuapi
typedef [switch_type(drsuapi_DsReplicaOpType)] union {
[case(DRSUAPI_DS_REPLICA_OP_TYPE_SYNC)] drsuapi_DsReplicaSyncOptions sync;
[case(DRSUAPI_DS_REPLICA_OP_TYPE_ADD)] drsuapi_DsReplicaAddOptions add;
- [case(DRSUAPI_DS_REPLICA_OP_TYPE_DELETE)] drsuapi_DsReplicaDeleteOptions delete;
+ [case(DRSUAPI_DS_REPLICA_OP_TYPE_DELETE)] drsuapi_DsReplicaDeleteOptions op_delete;
[case(DRSUAPI_DS_REPLICA_OP_TYPE_MODIFY)] drsuapi_DsReplicaModifyOptions modify;
[case(DRSUAPI_DS_REPLICA_OP_TYPE_UPDATE_REFS)] drsuapi_DsReplicaUpdateRefsOptions update_refs;
[default] uint32 unknown;
@@ -1511,9 +1513,9 @@ interface drsuapi
WERROR drsuapi_DsReplicaGetInfo(
[in] policy_handle *bind_handle,
[in] drsuapi_DsReplicaGetInfoLevel level,
- [in,switch_is(level)] drsuapi_DsReplicaGetInfoRequest req,
- [out] drsuapi_DsReplicaInfoType info_type,
- [out,switch_is(info_type)] drsuapi_DsReplicaInfo info
+ [in,ref,switch_is(level)] drsuapi_DsReplicaGetInfoRequest *req,
+ [out,ref] drsuapi_DsReplicaInfoType *info_type,
+ [out,ref,switch_is(*info_type)] drsuapi_DsReplicaInfo *info
);
/*****************/
@@ -1543,12 +1545,12 @@ interface drsuapi
WERROR drsuapi_DsGetMemberships2(
[in] policy_handle *bind_handle,
- [in,out] int32 level,
- [in] [switch_is(level)] drsuapi_DsGetMemberships2Request req,
- [out] [switch_is(level)] drsuapi_DsGetMemberships2Ctr ctr
+ [in] int32 level,
+ [in,ref] [switch_is(level)] drsuapi_DsGetMemberships2Request *req,
+ [out,ref] int32 *level_out,
+ [out,ref] [switch_is(*level_out)] drsuapi_DsGetMemberships2Ctr *ctr
);
-
/*****************/
/* Function 0x16 */
[todo] WERROR DRSUAPI_REPLICA_VERIFY_OBJECTS();
@@ -1588,8 +1590,8 @@ interface drsuapi
WERROR drsuapi_QuerySitesByCost(
[in] policy_handle *bind_handle,
[in] int32 level,
- [in] [switch_is(level)] drsuapi_QuerySitesByCostRequest req,
- [out] int32 level_out,
- [out] [switch_is(level_out)] drsuapi_QuerySitesByCostCtr ctr
+ [in,ref] [switch_is(level)] drsuapi_QuerySitesByCostRequest *req,
+ [out,ref] int32 *level_out,
+ [out,ref] [switch_is(*level_out)] drsuapi_QuerySitesByCostCtr *ctr
);
}
diff --git a/source4/torture/rpc/drsuapi.c b/source4/torture/rpc/drsuapi.c
index e5cb3d7..da04c64 100644
--- a/source4/torture/rpc/drsuapi.c
+++ b/source4/torture/rpc/drsuapi.c
@@ -237,6 +237,7 @@ static bool test_DsReplicaGetInfo(struct dcerpc_pipe *p, struct torture_context
{
NTSTATUS status;
struct drsuapi_DsReplicaGetInfo r;
+ union drsuapi_DsReplicaGetInfoRequest req;
bool ret = true;
int i;
struct {
@@ -325,20 +326,21 @@ static bool test_DsReplicaGetInfo(struct dcerpc_pipe *p, struct torture_context
r.in.level = array[i].level;
switch(r.in.level) {
case DRSUAPI_DS_REPLICA_GET_INFO:
- r.in.req.req1.info_type = array[i].infotype;
- r.in.req.req1.object_dn = object_dn;
- ZERO_STRUCT(r.in.req.req1.guid1);
+ req.req1.info_type = array[i].infotype;
+ req.req1.object_dn = object_dn;
+ ZERO_STRUCT(req.req1.guid1);
break;
case DRSUAPI_DS_REPLICA_GET_INFO2:
- r.in.req.req2.info_type = array[i].infotype;
- r.in.req.req2.object_dn = object_dn;
- ZERO_STRUCT(r.in.req.req1.guid1);
- r.in.req.req2.unknown1 = 0;
- r.in.req.req2.string1 = NULL;
- r.in.req.req2.string2 = NULL;
- r.in.req.req2.unknown2 = 0;
+ req.req2.info_type = array[i].infotype;
+ req.req2.object_dn = object_dn;
+ ZERO_STRUCT(req.req1.guid1);
+ req.req2.unknown1 = 0;
+ req.req2.string1 = NULL;
+ req.req2.string2 = NULL;
+ req.req2.unknown2 = 0;
break;
}
+ r.in.req = &req;
status = dcerpc_drsuapi_DsReplicaGetInfo(p, tctx, &r);
if (!NT_STATUS_IS_OK(status)) {
@@ -611,20 +613,23 @@ bool test_QuerySitesByCost(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
{
NTSTATUS status;
struct drsuapi_QuerySitesByCost r;
+ union drsuapi_QuerySitesByCostRequest req;
bool ret = true;
const char *my_site = "Default-First-Site-Name";
const char *remote_site1 = "smbtorture-nonexisting-site1";
const char *remote_site2 = "smbtorture-nonexisting-site2";
+ req.req1.site_from = talloc_strdup(mem_ctx, my_site);
+ req.req1.num_req = 2;
+ req.req1.site_to = talloc_zero_array(mem_ctx, const char *, 2);
+ req.req1.site_to[0] = talloc_strdup(mem_ctx, remote_site1);
+ req.req1.site_to[1] = talloc_strdup(mem_ctx, remote_site2);
+ req.req1.flags = 0;
+
r.in.bind_handle = &priv->bind_handle;
r.in.level = 1;
- r.in.req.req1.site_from = talloc_strdup(mem_ctx, my_site);
- r.in.req.req1.num_req = 2;
- r.in.req.req1.site_to = talloc_zero_array(mem_ctx, const char *, r.in.req.req1.num_req);
- r.in.req.req1.site_to[0] = talloc_strdup(mem_ctx, remote_site1);
- r.in.req.req1.site_to[1] = talloc_strdup(mem_ctx, remote_site2);
- r.in.req.req1.flags = 0;
+ r.in.req = &req;
status = dcerpc_drsuapi_QuerySitesByCost(p, mem_ctx, &r);
if (!NT_STATUS_IS_OK(status)) {
@@ -641,17 +646,17 @@ bool test_QuerySitesByCost(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
if (W_ERROR_IS_OK(r.out.result)) {
- if (!W_ERROR_EQUAL(r.out.ctr.ctr1.info[0].error_code, WERR_DS_OBJ_NOT_FOUND) ||
- !W_ERROR_EQUAL(r.out.ctr.ctr1.info[1].error_code, WERR_DS_OBJ_NOT_FOUND)) {
+ if (!W_ERROR_EQUAL(r.out.ctr->ctr1.info[0].error_code, WERR_DS_OBJ_NOT_FOUND) ||
+ !W_ERROR_EQUAL(r.out.ctr->ctr1.info[1].error_code, WERR_DS_OBJ_NOT_FOUND)) {
printf("expected error_code WERR_DS_OBJ_NOT_FOUND, got %s\n",
- win_errstr(r.out.ctr.ctr1.info[0].error_code));
+ win_errstr(r.out.ctr->ctr1.info[0].error_code));
ret = false;
}
- if ((r.out.ctr.ctr1.info[0].site_cost != (uint32_t) -1) ||
- (r.out.ctr.ctr1.info[1].site_cost != (uint32_t) -1)) {
+ if ((r.out.ctr->ctr1.info[0].site_cost != (uint32_t) -1) ||
+ (r.out.ctr->ctr1.info[1].site_cost != (uint32_t) -1)) {
printf("expected site_cost %d, got %d\n",
- (uint32_t) -1, r.out.ctr.ctr1.info[0].site_cost);
+ (uint32_t) -1, r.out.ctr->ctr1.info[0].site_cost);
ret = false;
}
}
diff --git a/source4/torture/rpc/dssync.c b/source4/torture/rpc/dssync.c
index 41bb168..185e8ef 100644
--- a/source4/torture/rpc/dssync.c
+++ b/source4/torture/rpc/dssync.c
@@ -809,6 +809,7 @@ static bool test_FetchNT4Data(struct torture_context *tctx,
NTSTATUS status;
bool ret = true;
struct drsuapi_DsGetNT4ChangeLog r;
+ union drsuapi_DsGetNT4ChangeLogRequest req;
struct GUID null_guid;
struct dom_sid null_sid;
DATA_BLOB cookie;
@@ -821,12 +822,14 @@ static bool test_FetchNT4Data(struct torture_context *tctx,
r.in.bind_handle = &ctx->new_dc.drsuapi.bind_handle;
r.in.level = 1;
- r.in.req.req1.unknown1 = lp_parm_int(tctx->lp_ctx, NULL, "dssync", "nt4-1", 3);
- r.in.req.req1.unknown2 = lp_parm_int(tctx->lp_ctx, NULL, "dssync", "nt4-2", 0x00004000);
+ req.req1.unknown1 = lp_parm_int(tctx->lp_ctx, NULL, "dssync", "nt4-1", 3);
+ req.req1.unknown2 = lp_parm_int(tctx->lp_ctx, NULL, "dssync", "nt4-2", 0x00004000);
while (1) {
- r.in.req.req1.length = cookie.length;
- r.in.req.req1.data = cookie.data;
+ req.req1.length = cookie.length;
+ req.req1.data = cookie.data;
+
+ r.in.req = &req;
status = dcerpc_drsuapi_DsGetNT4ChangeLog(ctx->new_dc.drsuapi.pipe, ctx, &r);
if (NT_STATUS_EQUAL(status, NT_STATUS_NOT_IMPLEMENTED)) {
@@ -845,16 +848,16 @@ static bool test_FetchNT4Data(struct torture_context *tctx,
} else if (!W_ERROR_IS_OK(r.out.result)) {
printf("DsGetNT4ChangeLog failed - %s\n", win_errstr(r.out.result));
ret = false;
- } else if (r.out.level != 1) {
- printf("DsGetNT4ChangeLog unknown level - %u\n", r.out.level);
+ } else if (*r.out.level_out != 1) {
+ printf("DsGetNT4ChangeLog unknown level - %u\n", *r.out.level_out);
ret = false;
- } else if (NT_STATUS_IS_OK(r.out.info.info1.status)) {
- } else if (NT_STATUS_EQUAL(r.out.info.info1.status, STATUS_MORE_ENTRIES)) {
- cookie.length = r.out.info.info1.length1;
- cookie.data = r.out.info.info1.data1;
+ } else if (NT_STATUS_IS_OK(r.out.info->info1.status)) {
+ } else if (NT_STATUS_EQUAL(r.out.info->info1.status, STATUS_MORE_ENTRIES)) {
+ cookie.length = r.out.info->info1.length1;
+ cookie.data = r.out.info->info1.data1;
continue;
} else {
- printf("DsGetNT4ChangeLog failed - %s\n", nt_errstr(r.out.info.info1.status));
+ printf("DsGetNT4ChangeLog failed - %s\n", nt_errstr(r.out.info->info1.status));
ret = false;
}
--
Samba Shared Repository
More information about the samba-cvs
mailing list