diff options
author | Steve French <smfrench@gmail.com> | 2011-10-24 21:46:50 -0400 |
---|---|---|
committer | Steve French <smfrench@gmail.com> | 2011-10-27 17:53:31 -0400 |
commit | 96814ecb404d587fade79af70bb741bc753e9ffb (patch) | |
tree | d3b4771e464635fcd9008f478274ce818598c029 /fs/cifs | |
parent | 32b9aaf1a53b3c8d435f86339b01b3968520cb0a (diff) |
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: Jeremy Allison <jra@samba.org>
Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs')
-rw-r--r-- | fs/cifs/cifspdu.h | 44 |
1 files changed, 37 insertions, 7 deletions
diff --git a/fs/cifs/cifspdu.h b/fs/cifs/cifspdu.h index 3c6ef34fe2bc..3fb03e2c8e86 100644 --- a/fs/cifs/cifspdu.h +++ b/fs/cifs/cifspdu.h | |||
@@ -1911,6 +1911,10 @@ typedef struct whoami_rsp_data { /* Query level 0x202 */ | |||
1911 | 1911 | ||
1912 | /* SETFSInfo Levels */ | 1912 | /* SETFSInfo Levels */ |
1913 | #define SMB_SET_CIFS_UNIX_INFO 0x200 | 1913 | #define SMB_SET_CIFS_UNIX_INFO 0x200 |
1914 | /* level 0x203 is defined above in list of QFS info levels */ | ||
1915 | /* #define SMB_REQUEST_TRANSPORT_ENCRYPTION 0x203 */ | ||
1916 | |||
1917 | /* Level 0x200 request structure follows */ | ||
1914 | typedef struct smb_com_transaction2_setfsi_req { | 1918 | typedef struct smb_com_transaction2_setfsi_req { |
1915 | struct smb_hdr hdr; /* wct = 15 */ | 1919 | struct smb_hdr hdr; /* wct = 15 */ |
1916 | __le16 TotalParameterCount; | 1920 | __le16 TotalParameterCount; |
@@ -1938,13 +1942,39 @@ typedef struct smb_com_transaction2_setfsi_req { | |||
1938 | __le64 ClientUnixCap; /* Data end */ | 1942 | __le64 ClientUnixCap; /* Data end */ |
1939 | } __attribute__((packed)) TRANSACTION2_SETFSI_REQ; | 1943 | } __attribute__((packed)) TRANSACTION2_SETFSI_REQ; |
1940 | 1944 | ||
1945 | /* level 0x203 request structure follows */ | ||
1946 | typedef struct smb_com_transaction2_setfs_enc_req { | ||
1947 | struct smb_hdr hdr; /* wct = 15 */ | ||
1948 | __le16 TotalParameterCount; | ||
1949 | __le16 TotalDataCount; | ||
1950 | __le16 MaxParameterCount; | ||
1951 | __le16 MaxDataCount; | ||
1952 | __u8 MaxSetupCount; | ||
1953 | __u8 Reserved; | ||
1954 | __le16 Flags; | ||
1955 | __le32 Timeout; | ||
1956 | __u16 Reserved2; | ||
1957 | __le16 ParameterCount; /* 4 */ | ||
1958 | __le16 ParameterOffset; | ||
1959 | __le16 DataCount; /* 12 */ | ||
1960 | __le16 DataOffset; | ||
1961 | __u8 SetupCount; /* one */ | ||
1962 | __u8 Reserved3; | ||
1963 | __le16 SubCommand; /* TRANS2_SET_FS_INFORMATION */ | ||
1964 | __le16 ByteCount; | ||
1965 | __u8 Pad; | ||
1966 | __u16 Reserved4; /* Parameters start. */ | ||
1967 | __le16 InformationLevel;/* Parameters end. */ | ||
1968 | /* NTLMSSP Blob, Data start. */ | ||
1969 | } __attribute__((packed)) TRANSACTION2_SETFSI_ENC_REQ; | ||
1970 | |||
1971 | /* response for setfsinfo levels 0x200 and 0x203 */ | ||
1941 | typedef struct smb_com_transaction2_setfsi_rsp { | 1972 | typedef struct smb_com_transaction2_setfsi_rsp { |
1942 | struct smb_hdr hdr; /* wct = 10 */ | 1973 | struct smb_hdr hdr; /* wct = 10 */ |
1943 | struct trans2_resp t2; | 1974 | struct trans2_resp t2; |
1944 | __u16 ByteCount; | 1975 | __u16 ByteCount; |
1945 | } __attribute__((packed)) TRANSACTION2_SETFSI_RSP; | 1976 | } __attribute__((packed)) TRANSACTION2_SETFSI_RSP; |
1946 | 1977 | ||
1947 | |||
1948 | typedef struct smb_com_transaction2_get_dfs_refer_req { | 1978 | typedef struct smb_com_transaction2_get_dfs_refer_req { |
1949 | struct smb_hdr hdr; /* wct = 15 */ | 1979 | struct smb_hdr hdr; /* wct = 15 */ |
1950 | __le16 TotalParameterCount; | 1980 | __le16 TotalParameterCount; |
@@ -2096,13 +2126,13 @@ typedef struct { | |||
2096 | #define CIFS_UNIX_PROXY_CAP 0x00000400 /* Proxy cap: 0xACE ioctl and | 2126 | #define CIFS_UNIX_PROXY_CAP 0x00000400 /* Proxy cap: 0xACE ioctl and |
2097 | QFS PROXY call */ | 2127 | QFS PROXY call */ |
2098 | #ifdef CONFIG_CIFS_POSIX | 2128 | #ifdef CONFIG_CIFS_POSIX |
2099 | /* Can not set pathnames cap yet until we send new posix create SMB since | 2129 | /* presumably don't need the 0x20 POSIX_PATH_OPS_CAP since we never send |
2100 | otherwise server can treat such handles opened with older ntcreatex | 2130 | LockingX instead of posix locking call on unix sess (and we do not expect |
2101 | (by a new client which knows how to send posix path ops) | 2131 | LockingX to use different (ie Windows) semantics than posix locking on |
2102 | as non-posix handles (can affect write behavior with byte range locks. | 2132 | the same session (if WINE needs to do this later, we can add this cap |
2103 | We can add back in POSIX_PATH_OPS cap when Posix Create/Mkdir finished */ | 2133 | back in later */ |
2104 | /* #define CIFS_UNIX_CAP_MASK 0x000000fb */ | 2134 | /* #define CIFS_UNIX_CAP_MASK 0x000000fb */ |
2105 | #define CIFS_UNIX_CAP_MASK 0x000000db | 2135 | #define CIFS_UNIX_CAP_MASK 0x000003db |
2106 | #else | 2136 | #else |
2107 | #define CIFS_UNIX_CAP_MASK 0x00000013 | 2137 | #define CIFS_UNIX_CAP_MASK 0x00000013 |
2108 | #endif /* CONFIG_CIFS_POSIX */ | 2138 | #endif /* CONFIG_CIFS_POSIX */ |