#include <linux/user_namespace.h>
#include "smb_common.h"
#include "server.h"
#include "misc.h"
#include "smbstatus.h"
#include "connection.h"
#include "ksmbd_work.h"
#include "mgmt/user_session.h"
#include "mgmt/user_config.h"
#include "mgmt/tree_connect.h"
#include "mgmt/share_config.h"
static const char basechars[43] = …;
#define MANGLE_BASE …
#define MAGIC_CHAR …
#define PERIOD …
#define mangle(V) …
struct smb_protocol { … };
static struct smb_protocol smb1_protos[] = …;
static struct smb_protocol smb2_protos[] = …;
unsigned int ksmbd_server_side_copy_max_chunk_count(void)
{ … }
unsigned int ksmbd_server_side_copy_max_chunk_size(void)
{ … }
unsigned int ksmbd_server_side_copy_max_total_size(void)
{ … }
inline int ksmbd_min_protocol(void)
{ … }
inline int ksmbd_max_protocol(void)
{ … }
int ksmbd_lookup_protocol_idx(char *str)
{ … }
int ksmbd_verify_smb_message(struct ksmbd_work *work)
{ … }
bool ksmbd_smb_request(struct ksmbd_conn *conn)
{ … }
static bool supported_protocol(int idx)
{ … }
static char *next_dialect(char *dialect, int *next_off, int bcount)
{ … }
static int ksmbd_lookup_dialect_by_name(char *cli_dialects, __le16 byte_count)
{ … }
int ksmbd_lookup_dialect_by_id(__le16 *cli_dialects, __le16 dialects_count)
{ … }
static int ksmbd_negotiate_smb_dialect(void *buf)
{ … }
#define SMB_COM_NEGOTIATE_EX …
static u16 get_smb1_cmd_val(struct ksmbd_work *work)
{ … }
static int init_smb1_rsp_hdr(struct ksmbd_work *work)
{ … }
static int smb1_check_user_session(struct ksmbd_work *work)
{ … }
static int smb1_allocate_rsp_buf(struct ksmbd_work *work)
{ … }
static void set_smb1_rsp_status(struct ksmbd_work *work, __le32 err)
{ … }
static struct smb_version_ops smb1_server_ops = …;
static int smb1_negotiate(struct ksmbd_work *work)
{ … }
static struct smb_version_cmds smb1_server_cmds[1] = …;
static int init_smb1_server(struct ksmbd_conn *conn)
{ … }
int ksmbd_init_smb_server(struct ksmbd_work *work)
{ … }
int ksmbd_populate_dot_dotdot_entries(struct ksmbd_work *work, int info_level,
struct ksmbd_file *dir,
struct ksmbd_dir_info *d_info,
char *search_pattern,
int (*fn)(struct ksmbd_conn *, int,
struct ksmbd_dir_info *,
struct ksmbd_kstat *))
{ … }
int ksmbd_extract_shortname(struct ksmbd_conn *conn, const char *longname,
char *shortname)
{ … }
static int __smb2_negotiate(struct ksmbd_conn *conn)
{ … }
static int smb_handle_negotiate(struct ksmbd_work *work)
{ … }
int ksmbd_smb_negotiate_common(struct ksmbd_work *work, unsigned int command)
{ … }
enum SHARED_MODE_ERRORS { … };
static const char * const shared_mode_errors[] = …;
static void smb_shared_mode_error(int error, struct ksmbd_file *prev_fp,
struct ksmbd_file *curr_fp)
{ … }
int ksmbd_smb_check_shared_mode(struct file *filp, struct ksmbd_file *curr_fp)
{ … }
bool is_asterisk(char *p)
{ … }
int ksmbd_override_fsids(struct ksmbd_work *work)
{ … }
void ksmbd_revert_fsids(struct ksmbd_work *work)
{ … }
__le32 smb_map_generic_desired_access(__le32 daccess)
{ … }