summaryrefslogtreecommitdiff
path: root/source4/librpc
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-01-10 08:56:55 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:08:36 -0500
commite1f0e09203cf61314d5e8a51b0b7bfbf7e66f2a1 (patch)
treee135a9c86690b175b92150d61ef9f6360e7c68ba /source4/librpc
parentb343cc97dedd32c15a68d9eee2b0bcf855171bad (diff)
downloadsamba-e1f0e09203cf61314d5e8a51b0b7bfbf7e66f2a1.tar.gz
samba-e1f0e09203cf61314d5e8a51b0b7bfbf7e66f2a1.tar.bz2
samba-e1f0e09203cf61314d5e8a51b0b7bfbf7e66f2a1.zip
r4630: for ncacn_np if we don't have an explicit request for one of the
advanced auth types we should do a plain bind. This fixes rpc connections to ancient servers (like sun cascade) (This used to be commit 59a5a0b218f7182c541a06ffc4528c1160699033)
Diffstat (limited to 'source4/librpc')
-rw-r--r--source4/librpc/rpc/dcerpc.h4
-rw-r--r--source4/librpc/rpc/dcerpc_util.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/source4/librpc/rpc/dcerpc.h b/source4/librpc/rpc/dcerpc.h
index 289e17fb81..4e58c3c75f 100644
--- a/source4/librpc/rpc/dcerpc.h
+++ b/source4/librpc/rpc/dcerpc.h
@@ -120,8 +120,6 @@ struct dcerpc_pipe {
DCERPC_SCHANNEL_DOMAIN| \
DCERPC_SCHANNEL_WORKSTATION)
-#define DCERPC_AUTH_OPTIONS (DCERPC_SEAL|DCERPC_SIGN|DCERPC_SCHANNEL_ANY)
-
/* use a 128 bit session key */
#define DCERPC_SCHANNEL_128 (1<<12)
@@ -131,6 +129,8 @@ struct dcerpc_pipe {
/* set LIBNDR_FLAG_REF_ALLOC flag when decoding NDR */
#define DCERPC_NDR_REF_ALLOC (1<<14)
+#define DCERPC_AUTH_OPTIONS (DCERPC_SEAL|DCERPC_SIGN|DCERPC_SCHANNEL_ANY|DCERPC_AUTH_SPNEGO)
+
/* enable spnego auth */
#define DCERPC_AUTH_SPNEGO (1<<15)
diff --git a/source4/librpc/rpc/dcerpc_util.c b/source4/librpc/rpc/dcerpc_util.c
index 534c17678d..992368777c 100644
--- a/source4/librpc/rpc/dcerpc_util.c
+++ b/source4/librpc/rpc/dcerpc_util.c
@@ -882,6 +882,10 @@ static NTSTATUS dcerpc_pipe_connect_ncacn_np(struct dcerpc_pipe **pp,
talloc_free(p);
return status;
}
+
+ if (!(binding->flags & DCERPC_AUTH_OPTIONS)) {
+ username = NULL;
+ }
status = dcerpc_pipe_auth(p, binding, pipe_uuid, pipe_version, domain, username, password);
if (!NT_STATUS_IS_OK(status)) {