Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

acl(2)

aclsort(3)

aclcheck(3)

NAME

aclcheck − check the validity of an ACL

SYNOPSIS

#include <sys/acl.h>

int aclcheck(aclent_t ∗aclbufp,  int nentries, int ∗which);

DESCRIPTION

aclcheck() checks the validity of an ACL pointed to by aclbufp.  nentries is the number of entries contained in the buffer.  which returns the index of the first entry that is invalid. 

The function verifies that an ACL pointed to by aclbufp is valid according to the following rules:

There must be exactly one group_obj ACL entry. 

There must be exactly one user_obj ACL entry. 

There must be exactly one other_obj ACL entry. 

If there are any group ACL entries, then the group ID in each group ACL entry must be unique. 

If there are any user ACL entries, then the user ID in each user ACL entry must be unique. 

If there are any group or user ACL entries, then there must be exactly one class_obj ACL entry. 

If there are any default ACL entries, then the following apply:

There must be exactly one default group_obj ACL entry. 

There must be exactly one default other_obj ACL entry. 

There must be exactly one default user_obj ACL entry. 

If there are any default group entries, then the group ID in each default group ACL entry must be unique. 

If there are any default user entries, then the user ID in each default user ACL entry must be unique. 

If there are any default group or user entries, then there must be exactly one default class_obj ACL entry. 

If any of the above rules are violated, then the function fails with errno set to EINVAL.

RETURN VALUES

If the ACL is valid, alcheck() will return 0.  Otherwise errno is set to EINVAL and return code is set to one of the following. 

GRP_ERROR There is more than one (default) group_obj ACL entry. 

USER_ERROR There is more than one (default) user_obj ACL entry. 

CLASS_ERROR There is more than one (default) class_obj ACL entry. 

OTHER_ERROR There is more than one (default) other_obj ACL entry. 

DUPLICATE_ERROR
Duplicate (default) entries of user or group. 

ENTRY_ERROR The entry type is invalid. 

MISS_ERROR Missing (default) group_obj, user_obj, class_obj, or other_obj entries. which returns -1 in this case. 

MEM_ERROR The system can’t allocate any memory. which returns -1 in this case. 

SEE ALSO

acl(2), aclsort(3)

SunOS 5.5/SPARC  —  Last change: 27 Oct 1994

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026