smb2misc.c
imports <crypto/sha2.h>Copies bytes with native memcpy
SHA-2561786cbe6db0b9554406cdf643ca300b6ffc266917312c88d1c961b4ada1b473c
MaleculeH(Db)Md(In)
Evidence
7:13… Pavel Shilovsky (pshilovsky@samba.org) 2012
8 *
9 */
10#include <crypto/sha2.h>
11#include <linux/ctype.h>
12#include "cifsglob.h"
13#include "cifsproto.h"
14#include "smb2proto.h"
15#include "cifs_debug.h"
16#include "cifs_unicode.h"
17#include "../common/smb2status.h"
18#include "smb2glob.h"
19#include "nterr.h"
20#include "cached_dir.h"
21
22static int
23check_smb2_hdr(struct smb2_hdr *shdr, __u64 mid)
24{
25 __u64 wire_mid = le64_to_cpu(shdr->MessageId);
26
27 /*
28 * Make sure that this really is an SMB, that it is a response,
29 * and that the message ids match.
30 */
31 if ((shdr->ProtocolId == SMB2_PROTO_NUMBER) &&
32 (mid == wire_mid)) …
80:18… */ cpu_to_le16(2),
81 /* BB FIXME can also be 44 for lease break */
82 /* SMB2_OPLOCK_BREAK */ cpu_to_le16(24)
83};
84
85#define SMB311_NEGPROT_BASE_SIZE (s …
195:28… )) {
196 pdu->StructureSize2 = 0;
197 /*
198 * As with SMB/CIFS, on some error cases servers may
199 * not return wct properly
200 */
201 return 0;
202 } …
525:47… reak);
526 lw->tlink = tlink;
527 lw->lease_state = new_lease_state;
528 memcpy(lw->lease_key, lease_key, SMB2_LEASE_KEY_SIZE);
529 queue_work(cifsiod_wq, &lw->lease_break);
530}
531
532static bool
533smb2_tcon_has_lease(s …
789:36… lled;
790
791 cancelled = kzalloc_obj(*cancelled);
792 if (!cancelled)
793 return -ENOMEM;
794
795 cancelled->fid.persistent_fid = persistent_fid;
796 cancelled->fid.volatile_fid = volatile_fid;
797 cancelled->tcon = tcon;
798 cance …