mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
cifs: SMB1 split: netmisc.c
Split a variety of bits from netmisc.c into other places, notably the error table into smb1maperror.c. Signed-off-by: David Howells <dhowells@redhat.com> cc: Steve French <sfrench@samba.org> cc: Paulo Alcantara <pc@manguebit.org> cc: Enzo Matsumiya <ematsumiya@suse.de> cc: linux-cifs@vger.kernel.org cc: linux-fsdevel@vger.kernel.org cc: linux-kernel@vger.kernel.org Acked-by: Enzo Matsumiya <ematsumiya@suse.de> Signed-off-by: Steve French <stfrench@microsoft.com>
This commit is contained in:
committed by
Steve French
parent
3739f6d298
commit
6fb4e46d2f
@@ -35,6 +35,7 @@ cifs-$(CONFIG_CIFS_ROOT) += cifsroot.o
|
||||
cifs-$(CONFIG_CIFS_ALLOW_INSECURE_LEGACY) += \
|
||||
cifssmb.o \
|
||||
smb1debug.o \
|
||||
smb1maperror.o \
|
||||
smb1misc.o \
|
||||
smb1ops.o \
|
||||
smb1transport.o
|
||||
|
||||
@@ -148,14 +148,10 @@ int cifs_get_readable_path(struct cifs_tcon *tcon, const char *name,
|
||||
struct cifsFileInfo **ret_file);
|
||||
int cifs_get_hardlink_path(struct cifs_tcon *tcon, struct inode *inode,
|
||||
struct file *file);
|
||||
unsigned int smbCalcSize(void *buf);
|
||||
int decode_negTokenInit(unsigned char *security_blob, int length,
|
||||
struct TCP_Server_Info *server);
|
||||
int cifs_convert_address(struct sockaddr *dst, const char *src, int len);
|
||||
void cifs_set_port(struct sockaddr *addr, const unsigned short int port);
|
||||
int map_smb_to_linux_error(char *buf, bool logErr);
|
||||
int map_and_check_smb_error(struct TCP_Server_Info *server,
|
||||
struct mid_q_entry *mid, bool logErr);
|
||||
int CIFS_SessSetup(const unsigned int xid, struct cifs_ses *ses,
|
||||
struct TCP_Server_Info *server,
|
||||
const struct nls_table *nls_cp);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -175,3 +175,15 @@ is_valid_oplock_break(char *buffer, struct TCP_Server_Info *srv)
|
||||
cifs_dbg(FYI, "Can not process oplock break for non-existent connection\n");
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
* calculate the size of the SMB message based on the fixed header
|
||||
* portion, the number of word parameters and the data portion of the message
|
||||
*/
|
||||
unsigned int
|
||||
smbCalcSize(void *buf)
|
||||
{
|
||||
struct smb_hdr *ptr = buf;
|
||||
return (sizeof(struct smb_hdr) + (2 * ptr->WordCount) +
|
||||
2 /* size of the bcc field */ + get_bcc(ptr));
|
||||
}
|
||||
|
||||
@@ -219,12 +219,20 @@ int CIFSSMBSetEA(const unsigned int xid, struct cifs_tcon *tcon,
|
||||
void cifs_dump_detail(void *buf, size_t buf_len,
|
||||
struct TCP_Server_Info *server);
|
||||
|
||||
/*
|
||||
* smb1maperror.c
|
||||
*/
|
||||
int map_smb_to_linux_error(char *buf, bool logErr);
|
||||
int map_and_check_smb_error(struct TCP_Server_Info *server,
|
||||
struct mid_q_entry *mid, bool logErr);
|
||||
|
||||
/*
|
||||
* smb1misc.c
|
||||
*/
|
||||
unsigned int header_assemble(struct smb_hdr *buffer, char smb_command,
|
||||
const struct cifs_tcon *treeCon, int word_count);
|
||||
bool is_valid_oplock_break(char *buffer, struct TCP_Server_Info *srv);
|
||||
unsigned int smbCalcSize(void *buf);
|
||||
|
||||
/*
|
||||
* smb1ops.c
|
||||
|
||||
Reference in New Issue
Block a user