linux/fs/smb/server/xattr.h

/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 *   Copyright (C) 2021 Samsung Electronics Co., Ltd.
 */

#ifndef __XATTR_H__
#define __XATTR_H__

/*
 * These are on-disk structures to store additional metadata into xattr to
 * reproduce windows filesystem semantics. And they are encoded with NDR to
 * compatible with samba's xattr meta format. The compatibility with samba
 * is important because it can lose the information(file attribute,
 * creation time, acls) about the existing files when switching between
 * ksmbd and samba.
 */

/*
 * Dos attribute flags used for what variable is valid.
 */
enum {};

/*
 * Dos attribute structure which is compatible with samba's one.
 * Storing it into the xattr named "DOSATTRIB" separately from inode
 * allows ksmbd to faithfully reproduce windows filesystem semantics
 * on top of a POSIX filesystem.
 */
struct xattr_dos_attrib {};

/*
 * Enumeration is used for computing posix acl hash.
 */
enum {};

#define SMB_ACL_READ
#define SMB_ACL_WRITE
#define SMB_ACL_EXECUTE

struct xattr_acl_entry {};

/*
 * xattr_smb_acl structure is used for computing posix acl hash.
 */
struct xattr_smb_acl {};

/* 64bytes hash in xattr_ntacl is computed with sha256 */
#define XATTR_SD_HASH_TYPE_SHA256
#define XATTR_SD_HASH_SIZE

/*
 * xattr_ntacl is used for storing ntacl and hashes.
 * Hash is used for checking valid posix acl and ntacl in xattr.
 */
struct xattr_ntacl {};

/* DOS ATTRIBUITE XATTR PREFIX */
#define DOS_ATTRIBUTE_PREFIX
#define DOS_ATTRIBUTE_PREFIX_LEN
#define XATTR_NAME_DOS_ATTRIBUTE
#define XATTR_NAME_DOS_ATTRIBUTE_LEN

/* STREAM XATTR PREFIX */
#define STREAM_PREFIX
#define STREAM_PREFIX_LEN
#define XATTR_NAME_STREAM
#define XATTR_NAME_STREAM_LEN

/* SECURITY DESCRIPTOR(NTACL) XATTR PREFIX */
#define SD_PREFIX
#define SD_PREFIX_LEN
#define XATTR_NAME_SD
#define XATTR_NAME_SD_LEN

#endif /* __XATTR_H__ */