summaryrefslogtreecommitdiffstats
path: root/source/librpc/rpc/dcerpc_util.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2005-04-10 10:13:57 +0000
committerAndrew Bartlett <abartlet@samba.org>2005-04-10 10:13:57 +0000
commit1f64512a61622dc6f67830628c0d8030b83f2898 (patch)
tree21e682f285b656bb8706e765a31de0bbbdb0a0d7 /source/librpc/rpc/dcerpc_util.c
parentceb71b12f4c6af37b40ff58a913cb17490f6d34f (diff)
downloadsamba-1f64512a61622dc6f67830628c0d8030b83f2898.tar.gz
samba-1f64512a61622dc6f67830628c0d8030b83f2898.tar.xz
samba-1f64512a61622dc6f67830628c0d8030b83f2898.zip
r6272: For 'programmed' use of an anonymous account, we should use
cli_credentials_set_conf(), not cli_credentials_guess(). Also, clarify why for particular flags, we don't do a DCERPC-level authentication. Andrew Bartlett
Diffstat (limited to 'source/librpc/rpc/dcerpc_util.c')
-rw-r--r--source/librpc/rpc/dcerpc_util.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/source/librpc/rpc/dcerpc_util.c b/source/librpc/rpc/dcerpc_util.c
index f45ae92babe..d1d9977b399 100644
--- a/source/librpc/rpc/dcerpc_util.c
+++ b/source/librpc/rpc/dcerpc_util.c
@@ -806,8 +806,8 @@ NTSTATUS dcerpc_epm_map_binding(TALLOC_CTX *mem_ctx, struct dcerpc_binding *bind
struct cli_credentials *anon_creds
= cli_credentials_init(mem_ctx);
+ cli_credentials_set_conf(anon_creds);
cli_credentials_set_anonymous(anon_creds);
- cli_credentials_guess(anon_creds);
/* First, check if there is a default endpoint specified in the IDL */
@@ -939,7 +939,14 @@ NTSTATUS dcerpc_pipe_auth(struct dcerpc_pipe *p,
} else if (!cli_credentials_is_anonymous(credentials) &&
!(binding->transport == NCACN_NP &&
!(binding->flags & DCERPC_SIGN) &&
- !(binding->flags & DCERPC_SEAL))) {
+ !(binding->flags & DCERPC_SEAL))) {
+
+ /* Perform an authenticated DCE-RPC bind, except where
+ * we ask for a connection on NCACN_NP, and that
+ * connection is not signed or sealed. For that case
+ * we rely on the already authenicated CIFS connection
+ */
+
uint8_t auth_type;
if (binding->flags & DCERPC_AUTH_SPNEGO) {
auth_type = DCERPC_AUTH_TYPE_SPNEGO;