The branch, master has been updated via 9cae92b s3:utils: use cli_tree_connect() instead of cli_tcon_andx() via 9c02667 s3:libsmb: use cli_tree_connect() instead of cli_tcon_andx() via bce43d7 s3:libsmb: fallback to SMBtcon for old servers from 27fb14b s3-loadparm: Swap synonyms of max/min protocol to server max/min protocol
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 9cae92b48574d22e0d8e129ed6cb3d2ca20b6fc8 Author: Stefan Metzmacher <me...@samba.org> Date: Wed May 30 10:22:19 2012 +0200 s3:utils: use cli_tree_connect() instead of cli_tcon_andx() metze Autobuild-User: Stefan Metzmacher <me...@samba.org> Autobuild-Date: Wed May 30 12:54:05 CEST 2012 on sn-devel-104 commit 9c02667b8220368b02fcae3ba90a0c8d801661bc Author: Stefan Metzmacher <me...@samba.org> Date: Wed May 30 10:20:11 2012 +0200 s3:libsmb: use cli_tree_connect() instead of cli_tcon_andx() cli_tree_connect() is more generic and uses what the server supports metze commit bce43d75da8e73a00a6aeca7c4064f17e4f2804e Author: Stefan Metzmacher <me...@samba.org> Date: Wed May 30 10:07:21 2012 +0200 s3:libsmb: fallback to SMBtcon for old servers metze ----------------------------------------------------------------------- Summary of changes: source3/libsmb/cliconnect.c | 20 +++++++++++++++++--- source3/utils/smbcacls.c | 2 +- 2 files changed, 18 insertions(+), 4 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c index fe8c3a1..9481e75 100644 --- a/source3/libsmb/cliconnect.c +++ b/source3/libsmb/cliconnect.c @@ -2514,6 +2514,10 @@ NTSTATUS cli_tcon_andx(struct cli_state *cli, const char *share, NTSTATUS cli_tree_connect(struct cli_state *cli, const char *share, const char *dev, const char *pass, int passlen) { + NTSTATUS status; + uint16_t max_xmit = 0; + uint16_t tid = 0; + cli->share = talloc_strdup(cli, share); if (!cli->share) { return NT_STATUS_NO_MEMORY; @@ -2523,7 +2527,17 @@ NTSTATUS cli_tree_connect(struct cli_state *cli, const char *share, return smb2cli_tcon(cli, share); } - return cli_tcon_andx(cli, share, dev, pass, passlen); + if (smbXcli_conn_protocol(cli->conn) >= PROTOCOL_LANMAN1) { + return cli_tcon_andx(cli, share, dev, pass, passlen); + } + + status = cli_raw_tcon(cli, share, pass, dev, &max_xmit, &tid); + if (!NT_STATUS_IS_OK(status)) { + return status; + } + cli->smb1.tid = tid; + + return NT_STATUS_OK; } /**************************************************************************** @@ -2821,8 +2835,8 @@ NTSTATUS cli_full_connection(struct cli_state **output_cli, } if (service) { - nt_status = cli_tcon_andx(cli, service, service_type, password, - pw_len); + nt_status = cli_tree_connect(cli, service, service_type, + password, pw_len); if (!NT_STATUS_IS_OK(nt_status)) { DEBUG(1,("failed tcon_X with %s\n", nt_errstr(nt_status))); cli_shutdown(cli); diff --git a/source3/utils/smbcacls.c b/source3/utils/smbcacls.c index 714f47b..3d18bee 100644 --- a/source3/utils/smbcacls.c +++ b/source3/utils/smbcacls.c @@ -187,7 +187,7 @@ static NTSTATUS cli_lsa_lookup_domain_sid(struct cli_state *cli, TALLOC_CTX *frame = talloc_stackframe(); const struct ndr_syntax_id *lsarpc_syntax = &ndr_table_lsarpc.syntax_id; - status = cli_tcon_andx(cli, "IPC$", "?????", "", 0); + status = cli_tree_connect(cli, "IPC$", "?????", "", 0); if (!NT_STATUS_IS_OK(status)) { goto done; } -- Samba Shared Repository