linux/fs/smb/client/link.c

// SPDX-License-Identifier: LGPL-2.1
/*
 *
 *   Copyright (C) International Business Machines  Corp., 2002,2008
 *   Author(s): Steve French ([email protected])
 *
 */
#include <linux/fs.h>
#include <linux/stat.h>
#include <linux/slab.h>
#include <linux/namei.h>
#include "cifsfs.h"
#include "cifspdu.h"
#include "cifsglob.h"
#include "cifsproto.h"
#include "cifs_debug.h"
#include "cifs_fs_sb.h"
#include "cifs_unicode.h"
#include "smb2proto.h"
#include "cifs_ioctl.h"

/*
 * M-F Symlink Functions - Begin
 */

#define CIFS_MF_SYMLINK_LEN_OFFSET
#define CIFS_MF_SYMLINK_MD5_OFFSET
#define CIFS_MF_SYMLINK_LINK_OFFSET
#define CIFS_MF_SYMLINK_LINK_MAXLEN
#define CIFS_MF_SYMLINK_FILE_SIZE

#define CIFS_MF_SYMLINK_LEN_FORMAT
#define CIFS_MF_SYMLINK_MD5_FORMAT
#define CIFS_MF_SYMLINK_MD5_ARGS(md5_hash)

static int
symlink_hash(unsigned int link_len, const char *link_str, u8 *md5_hash)
{}

static int
parse_mf_symlink(const u8 *buf, unsigned int buf_len, unsigned int *_link_len,
		 char **_link_str)
{}

static int
format_mf_symlink(u8 *buf, unsigned int buf_len, const char *link_str)
{}

bool
couldbe_mf_symlink(const struct cifs_fattr *fattr)
{}

static int
create_mf_symlink(const unsigned int xid, struct cifs_tcon *tcon,
		  struct cifs_sb_info *cifs_sb, const char *fromName,
		  const char *toName)
{}

int
check_mf_symlink(unsigned int xid, struct cifs_tcon *tcon,
		 struct cifs_sb_info *cifs_sb, struct cifs_fattr *fattr,
		 const unsigned char *path)
{}

#ifdef CONFIG_CIFS_ALLOW_INSECURE_LEGACY
/*
 * SMB 1.0 Protocol specific functions
 */

int
cifs_query_mf_symlink(unsigned int xid, struct cifs_tcon *tcon,
		      struct cifs_sb_info *cifs_sb, const unsigned char *path,
		      char *pbuf, unsigned int *pbytes_read)
{}

int
cifs_create_mf_symlink(unsigned int xid, struct cifs_tcon *tcon,
		       struct cifs_sb_info *cifs_sb, const unsigned char *path,
		       char *pbuf, unsigned int *pbytes_written)
{}
#endif /* CONFIG_CIFS_ALLOW_INSECURE_LEGACY */

/*
 * SMB 2.1/SMB3 Protocol specific functions
 */
int
smb3_query_mf_symlink(unsigned int xid, struct cifs_tcon *tcon,
		      struct cifs_sb_info *cifs_sb, const unsigned char *path,
		      char *pbuf, unsigned int *pbytes_read)
{}

int
smb3_create_mf_symlink(unsigned int xid, struct cifs_tcon *tcon,
		       struct cifs_sb_info *cifs_sb, const unsigned char *path,
		       char *pbuf, unsigned int *pbytes_written)
{}

/*
 * M-F Symlink Functions - End
 */

int
cifs_hardlink(struct dentry *old_file, struct inode *inode,
	      struct dentry *direntry)
{}

int
cifs_symlink(struct mnt_idmap *idmap, struct inode *inode,
	     struct dentry *direntry, const char *symname)
{}