summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-09-15 13:21:42 +0200
committerStefan Metzmacher <metze@samba.org>2011-11-24 19:02:31 +0100
commit1cfeb3f8a0ffe3109c0e1d0bfabe6912a10f4129 (patch)
treedb5c7d4e0a6c6032a56264d27a966dbd1ebeff51
parentceb063ca7daf192b9b87224a063f50abd75c0c88 (diff)
downloadsamba-1cfeb3f8a0ffe3109c0e1d0bfabe6912a10f4129.tar.gz
samba-1cfeb3f8a0ffe3109c0e1d0bfabe6912a10f4129.tar.xz
samba-1cfeb3f8a0ffe3109c0e1d0bfabe6912a10f4129.zip
smbXcli: pass client_guid to smbXcli_conn_create()
metze
-rw-r--r--libcli/smb/smbXcli_base.c7
-rw-r--r--libcli/smb/smbXcli_base.h4
-rw-r--r--source3/libsmb/smb2cli_base.h3
3 files changed, 11 insertions, 3 deletions
diff --git a/libcli/smb/smbXcli_base.c b/libcli/smb/smbXcli_base.c
index 33354a43c2a..343973adb06 100644
--- a/libcli/smb/smbXcli_base.c
+++ b/libcli/smb/smbXcli_base.c
@@ -95,6 +95,7 @@ struct smbXcli_conn {
struct {
struct {
uint16_t security_mode;
+ struct GUID guid;
} client;
struct {
@@ -184,7 +185,8 @@ struct smbXcli_conn *smbXcli_conn_create(TALLOC_CTX *mem_ctx,
int fd,
const char *remote_name,
enum smb_signing_setting signing_state,
- uint32_t smb1_capabilities)
+ uint32_t smb1_capabilities,
+ struct GUID *client_guid)
{
struct smbXcli_conn *conn = NULL;
void *ss = NULL;
@@ -270,6 +272,9 @@ struct smbXcli_conn *smbXcli_conn_create(TALLOC_CTX *mem_ctx,
if (conn->mandatory_signing) {
conn->smb2.client.security_mode |= SMB2_NEGOTIATE_SIGNING_REQUIRED;
}
+ if (client_guid) {
+ conn->smb2.client.guid = *client_guid;
+ }
talloc_set_destructor(conn, smbXcli_conn_destructor);
return conn;
diff --git a/libcli/smb/smbXcli_base.h b/libcli/smb/smbXcli_base.h
index 0793eb897e6..9c359b846cf 100644
--- a/libcli/smb/smbXcli_base.h
+++ b/libcli/smb/smbXcli_base.h
@@ -23,12 +23,14 @@
struct smbXcli_conn;
struct smb_trans_enc_state;
+struct GUID;
struct smbXcli_conn *smbXcli_conn_create(TALLOC_CTX *mem_ctx,
int fd,
const char *remote_name,
enum smb_signing_setting signing_state,
- uint32_t smb1_capabilities);
+ uint32_t smb1_capabilities,
+ struct GUID *client_guid);
bool smbXcli_conn_is_connected(struct smbXcli_conn *conn);
void smbXcli_conn_disconnect(struct smbXcli_conn *conn, NTSTATUS status);
diff --git a/source3/libsmb/smb2cli_base.h b/source3/libsmb/smb2cli_base.h
index efef350f5dd..83c35ca0614 100644
--- a/source3/libsmb/smb2cli_base.h
+++ b/source3/libsmb/smb2cli_base.h
@@ -42,7 +42,8 @@ static inline struct tevent_req *cli_state_smb2cli_req_send(TALLOC_CTX *mem_ctx,
cli->conn.fd,
cli->conn.remote_name,
SMB_SIGNING_OFF,
- 0); /* smb1_capabilities */
+ 0, /* smb1_capabilities */
+ NULL); /* client guid */
if (cli->smb2.conn == NULL) {
return NULL;
}