The branch, master has been updated via 949f12d Revert "Fix bug #8453 - smbclient segfaults when dialect option -m is used for legacy dialects" via c96292c s3:libsmb: always init cli->{server_os,server_domain,server_type} from 693781d s3-waf: create a smbldap.so library.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 949f12d5921fbdd84cc46fab4a6788aff03cbfb1 Author: Stefan Metzmacher <me...@samba.org> Date: Thu Sep 22 21:23:02 2011 +0200 Revert "Fix bug #8453 - smbclient segfaults when dialect option -m is used for legacy dialects" This reverts commit f261ac1932ecdae925b27301aa3e907757845a85. We now handle that in cli_state_create(). metze Autobuild-User: Stefan Metzmacher <me...@samba.org> Autobuild-Date: Wed Nov 16 15:44:05 CET 2011 on sn-devel-104 commit c96292c71020e9a82b127c21dc8b11c35d48db5a Author: Stefan Metzmacher <me...@samba.org> Date: Tue Sep 20 05:23:53 2011 +0200 s3:libsmb: always init cli->{server_os,server_domain,server_type} We should do that at creation time of cli_state. metze ----------------------------------------------------------------------- Summary of changes: source3/libsmb/cliconnect.c | 13 ------------- source3/libsmb/clientgen.c | 13 +++++++++++++ 2 files changed, 13 insertions(+), 13 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c index 8361715..a2a65b5 100644 --- a/source3/libsmb/cliconnect.c +++ b/source3/libsmb/cliconnect.c @@ -1976,19 +1976,6 @@ NTSTATUS cli_session_setup(struct cli_state *cli, } if (cli_state_protocol(cli) < PROTOCOL_LANMAN1) { - /* - * Ensure cli->server_domain, - * cli->server_os and cli->server_type - * are valid pointers. - */ - cli->server_domain = talloc_strdup(cli, ""); - cli->server_os = talloc_strdup(cli, ""); - cli->server_type = talloc_strdup(cli, ""); - if (cli->server_domain == NULL || - cli->server_os == NULL || - cli->server_type == NULL) { - return NT_STATUS_NO_MEMORY; - } return NT_STATUS_OK; } diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c index db980a4..bc544af 100644 --- a/source3/libsmb/clientgen.c +++ b/source3/libsmb/clientgen.c @@ -190,6 +190,19 @@ struct cli_state *cli_state_create(TALLOC_CTX *mem_ctx, return NULL; } + cli->server_domain = talloc_strdup(cli, ""); + if (!cli->server_domain) { + goto error; + } + cli->server_os = talloc_strdup(cli, ""); + if (!cli->server_os) { + goto error; + } + cli->server_type = talloc_strdup(cli, ""); + if (!cli->server_type) { + goto error; + } + cli->dfs_mountpoint = talloc_strdup(cli, ""); if (!cli->dfs_mountpoint) { goto error; -- Samba Shared Repository