r22154: Make struct smbdb_ctx an opaque pointer so users of the API
[sfrench/samba-autobuild/.git] / source / include / trans2.h
index 8d372dcde3ce9d1f52681d58e94f643a80f49082..5f7587d6ead59378dee98b08b0ea5c51cb7025a9 100644 (file)
@@ -498,6 +498,8 @@ findfirst/findnext is SMB_FIND_FILE_UNIX_INFO2.
 #define SMB_FIND_FILE_UNIX             0x202
 #define SMB_FIND_FILE_UNIX_INFO2       0x20B /* UNIX File Info2 */
 
+#define SMB_FILE_UNIX_INFO2_SIZE 116
+
 /*
  Info level for TRANS2_QFSINFO - returns version of CIFS UNIX extensions, plus
  64-bits worth of capability fun :-).
@@ -527,7 +529,8 @@ findfirst/findnext is SMB_FIND_FILE_UNIX_INFO2.
                                                (chflags) and lsattr */
 #define CIFS_UNIX_POSIX_PATHNAMES_CAP     0x10 /* Use POSIX pathnames on the wire. */
 #define CIFS_UNIX_POSIX_PATH_OPERATIONS_CAP       0x20 /* We can cope with POSIX open/mkdir/unlink etc. */
-
+#define CIFS_UNIX_TRANSPORT_ENCRYPTION_CAP     0x40 /* We can do SPNEGO negotiations for encryption. */
+#define CIFS_UNIX_TRANSPORT_ENCRYPTION_MANDATORY_CAP   0x80 /* We *must* SPNEGO negotiations for encryption. */
 
 #define SMB_QUERY_POSIX_FS_INFO     0x201
 
@@ -650,6 +653,27 @@ enum smb_whoami_flags {
        DOM_SID[] -             list of SIDs (may be empty)
 */
 
+/*
+ * The following trans2 is done between client and server 
+ * as a FSINFO call to set up the encryption state for transport
+ * encryption.
+ *
+ * The request looks like :
+ *
+ * [data block] -> SPNEGO framed GSSAPI request.
+ *
+ * The reply looks like :
+ *
+ * [data block] -> SPNEGO framed GSSAPI reply - if error
+ *                 is NT_STATUS_OK then we're done, if it's
+ *                 NT_STATUS_MORE_PROCESSING_REQUIRED then the
+ *                 client needs to keep going. If it's an
+ *                 error it can be any NT_STATUS error.
+ *
+ */
+
+#define SMB_REQUEST_TRANSPORT_ENCRYPTION     0x203
+
 /* The query/set info levels for POSIX ACLs. */
 #define SMB_QUERY_POSIX_ACL  0x204
 #define SMB_SET_POSIX_ACL  0x204
@@ -717,8 +741,8 @@ enum smb_whoami_flags {
 /* Definition of request data block for SMB_POSIX_PATH_OPEN */
 /*
   [4 bytes] flags (as smb_ntcreate_Flags).
-  [4 bytes] open_mode
-  [4 bytes] mode_t             - same encoding as "Standard UNIX permissions" above.
+  [4 bytes] open_mode                  - SMB_O_xxx flags above.
+  [8 bytes] mode_t (permissions)       - same encoding as "Standard UNIX permissions" above in SMB_SET_FILE_UNIX_BASIC.
   [2 bytes] ret_info_level     - optimization. Info level to be returned.
 */
 
@@ -727,7 +751,11 @@ enum smb_whoami_flags {
 #define SMB_NO_INFO_LEVEL_RETURNED 0xFFFF
 
 /*
-  [2 bytes] reply info level    - as requested or 0xFFFF if not available.
+  [2 bytes] - flags field. Identical to flags reply for oplock response field in SMBNTCreateX)
+  [2 bytes] - FID returned.
+  [4 bytes] - CreateAction (same as in NTCreateX response).
+  [2 bytes] - reply info level    - as requested or 0xFFFF if not available.
+  [2 bytes] - padding (must be zero)
   [n bytes] - info level reply  - if available.
 */