/*
* 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 2014 Garrett D'Amore <garrett@damore.org>
*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
* Copyright 2014 Nexenta Systems, Inc. All rights reserved.
*/
#ifndef _SYS_ACL_H
#define _SYS_ACL_H
#include <sys/acl_impl.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct acl {
} aclent_t;
typedef struct ace {
} ace_t;
/*
* The following are Defined types for an aclent_t.
*/
/* default object owner */
/* default additional users */
/* default owning group */
/* default additional groups */
/* default mask entry */
/* default other entry */
/*
* The following are defined for ace_t.
*
* Note, these are intentionally the same as the Windows
* "File Access Rights Constants" you can find on MSDN.
* (See also: "Standard Access Rights" on MSDN).
*
* The equivalent Windows names for these are just like
* those show below, with FILE_ in place of ACE_, except
* as noted below. Also note that Windows uses a special
* privilege: BYPASS_TRAVERSE_CHECKING, normally granted
* to everyone, that causes the absence of ACE_TRAVERSE
* to be ignored.
*/
/*
* Some of the following are the same as Windows uses. (but NOT ALL!)
* See the "ACE_HEADER" structure description on MSDN for details.
* Comments show relations to the MSDN names.
*/
/* These four are the same as Windows, but with an ACE_ prefix added. */
/*
* These are only applicable in a CIFS context.
* Here again, same as Windows, but with an ACE_ prefix added.
*/
#ifdef _KERNEL
typedef struct ace_object {
} ace_object_t;
#endif
/*
* The following flags are supported by both NFSv4 ACLs and ace_t.
*/
/* cmd args to acl(2) for aclent_t */
/* cmd's to manipulate ace acls. */
/* minimal acl entries from GETACLCNT */
#if !defined(_KERNEL)
/* acl check errors */
/*
* similar to ufs_acl.h: changed to char type for user commands (tar, cpio)
* Attribute types
*/
/*
* flag to [f]acl_get()
* controls whether a trivial acl should be returned.
*/
/*
* Flags to control acl_totext()
*/
/*
* Legacy aclcheck errors for aclent_t ACLs
*/
extern aclent_t *aclfromtext(char *, int *);
extern int acl_trivial(const char *);
extern char *acl_totext(acl_t *, int);
extern int acl_fromtext(const char *, acl_t **);
#else /* !defined(_KERNEL) */
extern int cmp2acls(void *, void *);
#endif /* !defined(_KERNEL) */
#ifdef __cplusplus
}
#endif
#endif /* _SYS_ACL_H */