diff options
-rw-r--r-- | libcli/smb/smbXcli_base.c | 7 | ||||
-rw-r--r-- | libcli/smb/smbXcli_base.h | 4 | ||||
-rw-r--r-- | source3/libsmb/smb2cli_base.h | 3 |
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; } |