diff options
author | Stefan Metzmacher <metze@samba.org> | 2012-03-01 01:38:09 +0100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2012-03-03 17:03:07 +0100 |
commit | 8dc1873ff530060850c48bd2bb3cff9ab86a6b95 (patch) | |
tree | 573b3f5890ed8057e304c30269495da404186650 /source3/libsmb | |
parent | 1451e5f66312e37b07d82e48a615b39fe63bd6e3 (diff) | |
download | samba-8dc1873ff530060850c48bd2bb3cff9ab86a6b95.tar.gz samba-8dc1873ff530060850c48bd2bb3cff9ab86a6b95.tar.bz2 samba-8dc1873ff530060850c48bd2bb3cff9ab86a6b95.zip |
s3:libsmb: pass smb2 capabilities and client guid in cli_state_create()
metze
Signed-off-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'source3/libsmb')
-rw-r--r-- | source3/libsmb/clientgen.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c index 481d9f729b..26fbd19616 100644 --- a/source3/libsmb/clientgen.c +++ b/source3/libsmb/clientgen.c @@ -25,6 +25,7 @@ #include "../libcli/smb/smb_seal.h" #include "async_smb.h" #include "../libcli/smb/smbXcli_base.h" +#include "../librpc/ndr/libndr.h" /******************************************************************* Setup the word count and byte count for a client smb message. @@ -150,6 +151,8 @@ struct cli_state *cli_state_create(TALLOC_CTX *mem_ctx, bool force_ascii = false; bool use_level_II_oplocks = false; uint32_t smb1_capabilities = 0; + uint32_t smb2_capabilities = 0; + struct GUID client_guid = GUID_random(); /* Check the effective uid - make sure we are not setuid */ if (is_setuid_root()) { @@ -250,6 +253,8 @@ struct cli_state *cli_state_create(TALLOC_CTX *mem_ctx, smb1_capabilities |= CAP_LEVEL_II_OPLOCKS; } + smb2_capabilities = SMB2_CAP_ALL; + if (remote_realm) { cli->remote_realm = talloc_strdup(cli, remote_realm); if (cli->remote_realm == NULL) { @@ -260,8 +265,8 @@ struct cli_state *cli_state_create(TALLOC_CTX *mem_ctx, cli->conn = smbXcli_conn_create(cli, fd, remote_name, signing_state, smb1_capabilities, - NULL, /* client_guid */ - 0 /* smb1_capabilites */); + &client_guid, + smb2_capabilities); if (cli->conn == NULL) { goto error; } |