summaryrefslogtreecommitdiffstats
path: root/source3/librpc/rpc
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-06-24 16:26:23 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-06-24 16:26:23 +1000
commit6da26870e0ae5acd6ff49a30ec2f6886b44d095e (patch)
tree850c71039563c16a5d563c47e7ba2ab645baf198 /source3/librpc/rpc
parent6925a799d04c6fa59dd2ddef1f5510f9bb7d17d1 (diff)
parent2610c05b5b95cc7036b3d6dfb894c6cfbdb68483 (diff)
downloadsamba-6da26870e0ae5acd6ff49a30ec2f6886b44d095e.tar.gz
samba-6da26870e0ae5acd6ff49a30ec2f6886b44d095e.tar.xz
samba-6da26870e0ae5acd6ff49a30ec2f6886b44d095e.zip
Merge 2610c05b5b95cc7036b3d6dfb894c6cfbdb68483 as Samba-4.0alpha16samba-4.0.0alpha16
Diffstat (limited to 'source3/librpc/rpc')
-rw-r--r--source3/librpc/rpc/dcerpc.h23
-rw-r--r--source3/librpc/rpc/dcerpc_ep.c7
-rw-r--r--source3/librpc/rpc/dcerpc_helpers.c1
-rw-r--r--source3/librpc/rpc/rpc_common.c2
4 files changed, 27 insertions, 6 deletions
diff --git a/source3/librpc/rpc/dcerpc.h b/source3/librpc/rpc/dcerpc.h
index 0a6ddaca173..d7e8e0c193d 100644
--- a/source3/librpc/rpc/dcerpc.h
+++ b/source3/librpc/rpc/dcerpc.h
@@ -33,7 +33,20 @@
#define SMB_RPC_INTERFACE_VERSION 1
struct NL_AUTH_MESSAGE;
-struct pipe_auth_data;
+
+/* auth state for all bind types. */
+
+struct pipe_auth_data {
+ enum dcerpc_AuthType auth_type;
+ enum dcerpc_AuthLevel auth_level;
+
+ void *auth_ctx;
+
+ /* Only the client code uses these 3 for now */
+ char *domain;
+ char *user_name;
+ DATA_BLOB user_session_key;
+};
/* The following definitions come from librpc/rpc/dcerpc_helpers.c */
NTSTATUS dcerpc_push_ncacn_packet(TALLOC_CTX *mem_ctx,
@@ -75,4 +88,12 @@ NTSTATUS dcerpc_check_auth(struct pipe_auth_data *auth,
DATA_BLOB *raw_pkt,
size_t *pad_len);
+/* The following definitions come from librpc/rpc/rpc_common.c */
+
+bool smb_register_ndr_interface(const struct ndr_interface_table *interface);
+const struct ndr_interface_table *get_iface_from_syntax(
+ const struct ndr_syntax_id *syntax);
+const char *get_pipe_name_from_syntax(TALLOC_CTX *mem_ctx,
+ const struct ndr_syntax_id *syntax);
+
#endif /* __S3_DCERPC_H__ */
diff --git a/source3/librpc/rpc/dcerpc_ep.c b/source3/librpc/rpc/dcerpc_ep.c
index 76f7e91fb05..3d1acbbee22 100644
--- a/source3/librpc/rpc/dcerpc_ep.c
+++ b/source3/librpc/rpc/dcerpc_ep.c
@@ -23,6 +23,7 @@
#include "../librpc/gen_ndr/ndr_epmapper_c.h"
#include "rpc_client/cli_pipe.h"
#include "auth.h"
+#include "rpc_server/rpc_ncacn_np.h"
#define EPM_MAX_ANNOTATION_SIZE 64
@@ -77,7 +78,7 @@ NTSTATUS dcerpc_binding_vector_create(TALLOC_CTX *mem_ctx,
switch (b->transport) {
case NCACN_NP:
- b->host = talloc_asprintf(b, "\\\\%s", global_myname());
+ b->host = talloc_asprintf(b, "\\\\%s", lp_netbios_name());
if (b->host == NULL) {
status = NT_STATUS_NO_MEMORY;
goto done;
@@ -168,7 +169,7 @@ static NTSTATUS ep_register(TALLOC_CTX *mem_ctx,
"rpc_server", "epmapper",
"none");
- if (StrCaseCmp(rpcsrv_type, "embedded") == 0) {
+ if (strcasecmp_m(rpcsrv_type, "embedded") == 0) {
static struct client_address client_id;
strlcpy(client_id.addr, "localhost", sizeof(client_id.addr));
@@ -185,7 +186,7 @@ static NTSTATUS ep_register(TALLOC_CTX *mem_ctx,
"epmapper (%s)", nt_errstr(status)));
goto done;
}
- } else if (StrCaseCmp(rpcsrv_type, "daemon") == 0) {
+ } else if (strcasecmp_m(rpcsrv_type, "daemon") == 0) {
/* Connect to the endpoint mapper locally */
ncalrpc_sock = talloc_asprintf(tmp_ctx,
"%s/%s",
diff --git a/source3/librpc/rpc/dcerpc_helpers.c b/source3/librpc/rpc/dcerpc_helpers.c
index 7e6990c0add..7520d767ba1 100644
--- a/source3/librpc/rpc/dcerpc_helpers.c
+++ b/source3/librpc/rpc/dcerpc_helpers.c
@@ -28,7 +28,6 @@
#include "ntlmssp_wrap.h"
#include "librpc/crypto/gse.h"
#include "librpc/crypto/spnego.h"
-#include "ntdomain.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_RPC_PARSE
diff --git a/source3/librpc/rpc/rpc_common.c b/source3/librpc/rpc/rpc_common.c
index ed0320adf09..65e3205f62a 100644
--- a/source3/librpc/rpc/rpc_common.c
+++ b/source3/librpc/rpc/rpc_common.c
@@ -18,7 +18,7 @@
*/
#include "includes.h"
-#include "../librpc/gen_ndr/ndr_schannel.h"
+#include "librpc/rpc/dcerpc.h"
#include "../librpc/gen_ndr/ndr_lsa.h"
#include "../librpc/gen_ndr/ndr_dssetup.h"
#include "../librpc/gen_ndr/ndr_samr.h"