summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-11-08 19:37:42 +0100
committerVolker Lendecke <vl@samba.org>2009-11-08 19:43:46 +0100
commit47455b4d1adf2e01f0994005a6302ae32c012478 (patch)
treef3317aca52f1ca5c3cc9f7ed4a429250295941d4 /source3
parent82c35e460e00d6f9e61df2d20ea9d0ccf765636a (diff)
downloadsamba-47455b4d1adf2e01f0994005a6302ae32c012478.tar.gz
samba-47455b4d1adf2e01f0994005a6302ae32c012478.tar.bz2
samba-47455b4d1adf2e01f0994005a6302ae32c012478.zip
Revert "s3: Do not reference the ndr_tables in the server calls directly"
This reverts commit 98fb71782e05ae72cd6abeb38b6e0b96a50c1761.
Diffstat (limited to 'source3')
-rw-r--r--source3/include/ntdomain.h2
-rw-r--r--source3/librpc/gen_ndr/srv_wbint.c46
-rw-r--r--source3/rpc_server/srv_lsa_hnd.c5
-rw-r--r--source3/rpc_server/srv_pipe_hnd.c13
-rw-r--r--source3/winbindd/winbindd_dual_ndr.c1
5 files changed, 29 insertions, 38 deletions
diff --git a/source3/include/ntdomain.h b/source3/include/ntdomain.h
index 10cd32170d..bbe653b8bd 100644
--- a/source3/include/ntdomain.h
+++ b/source3/include/ntdomain.h
@@ -169,7 +169,7 @@ typedef struct pipes_struct {
struct auth_serversupplied_info *server_info;
- const struct ndr_interface_table *interface;
+ struct ndr_syntax_id syntax;
/* linked list of rpc dispatch tables associated
with the open rpc contexts */
diff --git a/source3/librpc/gen_ndr/srv_wbint.c b/source3/librpc/gen_ndr/srv_wbint.c
index a7112cb94b..08a346a3f6 100644
--- a/source3/librpc/gen_ndr/srv_wbint.c
+++ b/source3/librpc/gen_ndr/srv_wbint.c
@@ -15,7 +15,7 @@ static bool api_wbint_Ping(pipes_struct *p)
DATA_BLOB blob;
struct wbint_Ping *r;
- call = &p->interface->calls[NDR_WBINT_PING];
+ call = &ndr_table_wbint.calls[NDR_WBINT_PING];
r = talloc(talloc_tos(), struct wbint_Ping);
if (r == NULL) {
@@ -95,7 +95,7 @@ static bool api_wbint_LookupSid(pipes_struct *p)
DATA_BLOB blob;
struct wbint_LookupSid *r;
- call = &p->interface->calls[NDR_WBINT_LOOKUPSID];
+ call = &ndr_table_wbint.calls[NDR_WBINT_LOOKUPSID];
r = talloc(talloc_tos(), struct wbint_LookupSid);
if (r == NULL) {
@@ -187,7 +187,7 @@ static bool api_wbint_LookupName(pipes_struct *p)
DATA_BLOB blob;
struct wbint_LookupName *r;
- call = &p->interface->calls[NDR_WBINT_LOOKUPNAME];
+ call = &ndr_table_wbint.calls[NDR_WBINT_LOOKUPNAME];
r = talloc(talloc_tos(), struct wbint_LookupName);
if (r == NULL) {
@@ -273,7 +273,7 @@ static bool api_wbint_Sid2Uid(pipes_struct *p)
DATA_BLOB blob;
struct wbint_Sid2Uid *r;
- call = &p->interface->calls[NDR_WBINT_SID2UID];
+ call = &ndr_table_wbint.calls[NDR_WBINT_SID2UID];
r = talloc(talloc_tos(), struct wbint_Sid2Uid);
if (r == NULL) {
@@ -353,7 +353,7 @@ static bool api_wbint_Sid2Gid(pipes_struct *p)
DATA_BLOB blob;
struct wbint_Sid2Gid *r;
- call = &p->interface->calls[NDR_WBINT_SID2GID];
+ call = &ndr_table_wbint.calls[NDR_WBINT_SID2GID];
r = talloc(talloc_tos(), struct wbint_Sid2Gid);
if (r == NULL) {
@@ -433,7 +433,7 @@ static bool api_wbint_Uid2Sid(pipes_struct *p)
DATA_BLOB blob;
struct wbint_Uid2Sid *r;
- call = &p->interface->calls[NDR_WBINT_UID2SID];
+ call = &ndr_table_wbint.calls[NDR_WBINT_UID2SID];
r = talloc(talloc_tos(), struct wbint_Uid2Sid);
if (r == NULL) {
@@ -513,7 +513,7 @@ static bool api_wbint_Gid2Sid(pipes_struct *p)
DATA_BLOB blob;
struct wbint_Gid2Sid *r;
- call = &p->interface->calls[NDR_WBINT_GID2SID];
+ call = &ndr_table_wbint.calls[NDR_WBINT_GID2SID];
r = talloc(talloc_tos(), struct wbint_Gid2Sid);
if (r == NULL) {
@@ -593,7 +593,7 @@ static bool api_wbint_AllocateUid(pipes_struct *p)
DATA_BLOB blob;
struct wbint_AllocateUid *r;
- call = &p->interface->calls[NDR_WBINT_ALLOCATEUID];
+ call = &ndr_table_wbint.calls[NDR_WBINT_ALLOCATEUID];
r = talloc(talloc_tos(), struct wbint_AllocateUid);
if (r == NULL) {
@@ -673,7 +673,7 @@ static bool api_wbint_AllocateGid(pipes_struct *p)
DATA_BLOB blob;
struct wbint_AllocateGid *r;
- call = &p->interface->calls[NDR_WBINT_ALLOCATEGID];
+ call = &ndr_table_wbint.calls[NDR_WBINT_ALLOCATEGID];
r = talloc(talloc_tos(), struct wbint_AllocateGid);
if (r == NULL) {
@@ -753,7 +753,7 @@ static bool api_wbint_QueryUser(pipes_struct *p)
DATA_BLOB blob;
struct wbint_QueryUser *r;
- call = &p->interface->calls[NDR_WBINT_QUERYUSER];
+ call = &ndr_table_wbint.calls[NDR_WBINT_QUERYUSER];
r = talloc(talloc_tos(), struct wbint_QueryUser);
if (r == NULL) {
@@ -833,7 +833,7 @@ static bool api_wbint_LookupUserAliases(pipes_struct *p)
DATA_BLOB blob;
struct wbint_LookupUserAliases *r;
- call = &p->interface->calls[NDR_WBINT_LOOKUPUSERALIASES];
+ call = &ndr_table_wbint.calls[NDR_WBINT_LOOKUPUSERALIASES];
r = talloc(talloc_tos(), struct wbint_LookupUserAliases);
if (r == NULL) {
@@ -913,7 +913,7 @@ static bool api_wbint_LookupUserGroups(pipes_struct *p)
DATA_BLOB blob;
struct wbint_LookupUserGroups *r;
- call = &p->interface->calls[NDR_WBINT_LOOKUPUSERGROUPS];
+ call = &ndr_table_wbint.calls[NDR_WBINT_LOOKUPUSERGROUPS];
r = talloc(talloc_tos(), struct wbint_LookupUserGroups);
if (r == NULL) {
@@ -993,7 +993,7 @@ static bool api_wbint_QuerySequenceNumber(pipes_struct *p)
DATA_BLOB blob;
struct wbint_QuerySequenceNumber *r;
- call = &p->interface->calls[NDR_WBINT_QUERYSEQUENCENUMBER];
+ call = &ndr_table_wbint.calls[NDR_WBINT_QUERYSEQUENCENUMBER];
r = talloc(talloc_tos(), struct wbint_QuerySequenceNumber);
if (r == NULL) {
@@ -1073,7 +1073,7 @@ static bool api_wbint_LookupGroupMembers(pipes_struct *p)
DATA_BLOB blob;
struct wbint_LookupGroupMembers *r;
- call = &p->interface->calls[NDR_WBINT_LOOKUPGROUPMEMBERS];
+ call = &ndr_table_wbint.calls[NDR_WBINT_LOOKUPGROUPMEMBERS];
r = talloc(talloc_tos(), struct wbint_LookupGroupMembers);
if (r == NULL) {
@@ -1153,7 +1153,7 @@ static bool api_wbint_QueryUserList(pipes_struct *p)
DATA_BLOB blob;
struct wbint_QueryUserList *r;
- call = &p->interface->calls[NDR_WBINT_QUERYUSERLIST];
+ call = &ndr_table_wbint.calls[NDR_WBINT_QUERYUSERLIST];
r = talloc(talloc_tos(), struct wbint_QueryUserList);
if (r == NULL) {
@@ -1233,7 +1233,7 @@ static bool api_wbint_QueryGroupList(pipes_struct *p)
DATA_BLOB blob;
struct wbint_QueryGroupList *r;
- call = &p->interface->calls[NDR_WBINT_QUERYGROUPLIST];
+ call = &ndr_table_wbint.calls[NDR_WBINT_QUERYGROUPLIST];
r = talloc(talloc_tos(), struct wbint_QueryGroupList);
if (r == NULL) {
@@ -1313,7 +1313,7 @@ static bool api_wbint_DsGetDcName(pipes_struct *p)
DATA_BLOB blob;
struct wbint_DsGetDcName *r;
- call = &p->interface->calls[NDR_WBINT_DSGETDCNAME];
+ call = &ndr_table_wbint.calls[NDR_WBINT_DSGETDCNAME];
r = talloc(talloc_tos(), struct wbint_DsGetDcName);
if (r == NULL) {
@@ -1393,7 +1393,7 @@ static bool api_wbint_LookupRids(pipes_struct *p)
DATA_BLOB blob;
struct wbint_LookupRids *r;
- call = &p->interface->calls[NDR_WBINT_LOOKUPRIDS];
+ call = &ndr_table_wbint.calls[NDR_WBINT_LOOKUPRIDS];
r = talloc(talloc_tos(), struct wbint_LookupRids);
if (r == NULL) {
@@ -1473,7 +1473,7 @@ static bool api_wbint_CheckMachineAccount(pipes_struct *p)
DATA_BLOB blob;
struct wbint_CheckMachineAccount *r;
- call = &p->interface->calls[NDR_WBINT_CHECKMACHINEACCOUNT];
+ call = &ndr_table_wbint.calls[NDR_WBINT_CHECKMACHINEACCOUNT];
r = talloc(talloc_tos(), struct wbint_CheckMachineAccount);
if (r == NULL) {
@@ -1546,7 +1546,7 @@ static bool api_wbint_ChangeMachineAccount(pipes_struct *p)
DATA_BLOB blob;
struct wbint_ChangeMachineAccount *r;
- call = &p->interface->calls[NDR_WBINT_CHANGEMACHINEACCOUNT];
+ call = &ndr_table_wbint.calls[NDR_WBINT_CHANGEMACHINEACCOUNT];
r = talloc(talloc_tos(), struct wbint_ChangeMachineAccount);
if (r == NULL) {
@@ -1619,7 +1619,7 @@ static bool api_wbint_SetMapping(pipes_struct *p)
DATA_BLOB blob;
struct wbint_SetMapping *r;
- call = &p->interface->calls[NDR_WBINT_SETMAPPING];
+ call = &ndr_table_wbint.calls[NDR_WBINT_SETMAPPING];
r = talloc(talloc_tos(), struct wbint_SetMapping);
if (r == NULL) {
@@ -1692,7 +1692,7 @@ static bool api_wbint_RemoveMapping(pipes_struct *p)
DATA_BLOB blob;
struct wbint_RemoveMapping *r;
- call = &p->interface->calls[NDR_WBINT_REMOVEMAPPING];
+ call = &ndr_table_wbint.calls[NDR_WBINT_REMOVEMAPPING];
r = talloc(talloc_tos(), struct wbint_RemoveMapping);
if (r == NULL) {
@@ -1765,7 +1765,7 @@ static bool api_wbint_SetHWM(pipes_struct *p)
DATA_BLOB blob;
struct wbint_SetHWM *r;
- call = &p->interface->calls[NDR_WBINT_SETHWM];
+ call = &ndr_table_wbint.calls[NDR_WBINT_SETHWM];
r = talloc(talloc_tos(), struct wbint_SetHWM);
if (r == NULL) {
diff --git a/source3/rpc_server/srv_lsa_hnd.c b/source3/rpc_server/srv_lsa_hnd.c
index 8b4b4a9252..4233b6f0e6 100644
--- a/source3/rpc_server/srv_lsa_hnd.c
+++ b/source3/rpc_server/srv_lsa_hnd.c
@@ -81,11 +81,10 @@ bool init_pipe_handle_list(pipes_struct *p, const struct ndr_syntax_id *syntax)
for (plist = get_first_internal_pipe();
plist;
plist = get_next_internal_pipe(plist)) {
- if (ndr_syntax_id_equal(syntax,
- &plist->interface->syntax_id)) {
+ if (ndr_syntax_id_equal(syntax, &plist->syntax)) {
break;
}
- if (is_samr_lsa_pipe(&plist->interface->syntax_id)
+ if (is_samr_lsa_pipe(&plist->syntax)
&& is_samr_lsa_pipe(syntax)) {
/*
* samr and lsa share a handle space (same process
diff --git a/source3/rpc_server/srv_pipe_hnd.c b/source3/rpc_server/srv_pipe_hnd.c
index 8bc2bdd505..e7d94d70ec 100644
--- a/source3/rpc_server/srv_pipe_hnd.c
+++ b/source3/rpc_server/srv_pipe_hnd.c
@@ -57,8 +57,7 @@ pipes_struct *get_next_internal_pipe(pipes_struct *p)
const char *get_pipe_name_tos(struct pipes_struct *p)
{
- return get_pipe_name_from_syntax(talloc_tos(),
- &p->interface->syntax_id);
+ return get_pipe_name_from_syntax(talloc_tos(), &p->syntax);
}
/****************************************************************************
@@ -120,14 +119,6 @@ static struct pipes_struct *make_internal_rpc_pipe_p(TALLOC_CTX *mem_ctx,
return NULL;
}
- p->interface = get_iface_from_syntax(syntax);
- if (p->interface == NULL) {
- DEBUG(10, ("Could not find ndr table for syntax\n"));
- TALLOC_FREE(p->mem_ctx);
- TALLOC_FREE(p);
- return NULL;
- }
-
if (!init_pipe_handle_list(p, syntax)) {
DEBUG(0,("open_rpc_pipe_p: init_pipe_handles failed.\n"));
talloc_destroy(p->mem_ctx);
@@ -170,6 +161,8 @@ static struct pipes_struct *make_internal_rpc_pipe_p(TALLOC_CTX *mem_ctx,
*/
prs_init_empty(&p->out_data.rdata, p->mem_ctx, MARSHALL);
+ p->syntax = *syntax;
+
DEBUG(4,("Created internal pipe %s (pipes_open=%d)\n",
get_pipe_name_from_syntax(talloc_tos(), syntax), pipes_open));
diff --git a/source3/winbindd/winbindd_dual_ndr.c b/source3/winbindd/winbindd_dual_ndr.c
index 916499ad9c..eb018aa87e 100644
--- a/source3/winbindd/winbindd_dual_ndr.c
+++ b/source3/winbindd/winbindd_dual_ndr.c
@@ -267,7 +267,6 @@ enum winbindd_result winbindd_dual_ndrcmd(struct winbindd_domain *domain,
ZERO_STRUCT(p);
p.mem_ctx = talloc_stackframe();
- p.interface = &ndr_table_wbint;
p.in_data.data.buffer_size = state->request->extra_len;
p.in_data.data.data_p = state->request->extra_data.data;
prs_init(&p.out_data.rdata, 0, state->mem_ctx, false);