diff options
author | marks <none@none> | 2006-02-13 08:52:39 -0800 |
---|---|---|
committer | marks <none@none> | 2006-02-13 08:52:39 -0800 |
commit | 5a5eeccada4b11bc692e9a5015d5f4a4f188226c (patch) | |
tree | 93010db6eee0a810fa5cb60ee056f620f533a721 /usr/src/lib/libsec/common/aclutils.h | |
parent | f00e6aa66b34910d24fa464cabb82f8e83f87bc8 (diff) | |
download | illumos-joyent-5a5eeccada4b11bc692e9a5015d5f4a4f188226c.tar.gz |
PSARC/2006/043 ls -V
PSARC/2006/047 acl_totext
PSARC/2006/048 Compact chmod ACL syntax
6362641 tar does not store ACLs in a suitable format
6379909 Need compact ACL utility support for NFSv4/ZFS
Diffstat (limited to 'usr/src/lib/libsec/common/aclutils.h')
-rw-r--r-- | usr/src/lib/libsec/common/aclutils.h | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/usr/src/lib/libsec/common/aclutils.h b/usr/src/lib/libsec/common/aclutils.h index b8e95dfe80..80a6e98c96 100644 --- a/usr/src/lib/libsec/common/aclutils.h +++ b/usr/src/lib/libsec/common/aclutils.h @@ -20,7 +20,7 @@ * CDDL HEADER END */ /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -30,6 +30,11 @@ #pragma ident "%Z%%M% %I% %E% SMI" #include <sys/types.h> +#include <strings.h> +#include <locale.h> +#include <ctype.h> +#include <grp.h> +#include <pwd.h> #ifdef __cplusplus extern "C" { @@ -67,16 +72,41 @@ struct acl_info { }; +#define PERM_TYPE_ACE 0x1 /* permissions are of ACE type */ +#define PERM_TYPE_UNKNOWN 0x2 /* permission type not yet known */ +#define PERM_TYPE_EMPTY 0x4 /* no permissions are specified */ + +struct acl_perm_type { + int perm_style; /* type of perm style, see above */ + char *perm_str; /* string value being returned */ + uint32_t perm_val; /* numeric value being returned */ +}; + +extern char *yybuf; +extern acl_t *yyacl; + +extern int yyerror(const char *); +extern int get_id(int entry_type, char *name, int *id); +extern int ace_entry_type(int entry_type); +extern int aclent_entry_type(int type, int owning, int *ret); +extern int ace_perm_mask(struct acl_perm_type *, uint32_t *mask); +extern int compute_aclent_perms(char *str, o_mode_t *mask); +extern int compute_ace_inherit(char *str, uint32_t *imask); extern int acl_addentries(acl_t *, acl_t *, int); extern int acl_removeentries(acl_t *, acl_t *, int, int); extern int acl_modifyentries(acl_t *, acl_t *, int); -extern void acl_printacl(acl_t *, int); +extern void acl_printacl(acl_t *, int, int); extern char *acl_strerror(int); extern acl_t *acl_dup(acl_t *); extern int acl_type(acl_t *); extern int acl_cnt(acl_t *); extern int acl_flags(acl_t *); extern void *acl_data(acl_t *); +extern void acl_error(const char *, ...); +extern int acl_parse(const char *, acl_t **); +extern int yyparse(void); +extern void yyreset(void); +extern acl_t *acl_alloc(enum acl_type); #ifdef __cplusplus } |