linux/fs/smb/client/cifsacl.h

/* SPDX-License-Identifier: LGPL-2.1 */
/*
 *
 *   Copyright (c) International Business Machines  Corp., 2007
 *   Author(s): Steve French ([email protected])
 *
 */

#ifndef _CIFSACL_H
#define _CIFSACL_H

#include "../common/smbacl.h"

#define READ_BIT
#define WRITE_BIT
#define EXEC_BIT

#define ACL_OWNER_MASK
#define ACL_GROUP_MASK
#define ACL_EVERYONE_MASK

#define UBITSHIFT
#define GBITSHIFT

/*
 * Security Descriptor length containing DACL with 3 ACEs (one each for
 * owner, group and world).
 */
#define DEFAULT_SEC_DESC_LEN

/*
 * The current SMB3 form of security descriptor is similar to what was used for
 * cifs (see above) but some fields are split, and fields in the struct below
 * matches names of fields to the spec, MS-DTYP (see sections 2.4.5 and
 * 2.4.6). Note that "CamelCase" fields are used in this struct in order to
 * match the MS-DTYP and MS-SMB2 specs which define the wire format.
 */
struct smb3_sd {} __packed;

/* Meaning of 'Control' field flags */
#define ACL_CONTROL_SR
#define ACL_CONTROL_RM
#define ACL_CONTROL_PS
#define ACL_CONTROL_PD
#define ACL_CONTROL_SI
#define ACL_CONTROL_DI
#define ACL_CONTROL_SC
#define ACL_CONTROL_DC
#define ACL_CONTROL_SS
#define ACL_CONTROL_DT
#define ACL_CONTROL_SD
#define ACL_CONTROL_SP
#define ACL_CONTROL_DD
#define ACL_CONTROL_DP
#define ACL_CONTROL_GD
#define ACL_CONTROL_OD

/* Meaning of AclRevision flags */
#define ACL_REVISION
#define ACL_REVISION_DS

struct smb3_acl {} __packed;

/*
 * Used to store the special 'NFS SIDs' used to persist the POSIX uid and gid
 * See http://technet.microsoft.com/en-us/library/hh509017(v=ws.10).aspx
 */
struct owner_sid {} __packed;

struct owner_group_sids {} __packed;

/*
 * Minimum security identifier can be one for system defined Users
 * and Groups such as NULL SID and World or Built-in accounts such
 * as Administrator and Guest and consists of
 * Revision + Num (Sub)Auths + Authority + Domain (one Subauthority)
 */
#define MIN_SID_LEN

/*
 * Minimum security descriptor can be one without any SACL and DACL and can
 * consist of revision, type, and two sids of minimum size for owner and group
 */
#define MIN_SEC_DESC_LEN

#endif /* _CIFSACL_H */