DATA_BLOB gss_blob;
uint16_t sign_algo;
uint16_t cipher;
+ bool smb311_posix;
} server;
uint64_t mid;
return conn->mandatory_signing;
}
+bool smbXcli_conn_have_posix(struct smbXcli_conn *conn)
+{
+ if (conn->protocol >= PROTOCOL_SMB3_11) {
+ return conn->smb2.server.smb311_posix;
+ }
+ if (conn->protocol <= PROTOCOL_NT1) {
+ return (conn->smb1.capabilities & CAP_UNIX);
+ }
+ return false;
+}
+
/*
* [MS-SMB] 2.2.2.3.5 - SMB1 support for passing through
* query/set commands to the file system
gnutls_hash_hd_t hash_hnd = NULL;
struct smb2_negotiate_context *sign_algo = NULL;
struct smb2_negotiate_context *cipher = NULL;
+ struct smb2_negotiate_context *posix = NULL;
struct iovec sent_iov[3] = {{0}, {0}, {0}};
static const struct smb2cli_req_expected_response expected[] = {
{
conn->smb2.server.cipher = cipher_selected;
}
+ posix = smb2_negotiate_context_find(
+ state->out_ctx, SMB2_POSIX_EXTENSIONS_AVAILABLE);
+ if (posix != NULL) {
+ DATA_BLOB posix_blob = data_blob_const(
+ SMB2_CREATE_TAG_POSIX, strlen(SMB2_CREATE_TAG_POSIX));
+ int cmp = data_blob_cmp(&posix->data, &posix_blob);
+
+ conn->smb2.server.smb311_posix = (cmp == 0);
+ }
+
+
/* First we hash the request */
smb2cli_req_get_sent_iov(subreq, sent_iov);
enum protocol_types smbXcli_conn_protocol(struct smbXcli_conn *conn);
bool smbXcli_conn_use_unicode(struct smbXcli_conn *conn);
bool smbXcli_conn_signing_mandatory(struct smbXcli_conn *conn);
+bool smbXcli_conn_have_posix(struct smbXcli_conn *conn);
bool smbXcli_conn_support_passthrough(struct smbXcli_conn *conn);
void smbXcli_conn_set_sockopt(struct smbXcli_conn *conn, const char *options);