linux/fs/smb/client/xattr.c

// SPDX-License-Identifier: LGPL-2.1
/*
 *
 *   Copyright (c) International Business Machines  Corp., 2003, 2007
 *   Author(s): Steve French (sfrench@us.ibm.com)
 *
 */

#include <linux/fs.h>
#include <linux/posix_acl_xattr.h>
#include <linux/slab.h>
#include <linux/xattr.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 "cifs_ioctl.h"

#define MAX_EA_VALUE_SIZE
#define CIFS_XATTR_CIFS_ACL
#define CIFS_XATTR_CIFS_NTSD
#define CIFS_XATTR_CIFS_NTSD_FULL
#define CIFS_XATTR_ATTRIB
#define CIFS_XATTR_CREATETIME
/*
 * Although these three are just aliases for the above, need to move away from
 * confusing users and using the 20+ year old term 'cifs' when it is no longer
 * secure, replaced by SMB2 (then even more highly secure SMB3) many years ago
 */
#define SMB3_XATTR_CIFS_ACL
#define SMB3_XATTR_CIFS_NTSD
#define SMB3_XATTR_CIFS_NTSD_FULL
#define SMB3_XATTR_ATTRIB
#define SMB3_XATTR_CREATETIME
/* BB need to add server (Samba e.g) support for security and trusted prefix */

enum {};

static int cifs_attrib_set(unsigned int xid, struct cifs_tcon *pTcon,
			   struct inode *inode, const char *full_path,
			   const void *value, size_t size)
{}

static int cifs_creation_time_set(unsigned int xid, struct cifs_tcon *pTcon,
				  struct inode *inode, const char *full_path,
				  const void *value, size_t size)
{}

static int cifs_xattr_set(const struct xattr_handler *handler,
			  struct mnt_idmap *idmap,
			  struct dentry *dentry, struct inode *inode,
			  const char *name, const void *value,
			  size_t size, int flags)
{}

static int cifs_attrib_get(struct dentry *dentry,
			   struct inode *inode, void *value,
			   size_t size)
{}

static int cifs_creation_time_get(struct dentry *dentry, struct inode *inode,
				  void *value, size_t size)
{}


static int cifs_xattr_get(const struct xattr_handler *handler,
			  struct dentry *dentry, struct inode *inode,
			  const char *name, void *value, size_t size)
{}

ssize_t cifs_listxattr(struct dentry *direntry, char *data, size_t buf_size)
{}

static const struct xattr_handler cifs_user_xattr_handler =;

/* os2.* attributes are treated like user.* attributes */
static const struct xattr_handler cifs_os2_xattr_handler =;

static const struct xattr_handler cifs_cifs_acl_xattr_handler =;

/*
 * Although this is just an alias for the above, need to move away from
 * confusing users and using the 20 year old term 'cifs' when it is no
 * longer secure and was replaced by SMB2/SMB3 a long time ago, and
 * SMB3 and later are highly secure.
 */
static const struct xattr_handler smb3_acl_xattr_handler =;

static const struct xattr_handler cifs_cifs_ntsd_xattr_handler =;

/*
 * Although this is just an alias for the above, need to move away from
 * confusing users and using the 20 year old term 'cifs' when it is no
 * longer secure and was replaced by SMB2/SMB3 a long time ago, and
 * SMB3 and later are highly secure.
 */
static const struct xattr_handler smb3_ntsd_xattr_handler =;

static const struct xattr_handler cifs_cifs_ntsd_full_xattr_handler =;

/*
 * Although this is just an alias for the above, need to move away from
 * confusing users and using the 20 year old term 'cifs' when it is no
 * longer secure and was replaced by SMB2/SMB3 a long time ago, and
 * SMB3 and later are highly secure.
 */
static const struct xattr_handler smb3_ntsd_full_xattr_handler =;

const struct xattr_handler * const cifs_xattr_handlers[] =;