diff options
author | Jeff Layton <jlayton@redhat.com> | 2011-10-11 06:41:32 -0400 |
---|---|---|
committer | Steve French <smfrench@gmail.com> | 2011-10-13 00:41:18 -0400 |
commit | b4dacbc2823799b84d4d4563f865b0680cb44ed1 (patch) | |
tree | 03946b395937b2412ec69f241e994dd55fa00d79 /fs/cifs/cifsencrypt.c | |
parent | ac423446d83e4fd5c3ffba393b887e531cf6bf46 (diff) |
cifs: use memcpy for magic string in cifs signature generation BSRSPYL
...it's more efficient since we know the length.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/cifsencrypt.c')
-rw-r--r-- | fs/cifs/cifsencrypt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/cifs/cifsencrypt.c b/fs/cifs/cifsencrypt.c index 30acd22147e1..12f1c1263013 100644 --- a/fs/cifs/cifsencrypt.c +++ b/fs/cifs/cifsencrypt.c | |||
@@ -92,7 +92,7 @@ int cifs_sign_smb(struct smb_hdr *cifs_pdu, struct TCP_Server_Info *server, | |||
92 | return rc; | 92 | return rc; |
93 | 93 | ||
94 | if (!server->session_estab) { | 94 | if (!server->session_estab) { |
95 | strncpy(cifs_pdu->Signature.SecuritySignature, "BSRSPYL", 8); | 95 | memcpy(cifs_pdu->Signature.SecuritySignature, "BSRSPYL", 8); |
96 | return rc; | 96 | return rc; |
97 | } | 97 | } |
98 | 98 | ||
@@ -189,7 +189,7 @@ int cifs_sign_smb2(struct kvec *iov, int n_vec, struct TCP_Server_Info *server, | |||
189 | return rc; | 189 | return rc; |
190 | 190 | ||
191 | if (!server->session_estab) { | 191 | if (!server->session_estab) { |
192 | strncpy(cifs_pdu->Signature.SecuritySignature, "BSRSPYL", 8); | 192 | memcpy(cifs_pdu->Signature.SecuritySignature, "BSRSPYL", 8); |
193 | return rc; | 193 | return rc; |
194 | } | 194 | } |
195 | 195 | ||