#include "cifspdu.h"
#include "cifsglob.h"
#include "cifsproto.h"
#include "cifs_unicode.h"
#include "cifs_debug.h"
#include "ntlmssp.h"
#include "nterr.h"
#include <linux/utsname.h>
#include <linux/slab.h>
#include <linux/version.h>
#include "cifsfs.h"
#include "cifs_spnego.h"
#include "smb2proto.h"
#include "fs_context.h"
static int
cifs_ses_add_channel(struct cifs_ses *ses,
struct cifs_server_iface *iface);
bool
is_server_using_iface(struct TCP_Server_Info *server,
struct cifs_server_iface *iface)
{ … }
bool is_ses_using_iface(struct cifs_ses *ses, struct cifs_server_iface *iface)
{ … }
int
cifs_ses_get_chan_index(struct cifs_ses *ses,
struct TCP_Server_Info *server)
{ … }
void
cifs_chan_set_in_reconnect(struct cifs_ses *ses,
struct TCP_Server_Info *server)
{ … }
void
cifs_chan_clear_in_reconnect(struct cifs_ses *ses,
struct TCP_Server_Info *server)
{ … }
bool
cifs_chan_in_reconnect(struct cifs_ses *ses,
struct TCP_Server_Info *server)
{ … }
void
cifs_chan_set_need_reconnect(struct cifs_ses *ses,
struct TCP_Server_Info *server)
{ … }
void
cifs_chan_clear_need_reconnect(struct cifs_ses *ses,
struct TCP_Server_Info *server)
{ … }
bool
cifs_chan_needs_reconnect(struct cifs_ses *ses,
struct TCP_Server_Info *server)
{ … }
bool
cifs_chan_is_iface_active(struct cifs_ses *ses,
struct TCP_Server_Info *server)
{ … }
int cifs_try_adding_channels(struct cifs_ses *ses)
{ … }
void
cifs_disable_secondary_channels(struct cifs_ses *ses)
{ … }
void
cifs_chan_update_iface(struct cifs_ses *ses, struct TCP_Server_Info *server)
{ … }
struct cifs_chan *
cifs_ses_find_chan(struct cifs_ses *ses, struct TCP_Server_Info *server)
{ … }
static int
cifs_ses_add_channel(struct cifs_ses *ses,
struct cifs_server_iface *iface)
{ … }
#ifdef CONFIG_CIFS_ALLOW_INSECURE_LEGACY
static __u32 cifs_ssetup_hdr(struct cifs_ses *ses,
struct TCP_Server_Info *server,
SESSION_SETUP_ANDX *pSMB)
{ … }
static void
unicode_oslm_strings(char **pbcc_area, const struct nls_table *nls_cp)
{ … }
static void unicode_domain_string(char **pbcc_area, struct cifs_ses *ses,
const struct nls_table *nls_cp)
{ … }
static void unicode_ssetup_strings(char **pbcc_area, struct cifs_ses *ses,
const struct nls_table *nls_cp)
{ … }
static void ascii_ssetup_strings(char **pbcc_area, struct cifs_ses *ses,
const struct nls_table *nls_cp)
{ … }
static void
decode_unicode_ssetup(char **pbcc_area, int bleft, struct cifs_ses *ses,
const struct nls_table *nls_cp)
{ … }
static void decode_ascii_ssetup(char **pbcc_area, __u16 bleft,
struct cifs_ses *ses,
const struct nls_table *nls_cp)
{ … }
#endif
int decode_ntlmssp_challenge(char *bcc_ptr, int blob_len,
struct cifs_ses *ses)
{ … }
static int size_of_ntlmssp_blob(struct cifs_ses *ses, int base_size)
{ … }
static inline void cifs_security_buffer_from_str(SECURITY_BUFFER *pbuf,
char *str_value,
int str_length,
unsigned char *pstart,
unsigned char **pcur,
const struct nls_table *nls_cp)
{ … }
int build_ntlmssp_negotiate_blob(unsigned char **pbuffer,
u16 *buflen,
struct cifs_ses *ses,
struct TCP_Server_Info *server,
const struct nls_table *nls_cp)
{ … }
int build_ntlmssp_smb3_negotiate_blob(unsigned char **pbuffer,
u16 *buflen,
struct cifs_ses *ses,
struct TCP_Server_Info *server,
const struct nls_table *nls_cp)
{ … }
int build_ntlmssp_auth_blob(unsigned char **pbuffer,
u16 *buflen,
struct cifs_ses *ses,
struct TCP_Server_Info *server,
const struct nls_table *nls_cp)
{ … }
enum securityEnum
cifs_select_sectype(struct TCP_Server_Info *server, enum securityEnum requested)
{ … }
struct sess_data { … };
#ifdef CONFIG_CIFS_ALLOW_INSECURE_LEGACY
static int
sess_alloc_buffer(struct sess_data *sess_data, int wct)
{ … }
static void
sess_free_buffer(struct sess_data *sess_data)
{ … }
static int
sess_establish_session(struct sess_data *sess_data)
{ … }
static int
sess_sendreceive(struct sess_data *sess_data)
{ … }
static void
sess_auth_ntlmv2(struct sess_data *sess_data)
{ … }
#ifdef CONFIG_CIFS_UPCALL
static void
sess_auth_kerberos(struct sess_data *sess_data)
{ … }
#endif
static int
_sess_auth_rawntlmssp_assemble_req(struct sess_data *sess_data)
{ … }
static void
sess_auth_rawntlmssp_authenticate(struct sess_data *sess_data);
static void
sess_auth_rawntlmssp_negotiate(struct sess_data *sess_data)
{ … }
static void
sess_auth_rawntlmssp_authenticate(struct sess_data *sess_data)
{ … }
static int select_sec(struct sess_data *sess_data)
{ … }
int CIFS_SessSetup(const unsigned int xid, struct cifs_ses *ses,
struct TCP_Server_Info *server,
const struct nls_table *nls_cp)
{ … }
#endif