summaryrefslogtreecommitdiff
path: root/source4/libcli/smb2/connect.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-10-21 14:51:13 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-10-21 14:51:13 +0200
commit5209a846a9157e649fcdcb561f7eaf19c8c0e465 (patch)
treeb0a7e52b5646c8eec182dbc391e7934b6804488c /source4/libcli/smb2/connect.c
parent625359b2e266105022309df8985720108ecd6f67 (diff)
parent2ee8d29d22bcb1c350ab59d71b0aee548489bc9c (diff)
downloadsamba-5209a846a9157e649fcdcb561f7eaf19c8c0e465.tar.gz
samba-5209a846a9157e649fcdcb561f7eaf19c8c0e465.tar.bz2
samba-5209a846a9157e649fcdcb561f7eaf19c8c0e465.zip
Merge branch 'master' of ssh://git.samba.org/data/git/samba into regsrv
Conflicts: source4/lib/registry/ldb.c source4/rpc_server/winreg/rpc_winreg.c
Diffstat (limited to 'source4/libcli/smb2/connect.c')
-rw-r--r--source4/libcli/smb2/connect.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/source4/libcli/smb2/connect.c b/source4/libcli/smb2/connect.c
index 43151943d3..bbfcf010ae 100644
--- a/source4/libcli/smb2/connect.c
+++ b/source4/libcli/smb2/connect.c
@@ -184,8 +184,8 @@ static void continue_socket(struct composite_context *creq)
}
state->negprot.in.capabilities = 0;
unix_to_nt_time(&state->negprot.in.start_time, time(NULL));
- dialects[0] = 0;
- dialects[1] = SMB2_DIALECT_REVISION;
+ dialects[0] = SMB2_DIALECT_REVISION;
+ dialects[1] = 0;
state->negprot.in.dialects = dialects;
req = smb2_negprot_send(transport, &state->negprot);
@@ -206,7 +206,13 @@ static void continue_resolve(struct composite_context *creq)
struct smb2_connect_state *state = talloc_get_type(c->private_data,
struct smb2_connect_state);
const char *addr;
- const char *ports[2] = { "445", NULL };
+ const char **ports;
+ const char *default_ports[] = { "445", NULL };
+
+ ports = lp_parm_string_list(state, global_loadparm, NULL, "smb2", "ports", NULL);
+ if (ports == NULL) {
+ ports = default_ports;
+ }
c->status = resolve_name_recv(creq, state, &addr);
if (!composite_is_ok(c)) return;