diff options
author | Andrew Bartlett <abartlet@samba.org> | 2006-01-12 09:33:49 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:50:55 -0500 |
commit | a5a79e8b8cbdf24d5c2db45ece4110ed5d85e58f (patch) | |
tree | 71b27ab4d11e2fc537b0ccf5d4e9c75dcc9757eb /source4/librpc/rpc/dcerpc_connect.c | |
parent | 4c6b9c79ff5d35e1d03ad5eb543db4b6b906b5ce (diff) | |
download | samba-a5a79e8b8cbdf24d5c2db45ece4110ed5d85e58f.tar.gz samba-a5a79e8b8cbdf24d5c2db45ece4110ed5d85e58f.tar.bz2 samba-a5a79e8b8cbdf24d5c2db45ece4110ed5d85e58f.zip |
r12865: Upgrade the librpc and libnet code.
In librpc, always try SMB level authentication, even if trying
schannel, but allow fallback to anonymous. This should better
function with servers that set restrict anonymous.
There are too many parts of Samba that get, parse and modify the
binding parameters. Avoid the extra work, and add a binding element
to the struct dcerpc_pipe
The libnet vampire code has been refactored, to reduce extra layers
and to better conform with the standard argument pattern. Also, take
advantage of the new libnet_Lookup code, so we don't require the silly
'password server' smb.conf parameter.
To better support forcing traffic to be sealed for the vampire
operation, the dcerpc_bind_auth() function now takes an auth level
parameter.
Andrew Bartlett
(This used to be commit d65b354959842326fdd4bd7eb7fbeea0390f4afa)
Diffstat (limited to 'source4/librpc/rpc/dcerpc_connect.c')
-rw-r--r-- | source4/librpc/rpc/dcerpc_connect.c | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/source4/librpc/rpc/dcerpc_connect.c b/source4/librpc/rpc/dcerpc_connect.c index 1c9ab8c0ed..67dfda6d7a 100644 --- a/source4/librpc/rpc/dcerpc_connect.c +++ b/source4/librpc/rpc/dcerpc_connect.c @@ -131,29 +131,19 @@ struct composite_context *dcerpc_pipe_connect_ncacn_np_smb_send(TALLOC_CTX *mem_ conn->in.called_name = strupper_talloc(mem_ctx, s->io.binding->host); conn->in.service = "IPC$"; conn->in.service_type = NULL; - conn->in.fallback_to_anonymous = False; conn->in.workgroup = lp_workgroup(); /* - * provide proper credentials - user supplied or anonymous in case this is - * schannel connection + * provide proper credentials - user supplied, but allow a + * fallback to anonymous if this is an schannel connection + * (might be NT4 not allowing machine logins at session + * setup). */ + s->conn.in.credentials = s->io.creds; if (s->io.binding->flags & DCERPC_SCHANNEL) { - struct cli_credentials *anon_creds; - - anon_creds = cli_credentials_init(mem_ctx); - if (!anon_creds) { - composite_error(c, NT_STATUS_NO_MEMORY); - goto done; - } - - cli_credentials_set_anonymous(anon_creds); - cli_credentials_guess(anon_creds); - - s->conn.in.credentials = anon_creds; - + conn->in.fallback_to_anonymous = True; } else { - s->conn.in.credentials = s->io.creds; + conn->in.fallback_to_anonymous = False; } /* send smb connect request */ |