ufs_acl.h revision 2879e8a4b7cea216d18c3e536d6145465fd55453
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_FS_UFS_ACL_H
#define _SYS_FS_UFS_ACL_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
/*
* On-disk UFS ACL structure
*/
typedef struct ufs_acl {
union {
} acl_un;
} ufs_acl_t;
/*
* In-core UFS ACL structure
*/
typedef struct ufs_ic_acl {
} ufs_ic_acl_t;
/*
* In-core ACL mask
*/
typedef struct ufs_aclmask {
short acl_ismask; /* Is mask defined? */
/*
* full acl
*/
typedef struct ic_acl {
} ic_acl_t;
/*
* In-core shadow inode
*/
typedef struct si {
int s_flags; /* see below */
int s_signature; /* signature for all ACLs */
int s_use; /* on disk use count */
int s_ref; /* in core reference count */
} si_t;
/*
* s_flags
*/
/*
* Header to identify data on disk
*/
typedef struct ufs_fsd {
int fsd_type; /* type of data */
int fsd_size; /* size in bytes of ufs_fsd and data */
} ufs_fsd_t;
/*
* Data types (fsd_type)
*/
#define FSD_FREE (0) /* Free entry */
/*
* FSD manipulation macros
* The FSD macros are aligned on integer boundary even if the preceeding
* record had a byte aligned length. So the record length is always
* integer length. All increments of the data pointers must use the
* FSD_RECSZ macro.
*/
/*
* flags for acl_validate
*/
#define ACL_CHECK 0x01
#define DEF_ACL_CHECK 0x02
/*
* Check that the file type is one that accepts ACLs
*/
/*
* Get ACL group permissions if the mask is not present, and the ACL
* group permission intersected with the mask if the mask is present
*/
ASSERT((P)); \
(P)->acl_ic_next = NULL; \
(P)->acl_ic_who = (CRED);
#define ACL_MOVE(P, T, B) \
{ \
ufs_ic_acl_t *acl; \
(B)->acl_tag = (T); \
(B)++; \
} \
}
#ifdef __cplusplus
}
#endif
#endif /* _SYS_FS_UFS_ACL_H */