Commit 96814ecb authored by Steve French's avatar Steve French

Add definition for share encryption

Samba supports a setfs info level to negotiate encrypted
shares.  This patch adds the defines so we recognize
this info level.  Later patches will add the enablement
for it.
Acked-by: default avatarJeremy Allison <jra@samba.org>
Signed-off-by: default avatarSteve French <smfrench@gmail.com>
parent 32b9aaf1
...@@ -1911,6 +1911,10 @@ typedef struct whoami_rsp_data { /* Query level 0x202 */ ...@@ -1911,6 +1911,10 @@ typedef struct whoami_rsp_data { /* Query level 0x202 */
/* SETFSInfo Levels */ /* SETFSInfo Levels */
#define SMB_SET_CIFS_UNIX_INFO 0x200 #define SMB_SET_CIFS_UNIX_INFO 0x200
/* level 0x203 is defined above in list of QFS info levels */
/* #define SMB_REQUEST_TRANSPORT_ENCRYPTION 0x203 */
/* Level 0x200 request structure follows */
typedef struct smb_com_transaction2_setfsi_req { typedef struct smb_com_transaction2_setfsi_req {
struct smb_hdr hdr; /* wct = 15 */ struct smb_hdr hdr; /* wct = 15 */
__le16 TotalParameterCount; __le16 TotalParameterCount;
...@@ -1938,13 +1942,39 @@ typedef struct smb_com_transaction2_setfsi_req { ...@@ -1938,13 +1942,39 @@ typedef struct smb_com_transaction2_setfsi_req {
__le64 ClientUnixCap; /* Data end */ __le64 ClientUnixCap; /* Data end */
} __attribute__((packed)) TRANSACTION2_SETFSI_REQ; } __attribute__((packed)) TRANSACTION2_SETFSI_REQ;
/* level 0x203 request structure follows */
typedef struct smb_com_transaction2_setfs_enc_req {
struct smb_hdr hdr; /* wct = 15 */
__le16 TotalParameterCount;
__le16 TotalDataCount;
__le16 MaxParameterCount;
__le16 MaxDataCount;
__u8 MaxSetupCount;
__u8 Reserved;
__le16 Flags;
__le32 Timeout;
__u16 Reserved2;
__le16 ParameterCount; /* 4 */
__le16 ParameterOffset;
__le16 DataCount; /* 12 */
__le16 DataOffset;
__u8 SetupCount; /* one */
__u8 Reserved3;
__le16 SubCommand; /* TRANS2_SET_FS_INFORMATION */
__le16 ByteCount;
__u8 Pad;
__u16 Reserved4; /* Parameters start. */
__le16 InformationLevel;/* Parameters end. */
/* NTLMSSP Blob, Data start. */
} __attribute__((packed)) TRANSACTION2_SETFSI_ENC_REQ;
/* response for setfsinfo levels 0x200 and 0x203 */
typedef struct smb_com_transaction2_setfsi_rsp { typedef struct smb_com_transaction2_setfsi_rsp {
struct smb_hdr hdr; /* wct = 10 */ struct smb_hdr hdr; /* wct = 10 */
struct trans2_resp t2; struct trans2_resp t2;
__u16 ByteCount; __u16 ByteCount;
} __attribute__((packed)) TRANSACTION2_SETFSI_RSP; } __attribute__((packed)) TRANSACTION2_SETFSI_RSP;
typedef struct smb_com_transaction2_get_dfs_refer_req { typedef struct smb_com_transaction2_get_dfs_refer_req {
struct smb_hdr hdr; /* wct = 15 */ struct smb_hdr hdr; /* wct = 15 */
__le16 TotalParameterCount; __le16 TotalParameterCount;
...@@ -2096,13 +2126,13 @@ typedef struct { ...@@ -2096,13 +2126,13 @@ typedef struct {
#define CIFS_UNIX_PROXY_CAP 0x00000400 /* Proxy cap: 0xACE ioctl and #define CIFS_UNIX_PROXY_CAP 0x00000400 /* Proxy cap: 0xACE ioctl and
QFS PROXY call */ QFS PROXY call */
#ifdef CONFIG_CIFS_POSIX #ifdef CONFIG_CIFS_POSIX
/* Can not set pathnames cap yet until we send new posix create SMB since /* presumably don't need the 0x20 POSIX_PATH_OPS_CAP since we never send
otherwise server can treat such handles opened with older ntcreatex LockingX instead of posix locking call on unix sess (and we do not expect
(by a new client which knows how to send posix path ops) LockingX to use different (ie Windows) semantics than posix locking on
as non-posix handles (can affect write behavior with byte range locks. the same session (if WINE needs to do this later, we can add this cap
We can add back in POSIX_PATH_OPS cap when Posix Create/Mkdir finished */ back in later */
/* #define CIFS_UNIX_CAP_MASK 0x000000fb */ /* #define CIFS_UNIX_CAP_MASK 0x000000fb */
#define CIFS_UNIX_CAP_MASK 0x000000db #define CIFS_UNIX_CAP_MASK 0x000003db
#else #else
#define CIFS_UNIX_CAP_MASK 0x00000013 #define CIFS_UNIX_CAP_MASK 0x00000013
#endif /* CONFIG_CIFS_POSIX */ #endif /* CONFIG_CIFS_POSIX */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment