summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-08-19 22:09:21 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:02:15 -0500
commit0d7d5a6d492253f184ac58fe45ca22af5a3731de (patch)
tree1cb174956e135e6a21e577d01abe7e298f31980f
parentf14bd1a90ab47a418c0ec2492990a417a0bb3bf6 (diff)
downloadsamba-0d7d5a6d492253f184ac58fe45ca22af5a3731de.tar.gz
samba-0d7d5a6d492253f184ac58fe45ca22af5a3731de.tar.bz2
samba-0d7d5a6d492253f184ac58fe45ca22af5a3731de.zip
r24560: rename some DCERPC_ prefixes into NDR_
metze (This used to be commit f874eca5dab74e930d0ec52abeb06295d2d90476)
-rw-r--r--source4/lib/messaging/irpc.h6
-rw-r--r--source4/libcli/finddcs.c2
-rw-r--r--source4/libcli/util/clilsa.c2
-rw-r--r--source4/librpc/rpc/dcerpc_schannel.c2
-rw-r--r--source4/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm2
-rw-r--r--source4/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm2
-rw-r--r--source4/pidl/lib/Parse/Pidl/Samba4/EJS.pm2
-rw-r--r--source4/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm2
-rw-r--r--source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm20
-rwxr-xr-xsource4/pidl/tests/samba3-cli.pl2
-rw-r--r--source4/torture/rpc/samlogon.c14
11 files changed, 28 insertions, 28 deletions
diff --git a/source4/lib/messaging/irpc.h b/source4/lib/messaging/irpc.h
index ba23b19430..40640c8545 100644
--- a/source4/lib/messaging/irpc.h
+++ b/source4/lib/messaging/irpc.h
@@ -46,15 +46,15 @@ typedef NTSTATUS (*irpc_function_t)(struct irpc_message *, void *r);
/* register a server function with the irpc messaging system */
#define IRPC_REGISTER(msg_ctx, pipename, funcname, function, private) \
irpc_register(msg_ctx, &ndr_table_ ## pipename, \
- DCERPC_ ## funcname, \
+ NDR_ ## funcname, \
(irpc_function_t)function, private)
/* make a irpc call */
#define IRPC_CALL(msg_ctx, server_id, pipename, funcname, ptr, ctx) \
- irpc_call(msg_ctx, server_id, &ndr_table_ ## pipename, DCERPC_ ## funcname, ptr, ctx)
+ irpc_call(msg_ctx, server_id, &ndr_table_ ## pipename, NDR_ ## funcname, ptr, ctx)
#define IRPC_CALL_SEND(msg_ctx, server_id, pipename, funcname, ptr, ctx) \
- irpc_call_send(msg_ctx, server_id, &ndr_table_ ## pipename, DCERPC_ ## funcname, ptr, ctx)
+ irpc_call_send(msg_ctx, server_id, &ndr_table_ ## pipename, NDR_ ## funcname, ptr, ctx)
/*
diff --git a/source4/libcli/finddcs.c b/source4/libcli/finddcs.c
index 5371879895..a159ab6dfc 100644
--- a/source4/libcli/finddcs.c
+++ b/source4/libcli/finddcs.c
@@ -151,7 +151,7 @@ static void finddcs_name_resolved(struct composite_context *ctx)
state->r.in.domain_sid = state->domain_sid;
ireq = irpc_call_send(state->msg_ctx, nbt_servers[0],
- &ndr_table_irpc, DCERPC_NBTD_GETDCNAME,
+ &ndr_table_irpc, NDR_NBTD_GETDCNAME,
&state->r, state);
if (!ireq) {
fallback_node_status(state);
diff --git a/source4/libcli/util/clilsa.c b/source4/libcli/util/clilsa.c
index d51ad5e12d..6fd84bbe74 100644
--- a/source4/libcli/util/clilsa.c
+++ b/source4/libcli/util/clilsa.c
@@ -85,7 +85,7 @@ static NTSTATUS smblsa_connect(struct smbcli_state *cli)
}
/* open the LSA pipe */
- status = dcerpc_pipe_open_smb(lsa->pipe, lsa->ipc_tree, DCERPC_LSARPC_NAME);
+ status = dcerpc_pipe_open_smb(lsa->pipe, lsa->ipc_tree, NDR_LSARPC_NAME);
if (!NT_STATUS_IS_OK(status)) {
talloc_free(lsa);
return status;
diff --git a/source4/librpc/rpc/dcerpc_schannel.c b/source4/librpc/rpc/dcerpc_schannel.c
index 6b0a5a2455..c6b3a5fc0f 100644
--- a/source4/librpc/rpc/dcerpc_schannel.c
+++ b/source4/librpc/rpc/dcerpc_schannel.c
@@ -68,7 +68,7 @@ static void continue_epm_map_binding(struct composite_context *ctx)
c->status = dcerpc_epm_map_binding_recv(ctx);
if (!NT_STATUS_IS_OK(c->status)) {
DEBUG(0,("Failed to map DCERPC/TCP NCACN_NP pipe for '%s' - %s\n",
- DCERPC_NETLOGON_UUID, nt_errstr(c->status)));
+ NDR_NETLOGON_UUID, nt_errstr(c->status)));
composite_error(c, c->status);
return;
}
diff --git a/source4/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm b/source4/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm
index 3f9d1f0464..b4e635f0db 100644
--- a/source4/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm
+++ b/source4/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm
@@ -40,7 +40,7 @@ sub ParseFunction($$$)
my $inargs = "";
my $defargs = "";
- my $ufn = "DCERPC_".uc($fn->{NAME});
+ my $ufn = "NDR_".uc($fn->{NAME});
foreach (@{$fn->{ELEMENTS}}) {
$defargs .= ", " . DeclLong($_);
diff --git a/source4/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm b/source4/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm
index 071163c300..f7acddc7c4 100644
--- a/source4/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm
+++ b/source4/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm
@@ -199,7 +199,7 @@ sub ParseInterface($)
indent;
foreach (@{$if->{FUNCTIONS}}) {
- pidl "{\"" . uc($_->{NAME}) . "\", DCERPC_" . uc($_->{NAME}) . ", api_$_->{NAME}},";
+ pidl "{\"" . uc($_->{NAME}) . "\", NDR_" . uc($_->{NAME}) . ", api_$_->{NAME}},";
}
deindent;
diff --git a/source4/pidl/lib/Parse/Pidl/Samba4/EJS.pm b/source4/pidl/lib/Parse/Pidl/Samba4/EJS.pm
index 4f4a49c1d4..13e38545a7 100644
--- a/source4/pidl/lib/Parse/Pidl/Samba4/EJS.pm
+++ b/source4/pidl/lib/Parse/Pidl/Samba4/EJS.pm
@@ -689,7 +689,7 @@ sub EjsFunction($$$)
{
my ($self, $d, $iface) = @_;
my $name = $d->{NAME};
- my $callnum = uc("DCERPC_$name");
+ my $callnum = uc("NDR_$name");
my $table = "&ndr_table_$iface";
$self->pidl("static int ejs_$name(int eid, int argc, struct MprVar **argv)");
diff --git a/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm b/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm
index 97d0e6dccb..cf14b645a9 100644
--- a/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm
+++ b/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm
@@ -34,7 +34,7 @@ struct rpc_request *dcerpc_$name\_send(struct dcerpc_pipe *p, TALLOC_CTX *mem_ct
NDR_PRINT_IN_DEBUG($name, r);
}
- return dcerpc_ndr_request_send(p, NULL, &ndr_table_$interface->{NAME}, DCERPC_$uname, mem_ctx, r);
+ return dcerpc_ndr_request_send(p, NULL, &ndr_table_$interface->{NAME}, NDR_$uname, mem_ctx, r);
}
NTSTATUS dcerpc_$name(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct $name *r)
diff --git a/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm b/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
index 5916cd1bf0..7c9e9382af 100644
--- a/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
+++ b/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
@@ -2337,9 +2337,9 @@ sub FunctionTable($$)
$self->pidl("\t.name\t\t= \"$interface->{NAME}\",");
$self->pidl("\t.syntax_id\t= {");
$self->pidl("\t\t" . print_uuid($interface->{UUID}) .",");
- $self->pidl("\t\tDCERPC_$uname\_VERSION");
+ $self->pidl("\t\tNDR_$uname\_VERSION");
$self->pidl("\t},");
- $self->pidl("\t.helpstring\t= DCERPC_$uname\_HELPSTRING,");
+ $self->pidl("\t.helpstring\t= NDR_$uname\_HELPSTRING,");
$self->pidl("\t.num_calls\t= $count,");
$self->pidl("\t.calls\t\t= $interface->{NAME}\_calls,");
$self->pidl("\t.endpoints\t= &$interface->{NAME}\_endpoints,");
@@ -2395,16 +2395,16 @@ sub HeaderInterface($$)
if (defined $interface->{PROPERTIES}->{uuid}) {
my $name = uc $interface->{NAME};
- $self->pidl_hdr("#define DCERPC_$name\_UUID " .
+ $self->pidl_hdr("#define NDR_$name\_UUID " .
Parse::Pidl::Util::make_str(lc($interface->{PROPERTIES}->{uuid})));
if(!defined $interface->{PROPERTIES}->{version}) { $interface->{PROPERTIES}->{version} = "0.0"; }
- $self->pidl_hdr("#define DCERPC_$name\_VERSION $interface->{PROPERTIES}->{version}");
+ $self->pidl_hdr("#define NDR_$name\_VERSION $interface->{PROPERTIES}->{version}");
- $self->pidl_hdr("#define DCERPC_$name\_NAME \"$interface->{NAME}\"");
+ $self->pidl_hdr("#define NDR_$name\_NAME \"$interface->{NAME}\"");
if(!defined $interface->{PROPERTIES}->{helpstring}) { $interface->{PROPERTIES}->{helpstring} = "NULL"; }
- $self->pidl_hdr("#define DCERPC_$name\_HELPSTRING $interface->{PROPERTIES}->{helpstring}");
+ $self->pidl_hdr("#define NDR_$name\_HELPSTRING $interface->{PROPERTIES}->{helpstring}");
$self->pidl_hdr("extern const struct ndr_interface_table ndr_table_$interface->{NAME};");
$self->pidl_hdr("NTSTATUS dcerpc_server_$interface->{NAME}_init(void);");
@@ -2417,10 +2417,10 @@ sub HeaderInterface($$)
my $val = sprintf("0x%02x", $count);
if (defined($interface->{BASE})) {
- $val .= " + DCERPC_" . uc $interface->{BASE} . "_CALL_COUNT";
+ $val .= " + NDR_" . uc $interface->{BASE} . "_CALL_COUNT";
}
- $self->pidl_hdr("#define DCERPC_$u_name ($val)");
+ $self->pidl_hdr("#define NDR_$u_name ($val)");
$self->pidl_hdr("");
$count++;
@@ -2429,10 +2429,10 @@ sub HeaderInterface($$)
my $val = $count;
if (defined($interface->{BASE})) {
- $val .= " + DCERPC_" . uc $interface->{BASE} . "_CALL_COUNT";
+ $val .= " + NDR_" . uc $interface->{BASE} . "_CALL_COUNT";
}
- $self->pidl_hdr("#define DCERPC_" . uc $interface->{NAME} . "_CALL_COUNT ($val)");
+ $self->pidl_hdr("#define NDR_" . uc $interface->{NAME} . "_CALL_COUNT ($val)");
}
diff --git a/source4/pidl/tests/samba3-cli.pl b/source4/pidl/tests/samba3-cli.pl
index b2b12d2d43..733bf93a99 100755
--- a/source4/pidl/tests/samba3-cli.pl
+++ b/source4/pidl/tests/samba3-cli.pl
@@ -39,7 +39,7 @@ is($x->{res}, "NTSTATUS rpccli_bar(struct rpc_pipe_client *cli, TALLOC_CTX *mem_
\tif (DEBUGLEVEL >= 10)
\t\tNDR_PRINT_IN_DEBUG(bar, &r);
\t
-\tstatus = cli_do_rpc_ndr(cli, mem_ctx, PI_foo, DCERPC_BAR, &r, (ndr_pull_flags_fn_t)ndr_pull_bar, (ndr_push_flags_fn_t)ndr_push_bar);
+\tstatus = cli_do_rpc_ndr(cli, mem_ctx, PI_foo, NDR_BAR, &r, (ndr_pull_flags_fn_t)ndr_pull_bar, (ndr_push_flags_fn_t)ndr_push_bar);
\t
\tif (!NT_STATUS_IS_OK(status)) {
\t\treturn status;
diff --git a/source4/torture/rpc/samlogon.c b/source4/torture/rpc/samlogon.c
index b01c911979..d2998f5f34 100644
--- a/source4/torture/rpc/samlogon.c
+++ b/source4/torture/rpc/samlogon.c
@@ -146,7 +146,7 @@ static NTSTATUS check_samlogon(struct samlogon_state *samlogon_state,
}
switch (samlogon_state->function_level) {
- case DCERPC_NETR_LOGONSAMLOGON:
+ case NDR_NETR_LOGONSAMLOGON:
ZERO_STRUCT(samlogon_state->auth2);
creds_client_authenticator(samlogon_state->creds, &samlogon_state->auth);
@@ -179,7 +179,7 @@ static NTSTATUS check_samlogon(struct samlogon_state *samlogon_state,
break;
}
break;
- case DCERPC_NETR_LOGONSAMLOGONEX:
+ case NDR_NETR_LOGONSAMLOGONEX:
status = dcerpc_netr_LogonSamLogonEx(samlogon_state->p, samlogon_state->mem_ctx, r_ex);
if (!NT_STATUS_IS_OK(status)) {
if (error_string) {
@@ -204,7 +204,7 @@ static NTSTATUS check_samlogon(struct samlogon_state *samlogon_state,
break;
}
break;
- case DCERPC_NETR_LOGONSAMLOGONWITHFLAGS:
+ case NDR_NETR_LOGONSAMLOGONWITHFLAGS:
ZERO_STRUCT(samlogon_state->auth2);
creds_client_authenticator(samlogon_state->creds, &samlogon_state->auth);
@@ -1320,9 +1320,9 @@ static BOOL test_SamLogon(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
int validation_levels[] = {2,3,6};
int logon_levels[] = { 2, 6 };
int function_levels[] = {
- DCERPC_NETR_LOGONSAMLOGON,
- DCERPC_NETR_LOGONSAMLOGONEX,
- DCERPC_NETR_LOGONSAMLOGONWITHFLAGS };
+ NDR_NETR_LOGONSAMLOGON,
+ NDR_NETR_LOGONSAMLOGONEX,
+ NDR_NETR_LOGONSAMLOGONWITHFLAGS };
struct samlogon_state samlogon_state;
d_printf("testing netr_LogonSamLogon and netr_LogonSamLogonWithFlags\n");
@@ -1594,7 +1594,7 @@ BOOL torture_rpc_samlogon(struct torture_context *torture)
b->flags |= DCERPC_SCHANNEL | DCERPC_SIGN | DCERPC_SCHANNEL_128;
status = dcerpc_pipe_connect_b(mem_ctx, &p, b,
- &ndr_table_netlogon,
+ &ndr_table_netlogon,
machine_credentials, NULL);
if (!NT_STATUS_IS_OK(status)) {