diff options
Diffstat (limited to 'fs/cifs/smb2transport.c')
| -rw-r--r-- | fs/cifs/smb2transport.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/fs/cifs/smb2transport.c b/fs/cifs/smb2transport.c index 2a5fdf26f79f..8dd73e61d762 100644 --- a/fs/cifs/smb2transport.c +++ b/fs/cifs/smb2transport.c | |||
| @@ -39,7 +39,7 @@ | |||
| 39 | #include "smb2status.h" | 39 | #include "smb2status.h" |
| 40 | #include "smb2glob.h" | 40 | #include "smb2glob.h" |
| 41 | 41 | ||
| 42 | static int | 42 | int |
| 43 | smb2_calc_signature(struct smb_rqst *rqst, struct TCP_Server_Info *server) | 43 | smb2_calc_signature(struct smb_rqst *rqst, struct TCP_Server_Info *server) |
| 44 | { | 44 | { |
| 45 | int i, rc; | 45 | int i, rc; |
| @@ -116,6 +116,13 @@ smb2_calc_signature(struct smb_rqst *rqst, struct TCP_Server_Info *server) | |||
| 116 | return rc; | 116 | return rc; |
| 117 | } | 117 | } |
| 118 | 118 | ||
| 119 | int | ||
| 120 | smb3_calc_signature(struct smb_rqst *rqst, struct TCP_Server_Info *server) | ||
| 121 | { | ||
| 122 | cFYI(1, "smb3 signatures not supported yet"); | ||
| 123 | return -EOPNOTSUPP; | ||
| 124 | } | ||
| 125 | |||
| 119 | /* must be called with server->srv_mutex held */ | 126 | /* must be called with server->srv_mutex held */ |
| 120 | static int | 127 | static int |
| 121 | smb2_sign_rqst(struct smb_rqst *rqst, struct TCP_Server_Info *server) | 128 | smb2_sign_rqst(struct smb_rqst *rqst, struct TCP_Server_Info *server) |
| @@ -132,7 +139,7 @@ smb2_sign_rqst(struct smb_rqst *rqst, struct TCP_Server_Info *server) | |||
| 132 | return rc; | 139 | return rc; |
| 133 | } | 140 | } |
| 134 | 141 | ||
| 135 | rc = smb2_calc_signature(rqst, server); | 142 | rc = server->ops->calc_signature(rqst, server); |
| 136 | 143 | ||
| 137 | return rc; | 144 | return rc; |
| 138 | } | 145 | } |
| @@ -168,7 +175,7 @@ smb2_verify_signature(struct smb_rqst *rqst, struct TCP_Server_Info *server) | |||
| 168 | memset(smb2_pdu->Signature, 0, SMB2_SIGNATURE_SIZE); | 175 | memset(smb2_pdu->Signature, 0, SMB2_SIGNATURE_SIZE); |
| 169 | 176 | ||
| 170 | mutex_lock(&server->srv_mutex); | 177 | mutex_lock(&server->srv_mutex); |
| 171 | rc = smb2_calc_signature(rqst, server); | 178 | rc = server->ops->calc_signature(rqst, server); |
| 172 | mutex_unlock(&server->srv_mutex); | 179 | mutex_unlock(&server->srv_mutex); |
| 173 | 180 | ||
| 174 | if (rc) | 181 | if (rc) |
