r24560: rename some DCERPC_ prefixes into NDR_
authorStefan Metzmacher <metze@samba.org>
Sun, 19 Aug 2007 22:09:21 +0000 (22:09 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 20:02:15 +0000 (15:02 -0500)
metze

source/lib/messaging/irpc.h
source/libcli/finddcs.c
source/libcli/util/clilsa.c
source/librpc/rpc/dcerpc_schannel.c
source/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm
source/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm
source/pidl/lib/Parse/Pidl/Samba4/EJS.pm
source/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm
source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
source/pidl/tests/samba3-cli.pl
source/torture/rpc/samlogon.c

index ba23b19430e749ebc0326dfaf92f9be96aff1270..40640c85458e2dbd28d0e84c82bc404d14daca73 100644 (file)
@@ -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)
 
 
 /*
index 5371879895169f9f75643dfb6cd207adb586d792..a159ab6dfcc0ed390c82364ddae7bf4b15ca11f7 100644 (file)
@@ -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);
index d51ad5e12ddeea914b3891c110432ced9593357a..6fd84bbe740149a537cf113b42188fb58948f93b 100644 (file)
@@ -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;
index 6b0a5a2455d133a98c67979834ba61225fab0f1f..c6b3a5fc0f380cf0302ee4b1c1eac3c4f7672d71 100644 (file)
@@ -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;
        }
index 3f9d1f0464aa2c9906eb7708602a24ff7644963a..b4e635f0dba7da392ed52457d64d744c78d645b3 100644 (file)
@@ -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($_);
index 071163c3004e86dd00e4b457234d33662f2166d4..f7acddc7c4a6957bde0dd86b449fa16b5fad9ff8 100644 (file)
@@ -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;
index 4f4a49c1d424e27168440d2e9a20908226781e31..13e38545a7c67dcc4e307da79898ee2632b2dc14 100644 (file)
@@ -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)");
index 97d0e6dccb4544e232cd6dcf3c084c2ec554ef0e..cf14b645a97b72ea8c18a9755847b2f3012681c8 100644 (file)
@@ -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)
index 5916cd1bf0441863de1c1c2ad65298554195684c..7c9e9382aff802ce2107a5609ba90ff755ef3f47 100644 (file)
@@ -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)");
 
 }
 
index b2b12d2d43d987c1b63e0a923cfe0b67b52c1936..733bf93a99858d1538084f9cef4b65ab3bcaa29b 100755 (executable)
@@ -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;
index b01c911979734341f1f073b0120fd3fb840c5d37..d2998f5f342e3397c05b0288a3661a055e536d6b 100644 (file)
@@ -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)) {