summaryrefslogtreecommitdiff
path: root/source4/librpc
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-10-01 05:19:51 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:59:31 -0500
commitb2575ce6656d09d8bcfa948f7a9d368b9228a261 (patch)
tree8a76caee6cc0af467a3b28be342b6bbf9d0fef15 /source4/librpc
parent338c90404f6ea3a3ccc40c331e018180bbeb32f2 (diff)
downloadsamba-b2575ce6656d09d8bcfa948f7a9d368b9228a261.tar.gz
samba-b2575ce6656d09d8bcfa948f7a9d368b9228a261.tar.bz2
samba-b2575ce6656d09d8bcfa948f7a9d368b9228a261.zip
r2763: use no-auth bind on ncacn_np unless we specify at least one of "sign", "seal" or "connect"
(This used to be commit f3adabf6896b75f5293dbde3f9de737f35d95a10)
Diffstat (limited to 'source4/librpc')
-rw-r--r--source4/librpc/rpc/dcerpc_util.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source4/librpc/rpc/dcerpc_util.c b/source4/librpc/rpc/dcerpc_util.c
index bcadd52104..f2ba573369 100644
--- a/source4/librpc/rpc/dcerpc_util.c
+++ b/source4/librpc/rpc/dcerpc_util.c
@@ -496,7 +496,8 @@ static NTSTATUS dcerpc_pipe_connect_ncacn_np(struct dcerpc_pipe **p,
if (username && username[0] && (binding->flags & DCERPC_SCHANNEL_ANY)) {
status = dcerpc_bind_auth_schannel(*p, pipe_uuid, pipe_version,
domain, username, password);
- } else if (username && username[0]) {
+ } else if (username && username[0] &&
+ (binding->flags & (DCERPC_CONNECT|DCERPC_SIGN|DCERPC_SEAL))) {
status = dcerpc_bind_auth_ntlm(*p, pipe_uuid, pipe_version, domain, username, password);
} else {
status = dcerpc_bind_auth_none(*p, pipe_uuid, pipe_version);