Skip to content

Commit

Permalink
CIFS: Add capability to transform requests before sending
Browse files Browse the repository at this point in the history
This will allow us to do protocol specific tranformations of packets
before sending to the server. For SMB3 it can be used to support
encryption.

Signed-off-by: Pavel Shilovsky <[email protected]>
  • Loading branch information
piastry authored and smfrench committed Feb 1, 2017
1 parent b8f57ee commit 7fb8986
Show file tree
Hide file tree
Showing 3 changed files with 136 additions and 33 deletions.
7 changes: 7 additions & 0 deletions fs/cifs/cifsglob.h
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,11 @@ struct smb_version_operations {
bool (*dir_needs_close)(struct cifsFileInfo *);
long (*fallocate)(struct file *, struct cifs_tcon *, int, loff_t,
loff_t);
/* init transform request - used for encryption for now */
int (*init_transform_rq)(struct TCP_Server_Info *, struct smb_rqst *,
struct smb_rqst *);
/* free transform request */
void (*free_transform_rq)(struct smb_rqst *);
};

struct smb_version_values {
Expand Down Expand Up @@ -1475,7 +1480,9 @@ static inline void free_dfs_info_array(struct dfs_info3_param *param,
#define CIFS_OBREAK_OP 0x0100 /* oplock break request */
#define CIFS_NEG_OP 0x0200 /* negotiate request */
#define CIFS_OP_MASK 0x0380 /* mask request type */

#define CIFS_HAS_CREDITS 0x0400 /* already has credits */
#define CIFS_TRANSFORM_REQ 0x0800 /* transform request before sending */

/* Security Flags: indicate type of session setup needed */
#define CIFSSEC_MAY_SIGN 0x00001
Expand Down
Loading

0 comments on commit 7fb8986

Please sign in to comment.