diff options
Diffstat (limited to 'man/man3')
38 files changed, 1993 insertions, 1909 deletions
diff --git a/man/man3/acl_add_perm.3 b/man/man3/acl_add_perm.3 index 9fe627c..4ce2031 100644 --- a/man/man3/acl_add_perm.3 +++ b/man/man3/acl_add_perm.3 @@ -14,69 +14,65 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.TH ACL_ADD_PERM 3 "Linux ACL Library" "March 2002" "Access Control Lists" -.SH NAME -acl_add_perm \- add a permission to an ACL permission set -.SH LIBRARY +.Dd March 23, 2002 +.Dt ACL_ADD_PERM 3 +.Os "Linux ACL" +.Sh NAME +.Nm acl_add_perm +.Nd add a permission to an ACL permission set +.Sh LIBRARY Linux Access Control Lists library (libacl, \-lacl). -.SH C SYNOPSIS -.sp -.nf -.B #include <sys/types.h> -.B #include <sys/acl.h> -.sp -.B "int acl_add_perm (acl_permset_t \f2permset_d\f3, acl_perm_t \f2perm\f3);" -.Op -.SH DESCRIPTION +.Sh SYNOPSIS +.In sys/types.h +.In sys/acl.h +.Ft int +.Fn acl_add_perm "acl_permset_t permset_d" "acl_perm_t perm" +.Sh DESCRIPTION The -.B acl_add_perm +.Fn acl_add_perm function adds the permission contained in the argument -.B perm +.Va perm to the permission set referred to by the argument -.IR permset_d . +.Va permset_d . An attempt to add a permission that is already contained in the permission set is not considered an error. -.PP +.Pp Any existing descriptors that refer to -.I permset_d +.Va permset_d continue to refer to that permission set. -.SH RETURN VALUE -The value 0 is returned if successful; otherwise the value -1 is -returned and the global variable errno is set to indicate the error. -.SH ERRORS +.Sh RETURN VALUE +.Rv -std acl_add_perm +.Sh ERRORS If any of the following conditions occur, the -.B acl_add_perm -function returns -1 +.Fn acl_add_perm +function returns +.Li -1 and sets -.B errno +.Va errno to the corresponding value: -.TP -.SM -\%[EINVAL] +.Bl -tag -width Er +.It Bq Er EINVAL The argument -.I permset_d +.Va permset_d is not a valid descriptor for a permission set within an ACL entry. -.TP -.SM -\%[EINVAL] +.Pp The argument -.I perm +.Va perm does not contain a valid -.B acl_perm_t +.Va acl_perm_t value. -.SH STANDARDS +.El +.Sh STANDARDS IEEE Std 1003.1e draft 17 (\(lqPOSIX.1e\(rq, abandoned) -.SH AUTHORS +.Sh SEE ALSO +.Xr acl_clear_perms 3 , +.Xr acl_delete_perm 3 , +.Xr acl_get_perm 3 , +.Xr acl_get_permset 3 , +.Xr acl_set_permset 3 , +.Xr acl 5 +.Sh AUTHOR Derived from the FreeBSD manual pages written by -.IR "Robert N M Watson" ; +.An "Robert N M Watson" Aq rwatson@FreeBSD.org , and adapted for Linux by -.I "Andreas Gruenbacher" -<a.gruenbacher@computer.org>. -.SH SEE ALSO -.BR acl_get_perm (3), -.BR acl_delete_perm (3), -.BR acl_clear_perms (3), -.BR acl_get_permset (3), -.BR acl_set_permset (3), -and -.BR acl (5). +.An "Andreas Gruenbacher" Aq a.gruenbacher@computer.org . diff --git a/man/man3/acl_calc_mask.3 b/man/man3/acl_calc_mask.3 index a5a46c0..6ffe6e3 100644 --- a/man/man3/acl_calc_mask.3 +++ b/man/man3/acl_calc_mask.3 @@ -14,80 +14,81 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.TH ACL_CALC_MASK 3 "Linux ACL Library" "March 2002" "Access Control Lists" -.SH NAME -acl_calc_mask \- calculate the file group class mask -.SH LIBRARY +.Dd March 23, 2002 +.Dt ACL_CALC_MASK 3 +.Os "Linux ACL" +.Sh NAME +.Nm acl_calc_mask +.Nd calculate the file group class mask +.Sh LIBRARY Linux Access Control Lists library (libacl, \-lacl). -.SH C SYNOPSIS -.sp -.nf -.B #include <sys/types.h> -.B #include <sys/acl.h> -.sp -.B "int acl_calc_mask (acl_t *\f2acl_p\f3);" -.Op -.SH DESCRIPTION +.Sh SYNOPSIS +.In sys/types.h +.In sys/acl.h +.Ft int +.Fn acl_calc_mask "acl_t *acl_p" +.Sh DESCRIPTION The -.B acl_calc_mask +.Fn acl_calc_mask function calculates and sets the permissions associated with the ACL_MASK ACL entry of the ACL referred to by -.IR acl_p . +.Va acl_p . The value of the new permissions is the union of the permissions granted by all entries of tag type ACL_GROUP, ACL_GROUP_OBJ, or ACL_USER. If the ACL referred to by -.I acl_p +.Va acl_p already contains an ACL_MASK entry, its permissions are overwritten; if it does not contain an ACL_MASK entry, one is added. -.PP +.Pp If the ACL referred to by -.I acl_p +.Va acl_p does not contain enough space for the new ACL entry, then additional working storage may be allocated. If the working storage cannot be increased in the current location, then it may be relocated and the previous working storage is released and a pointer to the new working storage is returned via -.IR acl_p . -.PP +.Va acl_p . +.Pp The order of existing entries in the ACL is undefined after this function. -.PP +.Pp Any existing ACL entry descriptors that refer to entries in the ACL continue to refer to those entries. Any existing ACL pointers that refer to the ACL referred to by -.I acl_p +.Va acl_p continue to refer to the ACL. .\" <AG> .\" Conflict between requirements: .\" (a) ACL may be relocated, .\" (b) all pointers remain valid. .\" </AG> -.SH RETURN VALUE -The value 0 is returned if successful; otherwise the value -1 is -returned and the global variable errno is set to indicate the error. -.SH ERRORS +.Sh RETURN VALUE +.Rv -std acl_calc_mask +.Sh ERRORS If any of the following conditions occur, the -.B acl_calc_mask -function returns -1 and sets -.B errno +.Fn acl_calc_mask +function returns +.Li -1 +and sets +.Va errno to the corresponding value: -.TP -.SM -\%[EINVAL] +.Bl -tag -width Er +.It Bq Er EINVAL The argument -.I acl +.Va acl is not a valid pointer to an ACL. -.TP -.SM -\%[ENOMEM] +.It Bq Er ENOMEM The -.B acl_calc_mask +.Fn acl_calc_mask function is unable to allocate the memory required for an ACL_MASK ACL entry. -.SH STANDARDS +.El +.Sh STANDARDS IEEE Std 1003.1e draft 17 (\(lqPOSIX.1e\(rq, abandoned) -.SH AUTHOR +.Sh SEE ALSO +.Xr acl_check 3 , +.Xr acl_get_entry 3 , +.Xr acl_valid 3 , +.Xr acl 5 +.Sh AUTHOR Derived from the FreeBSD manual pages written by -.IR "Robert N M Watson" ; +.An "Robert N M Watson" Aq rwatson@FreeBSD.org , and adapted for Linux by -.I "Andreas Gruenbacher" -<a.gruenbacher@computer.org>. -.SH SEE ALSO -.BR acl (5) +.An "Andreas Gruenbacher" Aq a.gruenbacher@computer.org . diff --git a/man/man3/acl_check.3 b/man/man3/acl_check.3 index 4b10f14..032b666 100644 --- a/man/man3/acl_check.3 +++ b/man/man3/acl_check.3 @@ -14,98 +14,102 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.TH ACL_CHECK 3 "Linux ACL Library" "March 2002" "Access Control Lists" -.SH NAME -acl_check \- check an ACL for validity -.SH LIBRARY +.Dd March 23, 2002 +.Dt ACL_CHECK 3 +.Os "Linux ACL" +.Sh NAME +.Nm acl_check +.Nd check an ACL for validity +.Sh LIBRARY Linux Access Control Lists library (libacl, \-lacl). -.SH C SYNOPSIS -.sp -.nf -.B #include <sys/types.h> -.B #include <sys/acl.h> -.sp -.B "int acl_check (acl_t \f2acl\f3, int *\f2last\f3);" -.Op -.SH DESCRIPTION +.Sh SYNOPSIS +.In sys/types.h +.In acl/libacl.h +.Ft int +.Fn acl_check "acl_t acl" "int *last" +.Sh DESCRIPTION The -.B acl_check +.Fn acl_check function checks the ACL referred to by the argument -.I acl +.Va acl for validity. -.PP +.Pp The three required entries ACL_USER_OBJ, ACL_GROUP_OBJ, and ACL_OTHER must exist exactly once in the ACL. If the ACL contains any ACL_USER or ACL_GROUP entries, then an ACL_MASK entry is also required. The ACL may contain at most one ACL_MASK entry. -.PP +.Pp The user identifiers must be unique among all entries of type ACL_USER. The group identifiers must be unique among all entries of type ACL_GROUP. -.PP +.Pp If the ACL referred to by -.I acl +.Va acl is invalid, -.B acl_check +.Fn acl_check returns a positive error code that indicates which type of error was detected. The following symbolic error codes are defined: -.TP -.B ACL_MULTI_ERROR +.Bl -tag -width ACL_DUPLICATE_ERROR. +.It ACL_MULTI_ERROR The ACL contains multiple entries that have a tag type that may occur at most once. -.TP -.B ACL_DUPLICATE_ERROR +.It ACL_DUPLICATE_ERROR The ACL contains multiple ACL_USER entries with the same user ID, or multiple ACL_GROUP entries with the same group ID. -.TP -.B ACL_MISS_ERROR +.It ACL_MISS_ERROR A required entry is missing. -.TP -.B ACL_ENTRY_ERROR +.It ACL_ENTRY_ERROR The ACL contains an invalid entry tag type. -.PP +.El +.Pp The -.BR acl_error (3) +.Fn acl_error function can be used to translate error codes to text messages. -.PP +.Pp In addition, if the pointer -.I last -is not NULL, -.B acl_check +.Va last +is not +.Li NULL , +.Fn acl_check assigns the number of the ACL entry at which the error was detected to the value pointed to by -.IR last . -Entries are numbered starting with 0, in the order in which they would be +.Va last . +Entries are numbered starting with zero, in the order in which they would be returned by the -.BR acl_get_entry (3) +.Fn acl_get_entry function. -.SH RETURN VALUE +.Sh RETURN VALUE If successful, the -.B acl_check -function returns 0 if the ACL referred to by -.I acl -is valid, and a positive error code if the ACL is invalid. -Otherwise, a value of -1 is returned and the global variable -.B errno +.Fn acl_check +function returns +.Li 0 +if the ACL referred to by +.Va acl +is valid, and a positive error code if the ACL is invalid. Otherwise, a +value of +.Li -1 +is returned and the global variable +.Va errno is set to indicate the error. -.SH ERRORS +.Sh ERRORS If any of the following conditions occur, the -.B acl_check -function returns -1 and sets -.B errno +.Fn acl_check +function returns +.Li -1 +and sets +.Va errno to the corresponding value: -.TP -.SM -\%[EINVAL] +.Bl -tag -width Er +.It Bq Er EINVAL The argument -.I acl +.Va acl is not a valid pointer to an ACL. -.SH STANDARDS +.El +.Sh STANDARDS This is a non-portable, Linux specific extension to the ACL manipulation functions defined in IEEE Std 1003.1e draft 17 (\(lqPOSIX.1e\(rq, abandoned). -.SH AUTHOR +.Sh SEE ALSO +.Xr acl_valid 3 , +.Xr acl 5 +.Sh AUTHOR Written by -.I "Andreas Gruenbacher" -<a.gruenbacher@computer.org>. -.SH SEE ALSO -.BR acl_valid (3), -.BR acl (5) +.An "Andreas Gruenbacher" Aq a.gruenbacher@computer.org . diff --git a/man/man3/acl_clear_perms.3 b/man/man3/acl_clear_perms.3 index 3eccfae..158d9f0 100644 --- a/man/man3/acl_clear_perms.3 +++ b/man/man3/acl_clear_perms.3 @@ -14,55 +14,55 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.TH ACL_CLEAR_PERMS 3 "Linux ACL Library" "March 2002" "Access Control Lists" -.SH NAME -acl_clear_perms \- clear all permissions from an ACL permission set -.SH LIBRARY +.Dd March 23, 2002 +.Dt ACL_CLEAR_PERMS 3 +.Os "Linux ACL" +.Sh NAME +.Nm acl_clear_perms +.Nd clear all permissions from an ACL permission set +.Sh LIBRARY Linux Access Control Lists library (libacl, \-lacl). -.SH C SYNOPSIS -.sp -.nf -.B #include <sys/types.h> -.B #include <sys/acl.h> -.sp -.B "int acl_clear_perms (acl_permset_t \f2permset_d\f3);" -.Op -.SH DESCRIPTION +.Sh SYNOPSIS +.In sys/types.h +.In sys/acl.h +.Ft int +.Fn acl_clear_perms "acl_permset_t permset_d" +.Sh DESCRIPTION The -.B acl_clear_perms +.Fn acl_clear_perms function clears all permissions from the permission set referred to by the argument -.IR permset_d . -.PP +.Va permset_d . +.Pp Any existing descriptors that refer to -.I permset_d +.Va permset_d shall continue to refer to that permission set. -.SH RETURN VALUE -The value 0 is returned if successful; otherwise the value -1 is -returned and the global variable errno is set to indicate the error. -.SH ERRORS +.Sh RETURN VALUE +.Rv -std acl_clear_perms +.Sh ERRORS If any of the following conditions occur, the -.B acl_clear_perms -function returns -1 and sets -.B errno +.Fn acl_clear_perms +function returns +.Li -1 +and sets +.Va errno to the corresponding value: -.TP -.SM -\%[EINVAL] +.Bl -tag -width Er +.It Bq Er EINVAL The argument -.I permset_d +.Va permset_d is not a valid descriptor for a permission set within an ACL entry. -.SH STANDARDS +.El +.Sh STANDARDS IEEE Std 1003.1e draft 17 (\(lqPOSIX.1e\(rq, abandoned) -.SH AUTHOR +.Sh SEE ALSO +.Xr acl_add_perm 3 , +.Xr acl_delete_perm 3 , +.Xr acl_get_perm 3 , +.Xr acl_get_permset 3 , +.Xr acl_set_permset 3 , +.Xr acl 5 +.Sh AUTHOR Derived from the FreeBSD manual pages written by -.IR "Robert N M Watson" ; +.An "Robert N M Watson" Aq rwatson@FreeBSD.org , and adapted for Linux by -.I "Andreas Gruenbacher" -<a.gruenbacher@computer.org>. -.SH SEE ALSO -.BR acl_get_perm (3), -.BR acl_add_perm (3), -.BR acl_delete_perm (3), -.BR acl_get_permset (3), -.BR acl_set_permset (3), -.BR acl (5) +.An "Andreas Gruenbacher" Aq a.gruenbacher@computer.org . diff --git a/man/man3/acl_cmp.3 b/man/man3/acl_cmp.3 index aa8a333..d4af7f5 100644 --- a/man/man3/acl_cmp.3 +++ b/man/man3/acl_cmp.3 @@ -14,66 +14,70 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.TH ACL_CMP 3 "Linux ACL Library" "March 2002" "Access Control Lists" -.SH NAME -acl_cmp \- compare two ACLs -.SH LIBRARY +.Dd March 23, 2002 +.Dt ACL_CMP 3 +.Os "Linux ACL" +.Sh NAME +.Nm acl_cmp +.Nd compare two ACLs +.Sh LIBRARY Linux Access Control Lists library (libacl, \-lacl). -.SH C SYNOPSIS -.sp -.nf -.B #include <sys/types.h> -.B #include <sys/acl.h> -.sp -.B "int acl_cmp (acl_t \f2acl1\f3, acl_t \f2acl2\f3);" -.Op -.SH DESCRIPTION +.Sh SYNOPSIS +.In sys/types.h +.In acl/libacl.h +.Ft int +.Fn acl_cmp "acl_t acl1" "acl_t acl2" +.Sh DESCRIPTION The -.B acl_cmp +.Fn acl_cmp function compares the ACLs pointed to by the arguments -.I acl1 +.Va acl1 and -.I acl2 +.Va acl2 for equality. The two ACLs are considered equal if for each entry in -.I acl1 +.Va acl1 there is an entry in -.I acl2 +.Va acl2 with matching tag type, qualifier, and permissions, and vice versa. -.SH RETURN VALUE +.Sh RETURN VALUE If successful, the -.B acl_cmp -function returns 0 if the two ACLs -.I acl1 +.Fn acl_cmp +function returns +.Li 0 +if the two ACLs +.Va acl1 and -.I acl2 -are equal, and 1 if they differ. Otherwise, the value -1 +.Va acl2 +are equal, and +.Li 1 +if they differ. Otherwise, the value +.Li -1 is returned and the global variable -.B errno +.Va errno is set to indicate the error. -.SH ERRORS +.Sh ERRORS If any of the following conditions occur, the -.B acl_cmp -function returns -1 and sets -.B errno +.Fn acl_cmp +function returns +.Li -1 +and sets +.Va errno to the corresponding value: -.TP -.SM -\%[EINVAL] +.Bl -tag -width Er +.It Bq Er EINVAL The argument -.I acl1 +.Va acl1 is not a valid pointer to an ACL. -.TP -.SM -\%[EINVAL] +.Pp The argument -.I acl2 +.Va acl2 is not a valid pointer to an ACL. -.SH STANDARDS +.El +.Sh STANDARDS This is a non-portable, Linux specific extension to the ACL manipulation functions defined in IEEE Std 1003.1e draft 17 (\(lqPOSIX.1e\(rq, abandoned). -.SH AUTHOR +.Sh SEE ALSO +.Xr acl 5 +.Sh AUTHOR Written by -.I "Andreas Gruenbacher" -<a.gruenbacher@computer.org>. -.SH SEE ALSO -.BR acl (5) +.An "Andreas Gruenbacher" Aq a.gruenbacher@computer.org . diff --git a/man/man3/acl_copy_entry.3 b/man/man3/acl_copy_entry.3 index 15de417..7962007 100644 --- a/man/man3/acl_copy_entry.3 +++ b/man/man3/acl_copy_entry.3 @@ -14,64 +14,62 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.TH ACL_COPY_ENTRY 3 "Linux ACL Library" "March 2002" "Access Control Lists" -.SH NAME -acl_copy_entry \- copy an ACL entry -.SH LIBRARY +.Dd March 23, 2002 +.Dt ACL_COPY_ENTRY 3 +.Os "Linux ACL" +.Sh NAME +.Nm acl_copy_entry +.Nd copy an ACL entry +.Sh LIBRARY Linux Access Control Lists library (libacl, \-lacl). -.SH C SYNOPSIS -.sp -.nf -.B #include <sys/types.h> -.B #include <sys/acl.h> -.sp -.B "int acl_copy_entry (acl_entry_t \f2dest_d\f3, acl_entry_t \f2src_d\f3);" -.Op -.SH DESCRIPTION +.Sh SYNOPSIS +.In sys/types.h +.In sys/acl.h +.Ft int +.Fn acl_copy_entry "acl_entry_t dest_d" "acl_entry_t src_d" +.Sh DESCRIPTION The -.B acl_copy_entry +.Fn acl_copy_entry function copies the contents of the ACL entry indicated by the -.I src_d +.Va src_d descriptor to the existing ACL entry indicated by the -.I dest_d -descriptor. -The -.I src_d +.Va dest_d +descriptor. The +.Va src_d and -.I dest_d +.Va dest_d descriptors may refer to entries in different ACLs. -.SH RETURN VALUE -The value 0 is returned if successful; otherwise the value -1 is -returned and the global variable errno is set to indicate the error. -.SH ERRORS +.Sh RETURN VALUE +.Rv -std acl_copy_entry +.Sh ERRORS If any of the following conditions occur, the -.B acl_copy_entry -function returns -1 and sets -.B errno +.Fn acl_copy_entry +function returns +.Li -1 +and sets +.Va errno to the corresponding value: -.TP -.SM -\%[EINVAL] +.Bl -tag -width Er +.It Bq Er EINVAL The argument -.I src_d +.Va src_d or -.I dest_d +.Va dest_d is not a valid descriptor for an ACL entry. -.TP -.SM -\%[EINVAL] +.Pp The arguments -.I src_d +.Va src_d and -.I dest_d +.Va dest_d reference the same ACL entry. -.SH STANDARDS +.El +.Sh STANDARDS IEEE Std 1003.1e draft 17 (\(lqPOSIX.1e\(rq, abandoned) -.SH AUTHOR +.Sh SEE ALSO +.Xr acl_get_entry 3 , +.Xr acl 5 +.Sh AUTHOR Derived from the FreeBSD manual pages written by -.IR "Robert N M Watson" ; +.An "Robert N M Watson" Aq rwatson@FreeBSD.org , and adapted for Linux by -.I "Andreas Gruenbacher" -<a.gruenbacher@computer.org>. -.SH SEE ALSO -.BR acl (5) +.An "Andreas Gruenbacher" Aq a.gruenbacher@computer.org . diff --git a/man/man3/acl_copy_ext.3 b/man/man3/acl_copy_ext.3 index b7756c9..8361d51 100644 --- a/man/man3/acl_copy_ext.3 +++ b/man/man3/acl_copy_ext.3 @@ -14,92 +14,88 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.TH ACL_COPY_EXT 3 "Linux ACL Library" "March 2002" "Access Control Lists" -.SH NAME -acl_copy_ext \- copy an ACL from internal to external representation -.SH LIBRARY +.Dd March 23, 2002 +.Dt ACL_COPY_EXT 3 +.Os "Linux ACL" +.Sh NAME +.Nm acl_copy_ext +.Nd copy an ACL from internal to external representation +.Sh LIBRARY Linux Access Control Lists library (libacl, \-lacl). -.SH C SYNOPSIS -.sp -.nf -.B #include <sys/types.h> -.B #include <sys/acl.h> -.sp -.B "ssize_t acl_copy_ext (void *\f2buf_p\f3, acl_t \f2acl\f3, ssize_t \f2size\f3);" -.Op -.SH DESCRIPTION +.Sh SYNOPSIS +.In sys/types.h +.In sys/acl.h +.Ft ssize_t +.Fn acl_copy_ext "void *buf_p" "acl_t acl" "ssize_t size" +.Sh DESCRIPTION The -.B acl_copy_ext +.Fn acl_copy_ext function copies the ACL pointed to by -.I acl +.Va acl from system-managed space to the user managed space pointed to by -.IR buf_p . +.Va buf_p . The -.I size +.Va size parameter represents the size in bytes of the buffer pointed to by -.IR buf_p . +.Va buf_p . The format of the ACL placed in the buffer pointed to by -.I buf_p +.Va buf_p is a contiguous, persistent data item, the format of which is unspecified. It is the responsibility of the invoker to allocate an area large enough to hold the copied ACL. The size of the exportable, contiguous, persistent form of the ACL may be obtained by invoking the -.B acl_size +.Fn acl_size function. -.PP +.Pp Any ACL entry descriptors that refer to an entry in the ACL referenced by -.I acl +.Va acl continue to refer to those entries. Any existing ACL pointers that refer to the ACL referenced by -.I acl +.Va acl continue to refer to the ACL. -.SH RETURN VALUE +.Sh RETURN VALUE Upon successful completion, this function returns the number of bytes placed in the buffer pointed to by -.IR buf_p . -Otherwise, a value of (ssize_t)-1 is returned and -.B errno +.Va buf_p . +Otherwise, a value of +.Li (ssize_t)-1 +is returned and +.Va errno is set to indicate the error. -.SH ERRORS +.Sh ERRORS If any of the following conditions occur, the -.B acl_copy_ext -function returns a value of (ssize_t)-1 and sets -.B errno +.Fn acl_copy_ext +function returns a value of +.Li (ssize_t)-1 +and sets +.Va errno to the corresponding value: -.TP -.SM -\%[EINVAL] +.Bl -tag -width Er +.It Bq Er EINVAL The -.I size +.Va size parameter is zero or negative. -.TP -.SM -\%[EINVAL] +.Pp The argument -.I acl +.Va acl is not a valid pointer to an ACL. -.TP -.SM -\%[EINVAL] +.Pp The ACL referenced by -.I acl +.Va acl contains one or more improperly formed ACL entries, or for some other reason cannot be translated into the external form of an ACL. -.TP -.SM -\%[ERANGE] +.It Bq Er ERANGE The -.I size -parameter is greater than zero but smaller than the length of the -contiguous, persistent form of the ACL. -.SH STANDARDS +.Va size +parameter is greater than zero but smaller than the length of the contiguous, persistent form of the ACL. +.El +.Sh STANDARDS IEEE Std 1003.1e draft 17 (\(lqPOSIX.1e\(rq, abandoned) -.SH AUTHOR +.Sh SEE ALSO +.Xr acl_copy_int 3 , +.Xr acl_size 3 , +.Xr acl 5 +.Sh AUTHOR Derived from the FreeBSD manual pages written by -.IR "Robert N M Watson" ; +.An "Robert N M Watson" Aq rwatson@FreeBSD.org , and adapted for Linux by -.I "Andreas Gruenbacher" -<a.gruenbacher@computer.org>. -.SH SEE ALSO -.BR acl_copy_int (3), -.BR acl_size (3), -.BR acl 5 +.An "Andreas Gruenbacher" Aq a.gruenbacher@computer.org . diff --git a/man/man3/acl_copy_int.3 b/man/man3/acl_copy_int.3 index 5eb0b2c..0a69105 100644 --- a/man/man3/acl_copy_int.3 +++ b/man/man3/acl_copy_int.3 @@ -14,65 +14,69 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.TH ACL_COPY_INT 3 "Linux ACL Library" "March 2002" "Access Control Lists" -.SH NAME -acl_copy_int \- copy an ACL from external to internal representation -.SH LIBRARY +.Dd March 23, 2002 +.Dt ACL_COPY_INT 3 +.Os "Linux ACL" +.Sh NAME +.Nm acl_copy_int +.Nd copy an ACL from external to internal representation +.Sh LIBRARY Linux Access Control Lists library (libacl, \-lacl). -.SH C SYNOPSIS -.sp -.nf -.B #include <sys/types.h> -.B #include <sys/acl.h> -.sp -.B "acl_t acl_copy_int (const void *\f2buf_p\f3);" -.Op -.SH DESCRIPTION +.Sh SYNOPSIS +.In sys/types.h +.In sys/acl.h +.Ft acl_t +.Fn acl_copy_int "const void *buf_p" +.Sh DESCRIPTION The -.B acl_copy_int +.Fn acl_copy_int function copies an exportable, contiguous, persistent form of an ACL, pointed to by -.IR buf_p , +.Va buf_p , to the internal representation. -.PP +.Pp This function may cause memory to be allocated. The caller should free any releasable memory, when the new ACL is no longer required, by calling -.BR acl_free (3) -with the (void*)acl_t returned by -.B acl_copy_int +.Xr acl_free 3 +with the +.Va (void*)acl_t +returned by +.Fn acl_copy_int as an argument. -.SH RETURN VALUE +.Sh RETURN VALUE Upon successful completion, the -.B acl_copy_int +.Fn acl_copy_int function returns a pointer that references the ACL in working storage. -Otherwise, a value of (acl_t)NULL is returned, and -.B errno +Otherwise, a value of +.Li (acl_t)NULL +is returned, and +.Va errno is set to indicate the error. -.SH ERRORS +.Sh ERRORS If any of the following conditions occur, the -.B acl_copy_int -function returns a value of (acl_t)NULL and sets -.B errno +.Fn acl_copy_int +function returns a value of +.Li (acl_t)NULL +and sets +.Va errno to the corresponding value: -.TP -.SM -\%[EINVAL] -The buffer pointed to by the -.I buf_p -argument does not contain a valid external form ACL. -.TP -.SM -\%[ENOMEM] +.Bl -tag -width Er +.It Bq Er EINVAL +The buffer pointed to by the argument +.Va buf_p +does not contain a valid external form ACL. +.It Bq Er ENOMEM The ACL working storage requires more memory than is allowed by the hardware or system-imposed memory management constraints. -.SH STANDARDS +.El +.Sh STANDARDS IEEE Std 1003.1e draft 17 (\(lqPOSIX.1e\(rq, abandoned) -.SH AUTHOR +.Sh SEE ALSO +.Xr acl_copy_ext 3 , +.Xr acl_get_entry 3 , +.Xr acl_free 3 , +.Xr acl 5 +.Sh AUTHOR Derived from the FreeBSD manual pages written by -.IR "Robert N M Watson" ; +.An "Robert N M Watson" Aq rwatson@FreeBSD.org , and adapted for Linux by -.I "Andreas Gruenbacher" -<a.gruenbacher@computer.org>. -.SH SEE ALSO -.BR acl_copy_ext (3), -.BR acl_free (3), -.BR acl (5) +.An "Andreas Gruenbacher" Aq a.gruenbacher@computer.org . diff --git a/man/man3/acl_create_entry.3 b/man/man3/acl_create_entry.3 index 325eaec..7975d6f 100644 --- a/man/man3/acl_create_entry.3 +++ b/man/man3/acl_create_entry.3 @@ -14,46 +14,46 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.TH ACL_CREATE_ENTRY 3 "Linux ACL Library" "March 2002" "Access Control Lists" -.SH NAME -acl_create_entry \- create a new ACL entry -.SH LIBRARY +.Dd March 23, 2002 +.Dt ACL_CREATE_ENTRY 3 +.Os "Linux ACL" +.Sh NAME +.Nm acl_create_entry +.Nd create a new ACL entry +.Sh LIBRARY Linux Access Control Lists library (libacl, \-lacl). -.SH C SYNOPSIS -.sp -.nf -.B #include <sys/types.h> -.B #include <sys/acl.h> -.sp -.B "int acl_create_entry (acl_t *\f2acl_p\f3, acl_entry_t *\f2entry_p\f3);" -.Op -.SH DESCRIPTION +.Sh SYNOPSIS +.In sys/types.h +.In sys/acl.h +.Ft int +.Fn acl_create_entry "acl_t *acl_p" "acl_entry_t *entry_p" +.Sh DESCRIPTION The -.B acl_create_entry +.Fn acl_create_entry function creates a new ACL entry in the ACL pointed to by the contents of the pointer argument -.IR acl_p . +.Va acl_p . Upon successful completion, the function returns a descriptor for the new ACL entry via -.IR entry_p . -.PP +.Va entry_p . +.Pp This function may cause memory to be allocated. The caller should free any releasable memory, when the new ACL is no longer required, by calling -.BR acl_free (3) +.Xr acl_free 3 with .\" <AG> .\" 1003.1e says: -.\" .I (void*)acl_t +.\" .Va (void*)acl_t .\" this makes no sense, so: -.I (void*)acl_p +.Va (void*)*acl_p .\" </AG> as an argument. If the ACL working storage cannot be increased in the current location, then the working storage for the ACL pointed to by -.I acl_p +.Va acl_p may be relocated and the previous working storage is released. A pointer to the new working storage is returned via -.IR acl_p . -.PP +.Va acl_p . +.Pp The components of the new ACL entry are initialized in the following ways: the ACL tag type component contains ACL_UNDEFINED_TAG, the qualifier component contains ACL_UNDEFINED_ID, and the set of permissions has no permissions @@ -64,34 +64,34 @@ continue to refer to those entries. .\" (a) ACL may be relocated, .\" (b) all pointers remain valid. .\" </AG> -.SH RETURN VALUE -The value 0 is returned if successful; otherwise the value -1 is -returned and the global variable errno is set to indicate the error. -.SH ERRORS +.Sh RETURN VALUE +.Rv -std acl_create_entry +.Sh ERRORS If any of the following conditions occur, the -.B acl_create_entry -function returns -1 and sets -.B errno +.Fn acl_create_entry +function returns +.Li -1 +and sets +.Va errno to the corresponding value: -.TP -.SM -\%[EINVAL] +.Bl -tag -width Er +.It Bq Er EINVAL The argument -.I acl_p +.Va acl_p is not a valid pointer to an ACL. -.TP -.SM -\%[ENOMEM] +.It Bq Er ENOMEM The ACL working storage requires more memory than is allowed by the hardware or system-imposed memory management constraints. -.SH STANDARDS +.El +.Sh STANDARDS IEEE Std 1003.1e draft 17 (\(lqPOSIX.1e\(rq, abandoned) -.SH AUTHOR +.Sh SEE ALSO +.Xr acl_init 3 , +.Xr acl_delete_entry 3 , +.Xr acl_free 3 , +.Xr acl_create_entry 3 , +.Xr acl 5 +.Sh AUTHOR Derived from the FreeBSD manual pages written by -.IR "Robert N M Watson" ; +.An "Robert N M Watson" Aq rwatson@FreeBSD.org , and adapted for Linux by -.I "Andreas Gruenbacher" -<a.gruenbacher@computer.org>. -.SH SEE ALSO -.BR acl_init (3), -.BR acl_free (3), -.BR acl (5) +.An "Andreas Gruenbacher" Aq a.gruenbacher@computer.org . diff --git a/man/man3/acl_delete_def_file.3 b/man/man3/acl_delete_def_file.3 index c225ad7..8d5d419 100644 --- a/man/man3/acl_delete_def_file.3 +++ b/man/man3/acl_delete_def_file.3 @@ -14,72 +14,66 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.TH ACL_DELETE_DEF_FILE 3 "Linux ACL Library" "March 2002" "Access Control Lists" -.SH NAME -acl_delete_def_file \- delete a default ACL by filename -.SH LIBRARY +.Dd March 23, 2002 +.Dt ACL_DELETE_DEF_FILE 3 +.Os "Linux ACL" +.Sh NAME +.Nm acl_delete_def_file +.Nd delete a default ACL by filename +.Sh LIBRARY Linux Access Control Lists library (libacl, \-lacl). -.SH C SYNOPSIS -.sp -.nf -.B #include <sys/types.h> -.B #include <sys/acl.h> -.sp -.B "int acl_delete_def_file (const char *\f2path_p\f3);" -.Op -.SH DESCRIPTION +.Sh SYNOPSIS +.In sys/types.h +.In sys/acl.h +.Ft int +.Fn acl_delete_def_file "const char *path_p" +.Sh DESCRIPTION The -.B acl_delete_def_file +.Fn acl_delete_def_file function deletes a default ACL from the directory whose pathname is pointed to by the argument -.IR path_p . -.PP +.Va path_p . +.Pp The effective user ID of the process must match the owner of the file or directory or the process must have the CAP_FOWNER capability for the request to succeed. -.PP +.Pp If the argument -.I path_p +.Va path_p is not a directory, then the function fails. It is no error if the directory whose pathname is pointed to by the argument -.I path_p +.Va path_p does not have a default ACL. -.SH RETURN VALUE -The value 0 is returned if successful; otherwise the value -1 is -returned and the global variable errno is set to indicate the error. -.SH ERRORS +.Sh RETURN VALUE +.Rv -std acl_delete_def_file +.Sh ERRORS If any of the following conditions occur, the -.B acl_delete_def_file -function returns the value -1 and and sets -.B errno +.Fn acl_delete_def_file +function returns the value +.Li -1 +and and sets +.Va errno to the corresponding value: -.TP -.SM -\%[EINVAL] +.Bl -tag -width Er +.It Bq Er EINVAL The file referred to by -.I path_p +.Va path_p is not a directory. -.TP -.SM -\%[EPERM] -The process does not have appropriate privilege to perform the operation to delete the default ACL. -.TP -.SM -\%[EROFS] -This function requires modification of a file system which is currently read-only. -.TP -.SM -\%[ENOTSUP] +.It Bq Er ENOTSUP The file system on which the file identified by -.I path_p +.Va path_p is located does not support ACLs, or ACLs are disabled. -.SH STANDARDS +.It Bq Er EPERM +The process does not have appropriate privilege to perform the operation to delete the default ACL. +.It Bq Er EROFS +This function requires modification of a file system which is currently read-only. +.El +.Sh STANDARDS IEEE Std 1003.1e draft 17 (\(lqPOSIX.1e\(rq, abandoned) -.SH AUTHOR +.Sh SEE ALSO +.Xr acl_get_file 3 , +.Xr acl_set_file 3 , +.Xr acl 5 +.Sh AUTHOR Derived from the FreeBSD manual pages written by -.IR "Robert N M Watson" ; +.An "Robert N M Watson" Aq rwatson@FreeBSD.org , and adapted for Linux by -.I "Andreas Gruenbacher" -<a.gruenbacher@computer.org>. -.SH SEE ALSO -.BR acl_get_file (3), -.BR acl_set_file (3), -.BR acl (5) +.An "Andreas Gruenbacher" Aq a.gruenbacher@computer.org . diff --git a/man/man3/acl_delete_entry.3 b/man/man3/acl_delete_entry.3 index 168a689..b7d509e 100644 --- a/man/man3/acl_delete_entry.3 +++ b/man/man3/acl_delete_entry.3 @@ -14,68 +14,66 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.TH ACL_DELETE_ENTRY 3 "Linux ACL Library" "March 2002" "Access Control Lists" -.SH NAME -acl_delete_entry \- delete an ACL entry -.SH LIBRARY +.Dd March 23, 2002 +.Dt ACL_DELETE_ENTRY 3 +.Os "Linux ACL" +.Sh NAME +.Nm acl_delete_entry +.Nd delete an ACL entry +.Sh LIBRARY Linux Access Control Lists library (libacl, \-lacl). -.SH C SYNOPSIS -.sp -.nf -.B #include <sys/types.h> -.B #include <sys/acl.h> -.sp -.B "int acl_delete_entry (acl_t \f2acl\f3, acl_entry_t \f2entry_d\f3);" -.Op -.SH DESCRIPTION +.Sh SYNOPSIS +.In sys/types.h +.In sys/acl.h +.Ft int +.Fn acl_delete_entry "acl_t acl" "acl_entry_t entry_d" +.Sh DESCRIPTION The -.B acl_delete_entry +.Fn acl_delete_entry function removes the ACL entry indicated by the -.I entry_d +.Va entry_d descriptor from the ACL pointed to by -.IR acl . +.Va acl . Any existing ACL entry descriptors that refer to entries in -.I acl +.Va acl other than that referred to by -.I entry_d +.Va entry_d continue to refer to the same entries. The argument -.I entry_d +.Va entry_d and any other ACL entry descriptors that refer to the same ACL entry are undefined after this function completes. Any existing ACL pointers that refer to the ACL referred to by -.I acl +.Va acl continue to refer to the ACL. -.SH RETURN VALUE -The value 0 is returned if successful; otherwise the value -1 is -returned and the global variable errno is set to indicate the error. -.SH ERRORS +.Sh RETURN VALUE +.Rv -std acl_delete_entry +.Sh ERRORS If any of the following conditions occur, the -.B acl_delete_entry -function returns -1 and sets -.B errno +.Fn acl_delete_entry +function returns +.Li -1 +and sets +.Va errno to the corresponding value: -.TP -.SM -\%[EINVAL] +.Bl -tag -width Er +.It Bq Er EINVAL The argument -.I acl_p +.Va acl_p is not a valid pointer to an ACL. -.TP -.SM -\%[EINVAL] +.Pp The argument -.I entry_d +.Va entry_d is not a valid pointer to an ACL entry. -.SH STANDARDS +.El +.Sh STANDARDS IEEE Std 1003.1e draft 17 (\(lqPOSIX.1e\(rq, abandoned) -.SH AUTHOR +.Sh SEE ALSO +.Xr acl_copy_entry 3 , +.Xr acl_create_entry 3 , +.Xr acl_get_entry 3 , +.Xr acl 5 +.Sh AUTHOR Derived from the FreeBSD manual pages written by -.IR "Robert N M Watson" ; +.An "Robert N M Watson" Aq rwatson@FreeBSD.org , and adapted for Linux by -.I "Andreas Gruenbacher" -<a.gruenbacher@computer.org>. -.SH SEE ALSO -.BR acl_copy_entry (3), -.BR acl_create_entry (3), -.BR acl_get_entry (3), -.BR acl (5) +.An "Andreas Gruenbacher" Aq a.gruenbacher@computer.org . diff --git a/man/man3/acl_delete_perm.3 b/man/man3/acl_delete_perm.3 index daa4706..bf03a6a 100644 --- a/man/man3/acl_delete_perm.3 +++ b/man/man3/acl_delete_perm.3 @@ -14,68 +14,65 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.TH ACL_DELETE_PERM 3 "Linux ACL Library" "March 2002" "Access Control Lists" -.SH NAME -acl_delete_perm \- delete a permission from an ACL permission set -.SH LIBRARY +.Dd March 23, 2002 +.Dt ACL_DELETE_PERM 3 +.Os "Linux ACL" +.Sh NAME +.Nm acl_delete_perm +.Nd delete a permission from an ACL permission set +.Sh LIBRARY Linux Access Control Lists library (libacl, \-lacl). -.SH C SYNOPSIS -.sp -.nf -.B #include <sys/types.h> -.B #include <sys/acl.h> -.sp -.B "int acl_delete_perm (acl_permset_t \f2permset_d\f3, " -.B " acl_perm_t \f2perm\f3);" -.Op -.SH DESCRIPTION +.Sh SYNOPSIS +.In sys/types.h +.In sys/acl.h +.Ft int +.Fn acl_delete_perm "acl_permset_t permset_d" "acl_perm_t perm" +.Sh DESCRIPTION The -.B acl_delete_perm +.Fn acl_delete_perm function deletes the permission contained in the argument -.I perm +.Va perm from the permission set referred to by the argument -.IR permset_d . +.Va permset_d . An attempt to delete a permission that is not contained in the permission set is not considered an error. -.PP +.Pp Any existing descriptors that refer to -.I permset_d +.Va permset_d continue to refer to that permission set. -.SH RETURN VALUE -The value 0 is returned if successful; otherwise the value -1 is -returned and the global variable errno is set to indicate the error. -.SH ERRORS +.Sh RETURN VALUE +.Rv -std acl_delete_perm +.Sh ERRORS If any of the following conditions occur, the -.B acl_delete_perm -function returns -1 and sets -.B errno +.Fn acl_delete_perm +function returns +.Li -1 +and sets +.Va errno to the corresponding value: -.TP -.SM -\%[EINVAL] +.Bl -tag -width Er +.It Bq Er EINVAL The argument -.I permset_d +.Va permset_d is not a valid descriptor for a permission set within an ACL entry. -.TP -.SM -\%[EINVAL] +.Pp The argument -.I perm +.Va perm does not contain a valid -.B acl_perm_t +.Va acl_perm_t value. -.SH STANDARDS +.El +.Sh STANDARDS IEEE Std 1003.1e draft 17 (\(lqPOSIX.1e\(rq, abandoned) -.SH AUTHOR +.Sh SEE ALSO +.Xr acl_add_perm 3 , +.Xr acl_clear_perms 3 , +.Xr acl_get_perm 3 , +.Xr acl_get_permset 3 , +.Xr acl_set_permset 3 , +.Xr acl 5 +.Sh AUTHOR Derived from the FreeBSD manual pages written by -.IR "Robert N M Watson" ; +.An "Robert N M Watson" Aq rwatson@FreeBSD.org , and adapted for Linux by -.I "Andreas Gruenbacher" -<a.gruenbacher@computer.org>. -.SH SEE ALSO -.BR acl_get_perm (3), -.BR acl_add_perm (3), -.BR acl_clear_perms (3), -.BR acl_get_permset (3), -.BR acl_set_permset (3), -.BR acl (5) +.An "Andreas Gruenbacher" Aq a.gruenbacher@computer.org . diff --git a/man/man3/acl_dup.3 b/man/man3/acl_dup.3 index c7f215d..3548acc 100644 --- a/man/man3/acl_dup.3 +++ b/man/man3/acl_dup.3 @@ -14,65 +14,67 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.TH ACL_DUP 3 "Linux ACL Library" "March 2002" "Access Control Lists" -.SH NAME -acl_dup \- duplicate an ACL -.SH LIBRARY +.Dd March 23, 2002 +.Dt ACL_DUP 3 +.Os "Linux ACL" +.Sh NAME +.Nm acl_dup +.Nd duplicate an ACL +.Sh LIBRARY Linux Access Control Lists library (libacl, \-lacl). -.SH C SYNOPSIS -.sp -.nf -.B #include <sys/types.h> -.B #include <sys/acl.h> -.sp -.B "acl_t acl_dup (acl_t \f2acl\f3);" -.Op -.SH DESCRIPTION +.Sh SYNOPSIS +.In sys/types.h +.In sys/acl.h +.Ft acl_t +.Fn acl_dup "acl_t acl" +.Sh DESCRIPTION The -.B acl_dup +.Fn acl_dup function returns a pointer to a copy of the ACL pointed to by -.IR acl . -.PP +.Va acl . +.Pp This function may cause memory to be allocated. The caller should free any releasable memory, when the new ACL is no longer required, by calling -.BR acl_free (3) +.Xr acl_free 3 with the -.B (void*)acl_t +.Va (void*)acl_t returned by -.B acl_dup +.Fn acl_dup as an argument. -.SH RETURN VALUE +.Sh RETURN VALUE Upon successful completion, this function returns a pointer to the -working storage. Otherwise, a value of (acl_t)NULL is returned, and -.B errno +working storage. Otherwise, a value of +.Li (acl_t)NULL +is returned, and +.Va errno is set to indicate the error. -.SH ERRORS +.Sh ERRORS If any of the following conditions occur, the -.B acl_dup -function returns a value of (acl_t)NULL and sets -.B errno +.Fn acl_dup +function returns a value of +.Li (acl_t)NULL +and sets +.Va errno to the corresponding value: -.TP -.SM -\%[EINVAL] +.Bl -tag -width Er +.It Bq Er EINVAL The argument -.I acl +.Va acl is not a valid pointer to an ACL. -.TP -.SM -\%[ENOMEM] +.It Bq Er ENOMEM The -.B acl_t +.Va acl_t to be returned requires more memory than is allowed by the hardware or system-imposed memory management constraints. -.SH STANDARDS +.El +.Sh STANDARDS IEEE Std 1003.1e draft 17 (\(lqPOSIX.1e\(rq, abandoned) -.SH AUTHOR +.Sh SEE ALSO +.Xr acl_free 3 , +.Xr acl_get_entry 3 , +.Xr acl 5 +.Sh AUTHOR Derived from the FreeBSD manual pages written by -.IR "Robert N M Watson" ; +.An "Robert N M Watson" Aq rwatson@FreeBSD.org , and adapted for Linux by -.I "Andreas Gruenbacher" -<a.gruenbacher@computer.org>. -.SH SEE ALSO -.BR acl_free (3), -.BR acl (5) +.An "Andreas Gruenbacher" Aq a.gruenbacher@computer.org . diff --git a/man/man3/acl_entries.3 b/man/man3/acl_entries.3 index 806b9d0..94d29a9 100644 --- a/man/man3/acl_entries.3 +++ b/man/man3/acl_entries.3 @@ -14,50 +14,53 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.TH ACL_ENTRIES 3 "Linux ACL Library" "March 2002" "Access Control Lists" -.SH NAME -acl_entries \- return the number of entries in an ACL -.SH LIBRARY +.Dd March 23, 2002 +.Dt ACL_ENTRIES 3 +.Os "Linux ACL" +.Sh NAME +.Nm acl_entries +.Nd return the number of entries in an ACL +.Sh LIBRARY Linux Access Control Lists library (libacl, \-lacl). -.SH C SYNOPSIS -.sp -.nf -.B #include <sys/types.h> -.B #include <sys/acl.h> -.sp -.B "int acl_entries (acl_t \f2acl\f3);" -.Op -.SH DESCRIPTION +.Sh SYNOPSIS +.In sys/types.h +.In acl/libacl.h +.Ft int +.Fn acl_entries "acl_t acl" +.Sh DESCRIPTION The -.B acl_entries +.Fn acl_entries function returns the number of ACL entries that are contained in the ACL referred to by the argument -.IR acl . -.SH RETURN VALUE +.Va acl . +.Sh RETURN VALUE The -.B acl_entries +.Fn acl_entries function returns the number of entries in -.I acl -if successful; otherwise the value -1 is returned and the global variable -.B errno +.Va acl +if successful; otherwise the value +.Li -1 +is returned and the global variable +.Va errno is set to indicate the error. -.SH ERRORS +.Sh ERRORS If any of the following conditions occur, the -.B acl_entries -function returns -1 and sets -.B errno +.Fn acl_entries +function returns +.Li -1 +and sets +.Va errno to the corresponding value: -.TP -.SM -\%[EINVAL] +.Bl -tag -width Er +.It Bq Er EINVAL The argument -.I acl +.Va acl is not a valid pointer to an ACL. -.SH STANDARDS +.El +.Sh STANDARDS This is a non-portable, Linux specific extension to the ACL manipulation functions defined in IEEE Std 1003.1e draft 17 (\(lqPOSIX.1e\(rq, abandoned). -.SH AUTHOR +.Sh SEE ALSO +.Xr acl 5 +.Sh AUTHOR Written by -.I "Andreas Gruenbacher" -<a.gruenbacher@computer.org>. -.SH SEE ALSO -.BR acl (5) +.An "Andreas Gruenbacher" Aq a.gruenbacher@computer.org . diff --git a/man/man3/acl_equiv_mode.3 b/man/man3/acl_equiv_mode.3 index 83ad436..9a2a81f 100644 --- a/man/man3/acl_equiv_mode.3 +++ b/man/man3/acl_equiv_mode.3 @@ -14,67 +14,76 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.TH ACL_EQUIV_MODE 3 "Linux ACL Library" "March 2002" "Access Control Lists" -.SH NAME -acl_equiv_mode \- check for an equivalent ACL -.SH LIBRARY +.Dd March 23, 2002 +.Dt ACL_EQUIV_MODE 3 +.Os "Linux ACL" +.Sh NAME +.Nm acl_equiv_mode +.Nd check for an equivalent ACL +.Sh LIBRARY Linux Access Control Lists library (libacl, \-lacl). -.SH C SYNOPSIS -.sp -.nf -.B #include <sys/types.h> -.B #include <sys/acl.h> -.sp -.B "int acl_equiv_mode (acl_t \f2acl\f3, mode_t *\f2mode_p\f3);" -.Op -.SH DESCRIPTION +.Sh SYNOPSIS +.In sys/types.h +.In acl/libacl.h +.Ft int +.Fn acl_equiv_mode "acl_t acl" "mode_t *mode_p" +.Sh DESCRIPTION The -.B acl_equiv_mode +.Fn acl_equiv_mode function checks if the ACL pointed to by the argument -.I acl +.Va acl contains only the required ACL entries of tag types ACL_USER_OBJ, ACL_GROUP_OBJ, and ACL_OTHER, and contains no permissions other that ACL_READ, ACL_WRITE or ACL_EXECUTE. If the ACL has this form, it can can be fully represented with the traditional file permission bits, and is considered equivalent with the traditional file permission bits. -.PP +.Pp If -.I acl +.Va acl is an equivalent ACL and the pointer -.I mode_p -is not NULL, the value pointed to by -.I mode_p +.Va mode_p +is not +.Li NULL , +the value pointed to by +.Va mode_p is set to the value that defines the same owner, group and other permissions as contained in the ACL. -.SH RETURN VALUE -Upon successful completion, this function returns the value 0 if -.I acl -is an equivalent ACL, and the value 1 if -.I acl -is not an equivalent ACL. Otherwise, the value -1 is returned, and -.B errno +.Sh RETURN VALUE +Upon successful completion, this function returns the value +.Li 0 +if +.Va acl +is an equivalent ACL, and the value +.Li 1 +if +.Va acl +is not an equivalent ACL. Otherwise, the value +.Li -1 +is returned, and +.Va errno is set to indicate the error. -.SH ERRORS +.Sh ERRORS If any of the following conditions occur, the -.B acl_equiv_mode -function returns the value -1 and sets -.B errno +.Fn acl_equiv_mode +function returns the value +.Li -1 +and sets +.Va errno to the corresponding value: -.TP -.SM -\%[EINVAL] +.Bl -tag -width Er +.It Bq Er EINVAL The argument -.I acl +.Va acl is not a valid pointer to an ACL. -.SH STANDARDS +.El +.Sh STANDARDS This is a non-portable, Linux specific extension to the ACL manipulation functions defined in IEEE Std 1003.1e draft 17 (\(lqPOSIX.1e\(rq, abandoned). -.SH AUTHOR +.Sh SEE ALSO +.Xr acl_from_mode 3 , +.Xr acl 5 +.Sh AUTHOR Written by -.I "Andreas Gruenbacher" -<a.gruenbacher@computer.org>. -.SH SEE ALSO -.BR acl_from_mode (3), -.BR acl (5) +.An "Andreas Gruenbacher" Aq a.gruenbacher@computer.org . diff --git a/man/man3/acl_error.3 b/man/man3/acl_error.3 index 4582de8..9a42459 100644 --- a/man/man3/acl_error.3 +++ b/man/man3/acl_error.3 @@ -14,48 +14,51 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.TH ACL_CHECK 3 "Linux ACL Library" "March 2002" "Access Control Lists" -.SH NAME -acl_error \- convert an ACL error code to a text message -.SH LIBRARY +.Dd March 23, 2002 +.Dt ACL_CHECK 3 +.Os "Linux ACL" +.Sh NAME +.Nm acl_error +.Nd convert an ACL error code to a text message +.Sh LIBRARY Linux Access Control Lists library (libacl, \-lacl). -.SH C SYNOPSIS -.sp -.nf -.B #include <sys/types.h> -.B #include <sys/acl.h> -.sp -.B "const char * acl_error (int \f2code\f3);" -.Op -.SH DESCRIPTION +.Sh SYNOPSIS +.In sys/types.h +.In acl/libacl.h +.Ft const char * +.Fn acl_error "int code" +.Sh DESCRIPTION The -.B acl_error +.Fn acl_error function converts an ACL error code such as returned by the -.BR acl_check (3) +.Fn acl_check function to a text message describing the error condition. In the \(lqPOSIX\(rq locale, -.B acl_check -returns the following descriptions for the error codes: -.IP -ACL_MULTI_ERROR (\(lqMultiple entries\(rq) -.IP -ACL_DUPLICATE_ERROR (\(lqDuplicate entries\(rq) -.IP -ACL_MISS_ERROR (\(lqMissing or wrong entry\(rq) -.IP -ACL_ENTRY_ERROR (\(lqInvalid entry type\(rq) -.SH RETURN VALUE +.Fn acl_check +returns the following descriptions for the error codes. +.Bl -tag -width ACL_DUPLICATE_ERROR. +.It ACL_MULTI_ERROR +\(lqMultiple entries\(rq +.It ACL_DUPLICATE_ERROR +\(lqDuplicate entries\(rq +.It ACL_MISS_ERROR +\(lqMissing or wrong entry\(rq +.It ACL_ENTRY_ERROR +\(lqInvalid entry type\(rq +.El +.Sh RETURN VALUE The -.B acl_error +.Fn acl_error function returns a text message if the error code is recognized, and a value of -NULL otherwise. -.SH STANDARDS +.Li (const char *)NULL +otherwise. +.Sh STANDARDS This is a non-portable, Linux specific extension to the ACL manipulation functions defined in IEEE Std 1003.1e draft 17 (\(lqPOSIX.1e\(rq, abandoned). -.SH AUTHOR +.Sh SEE ALSO +.Xr acl_check 3 , +.Xr acl_valid 3 , +.Xr acl 5 +.Sh AUTHOR Written by -.I "Andreas Gruenbacher" -<a.gruenbacher@computer.org>. -.SH SEE ALSO -.BR acl_valid (3), -.BR acl (5) +.An "Andreas Gruenbacher" Aq a.gruenbacher@computer.org . diff --git a/man/man3/acl_extended_fd.3 b/man/man3/acl_extended_fd.3 index 07986c3..71cce44 100644 --- a/man/man3/acl_extended_fd.3 +++ b/man/man3/acl_extended_fd.3 @@ -14,70 +14,85 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.TH ACL_EXTENDED_FD 3 "Linux ACL Library" "March 2002" "Access Control Lists" -.SH NAME -acl_extended_fd \- test for information in the ACL by file descriptor -.SH LIBRARY +.Dd March 23, 2002 +.Dt ACL_EXTENDED_FD 3 +.Os "Linux ACL" +.Sh NAME +.Nm acl_extended_fd +.Nd test for information in the ACL by file descriptor +.Sh LIBRARY Linux Access Control Lists library (libacl, \-lacl). -.SH C SYNOPSIS -.sp -.nf -.B #include <sys/types.h> -.B #include <sys/acl.h> -.sp -.B "int acl_extended_fd (int \f2fd\f3);" -.Op -.SH DESCRIPTION +.Sh SYNOPSIS +.In sys/types.h +.In acl/libacl.h +.Ft int +.Fn acl_extended_fd "int fd" +.Sh DESCRIPTION The -.B acl_extended_fd -function returns 1 if the file referred to by the argument -.I path_p -is associated with an extended access ACL. The function returns 0 +.Fn acl_extended_fd +function returns +.Li 1 +if the file identified by the argument +.Va fd +is associated with an extended access ACL. The function returns +.Li 0 if the file does not have an extended access ACL. -.PP +.Pp An extended ACL is an ACL that contains entries other than the three required entries of tag types ACL_USER_OBJ, ACL_GROUP_OBJ and ACL_OTHER. If the result of the -.B acl_extended_fd -function for a file object is 0, +.Fn acl_extended_fd +function for a file object is +.Li 0 , then the ACL defines no discretionary access rights other than those already defined by the traditional file permission bits. -.PP +.Pp Access to the file object may be further restricted by other mechanisms, such as Mandatory Access Control schemes. The -.BR access (2) +.Xr access 2 system call can be used to check whether a given type of access to a file object would be granted. -.SH RETURN VALUE +.Sh RETURN VALUE If successful, the -.B acl_extended_fd -function returns 1 if the file object referred to by -.I fd -has an extended access ACL, and 0 if the file object referred to by -.I fd -does not have an extended access ACL. Otherwise, the value -1 +.Fn acl_extended_fd +function returns +.Li 1 +if the file object identified by +.Va fd +has an extended access ACL, and +.Li 0 +if the file object identified by +.Va fd +does not have an extended access ACL. Otherwise, the value +.Li -1 is returned and the global variable -.B errno +.Va errno is set to indicate the error. -.SH ERRORS +.Sh ERRORS If any of the following conditions occur, the -.B acl_extended_fd -function returns -1 and sets -.B errno +.Fn acl_extended_fd +function returns +.Li -1 +and sets +.Va errno to the corresponding value: -.TP -.SM -\%[ENOTSUP] +.Bl -tag -width Er +.It Bq Er EBADF +The +.Va fd +argument is not a valid file descriptor. +.It Bq Er ENOTSUP The file system on which the file identified by -.I fd +.Va fd is located does not support ACLs, or ACLs are disabled. -.SH STANDARDS +.El +.Sh STANDARDS This is a non-portable, Linux specific extension to the ACL manipulation functions defined in IEEE Std 1003.1e draft 17 (\(lqPOSIX.1e\(rq, abandoned). -.SH AUTHOR +.Sh SEE ALSO +.Xr access 2 , +.Xr acl_get_fd 3 , +.Xr acl 5 +.Sh AUTHOR Written by -.I "Andreas Gruenbacher" -<a.gruenbacher@computer.org>. -.SH SEE ALSO -.BR access (2), -.BR acl (5) +.An "Andreas Gruenbacher" Aq a.gruenbacher@computer.org . diff --git a/man/man3/acl_extended_file.3 b/man/man3/acl_extended_file.3 index 305f9a4..a5869ec 100644 --- a/man/man3/acl_extended_file.3 +++ b/man/man3/acl_extended_file.3 @@ -14,73 +14,95 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.TH ACL_EXTENDED_FILE 3 "Linux ACL Library" "March 2002" "Access Control Lists" -.SH NAME -acl_extended_file \- test for information in ACLs by file name -.SH LIBRARY +.Dd March 23, 2002 +.Dt ACL_EXTENDED_FILE 3 +.Os "Linux ACL" +.Sh NAME +.Nm acl_extended_file +.Nd test for information in ACLs by file name +.Sh LIBRARY Linux Access Control Lists library (libacl, \-lacl). -.SH C SYNOPSIS -.sp -.nf -.B #include <sys/types.h> -.B #include <sys/acl.h> -.sp -.B "int acl_extended_file (const char *\f2path_p\f3);" -.Op -.SH DESCRIPTION +.Sh SYNOPSIS +.In sys/types.h +.In acl/libacl.h +.Ft int +.Fn acl_extended_file "const char *path_p" +.Sh DESCRIPTION The -.B acl_extended_file -function returns 1 if the file or directory referred to by the argument -.I path_p +.Fn acl_extended_file +function returns +.Li 1 +if the file or directory referred to by the argument +.Va path_p is associated with an extended access ACL, or if the directory referred to by -.I path_p -is associated with a default ACL. The function returns 0 +.Va path_p +is associated with a default ACL. The function returns +.Li 0 if the file has neither an extended access ACL nor a default ACL. -.PP +.Pp An extended ACL is an ACL that contains entries other than the three required entries of tag types ACL_USER_OBJ, ACL_GROUP_OBJ and ACL_OTHER. If the result of the -.B acl_extended_file -function for a file object is 0, +.Fn acl_extended_file +function for a file object is +.Li 0 , then ACLs define no discretionary access rights other than those already defined by the traditional file permission bits. -.PP +.Pp Access to the file object may be further restricted by other mechanisms, such as Mandatory Access Control schemes. The -.BR access (2) +.Xr access 2 system call can be used to check whether a given type of access to a file object would be granted. -.SH RETURN VALUE +.Sh RETURN VALUE If successful, the -.B acl_extended_file -function returns 1 if the file object referred to by -.I path_p -has an extended access ACL or a default ACL, and 0 +.Fn acl_extended_file +function returns +.Li 1 if the file object referred to by -.I path_p +.Va path_p +has an extended access ACL or a default ACL, and +.Li 0 +if the file object referred to by +.Va path_p has neither an extended access ACL nor a default ACL. Otherwise, the value --1 is returned and the global variable -.B errno +.Li -1 +is returned and the global variable +.Va errno is set to indicate the error. -.SH ERRORS +.Sh ERRORS If any of the following conditions occur, the -.B acl_extended_file -function returns -1 and sets -.B errno +.Fn acl_extended_file +function returns +.Li -1 +and sets +.Va errno to the corresponding value: -.TP -.SM -\%[ENOTSUP] +.Bl -tag -width Er +.It Bq Er EACCES +Search permission is denied for a component of the path prefix. +.It Bq Er ENAMETOOLONG +The length of the argument +.Va path_p +is too long. +.It Bq Er ENOENT +The named object does not exist or the argument +.Va path_p +points to an empty string. +.It Bq Er ENOTDIR +A component of the path prefix is not a directory. +.It Bq Er ENOTSUP The file system on which the file identified by -.I path_p +.Va path_p is located does not support ACLs, or ACLs are disabled. -.SH STANDARDS +.El +.Sh STANDARDS This is a non-portable, Linux specific extension to the ACL manipulation functions defined in IEEE Std 1003.1e draft 17 (\(lqPOSIX.1e\(rq, abandoned). -.SH AUTHOR +.Sh SEE ALSO +.Xr access 2 , +.Xr acl_get_file 3 , +.Xr acl 5 +.Sh AUTHOR Written by -.I "Andreas Gruenbacher" -<a.gruenbacher@computer.org>. -.SH SEE ALSO -.BR access (2), -.BR acl (5) +.An "Andreas Gruenbacher" Aq a.gruenbacher@computer.org . diff --git a/man/man3/acl_free.3 b/man/man3/acl_free.3 index 3a522f8..d518646 100644 --- a/man/man3/acl_free.3 +++ b/man/man3/acl_free.3 @@ -14,55 +14,62 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.TH ACL_FREE 3 "Linux ACL Library" "March 2002" "Access Control Lists" -.SH NAME -acl_free \- release memory allocated to an ACL data object -.SH LIBRARY +.Dd March 23, 2002 +.Dt ACL_FREE 3 +.Os "Linux ACL" +.Sh NAME +.Nm acl_free +.Nd release memory allocated to an ACL data object +.Sh LIBRARY Linux Access Control Lists library (libacl, \-lacl). -.SH C SYNOPSIS -.sp -.nf -.B #include <sys/types.h> -.B #include <sys/acl.h> -.sp -.B "int acl_free (void *\f2obj_p\f3);" -.Op -.SH DESCRIPTION +.Sh SYNOPSIS +.In sys/types.h +.In sys/acl.h +.Ft int +.Fn acl_free "void *obj_p" +.Sh DESCRIPTION The -.B acl_free +.Fn acl_free function frees any releasable memory currently allocated by to the ACL data object identified by -.IR obj_p . +.Va obj_p . The argument -.I obj_p +.Va obj_p may identify an ACL, an ACL entry qualifier, or a pointer to a string allocated by the -.B acl_to_text +.Fn acl_to_text function. -.\" .SH IMPLEMENTATION NOTES +.\" .Sh IMPLEMENTATION NOTES .\" True64 prints a compile time warning for acl_free(text) if text was .\" produced by acl_to_text(). Bad! -.SH RETURN VALUE -The value 0 is returned if successful; otherwise the value -1 is -returned and the global variable errno is set to indicate the error. -.SH ERRORS +.Sh RETURN VALUE +.Rv -std acl_free +.Sh ERRORS If any of the following conditions occur, the -.B acl_free -function returns the value -1 and sets -.B errno +.Fn acl_free +function returns the value +.Li -1 +and and sets +.Va errno to the corresponding value: -.TP -.SM -\%[EINVAL] -The value of the -.I obj_p -argument is invalid. -.SH STANDARDS +.Bl -tag -width Er +.It Bq Er EINVAL +The value of the argument +.Va obj_p +is invalid. +.El +.Sh STANDARDS IEEE Std 1003.1e draft 17 (\(lqPOSIX.1e\(rq, abandoned) -.SH AUTHOR +.Sh SEE ALSO +.Xr acl_copy_int 3 , +.Xr acl_create_entry 3 , +.Xr acl_dup 3 , +.Xr acl_from_text 3 , +.Xr acl_get_fd , +.Xr acl_get_file 3 , +.Xr acl_init 3 , +.Xr acl 5 +.Sh AUTHOR Derived from the FreeBSD manual pages written by -.IR "Robert N M Watson" ; +.An "Robert N M Watson" Aq rwatson@FreeBSD.org , and adapted for Linux by -.I "Andreas Gruenbacher" -<a.gruenbacher@computer.org>. -.SH SEE ALSO -.BR acl (5) +.An "Andreas Gruenbacher" Aq a.gruenbacher@computer.org . diff --git a/man/man3/acl_from_mode.3 b/man/man3/acl_from_mode.3 index 908c8ec..86d2e43 100644 --- a/man/man3/acl_from_mode.3 +++ b/man/man3/acl_from_mode.3 @@ -14,50 +14,54 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.TH ACL_FROM_MODE 3 "Linux ACL Library" "March 2002" "Access Control Lists" -.SH NAME -acl_from_mode \- create an ACL from file permission bits -.SH LIBRARY +.Dd March 23, 2002 +.Dt ACL_FROM_MODE 3 +.Os "Linux ACL" +.Sh NAME +.Nm acl_from_mode +.Nd create an ACL from file permission bits +.Sh LIBRARY Linux Access Control Lists library (libacl, \-lacl). -.SH C SYNOPSIS -.sp -.nf -.B #include <sys/types.h> -.B #include <sys/acl.h> -.sp -.B "acl_t acl_from_mode (mode_t \f2mode\f3);" -.Op -.SH DESCRIPTION +.Sh SYNOPSIS +.In sys/types.h +.In acl/libacl.h +.Ft acl_t +.Fn acl_from_mode "mode_t mode" +.Sh DESCRIPTION The -.B acl_from_mode +.Fn acl_from_mode function creates a minimal ACL that contains the three entries with tag types ACL_USER_OBJ, ACL_GROUP_OBJ, and ACL_OTHER, with permissions corresponding to the owner, group, and other permission bits of its argument -.IR mode . -.SH RETURN VALUE +.Va mode . +.Sh RETURN VALUE Upon successful completion, this function returns a pointer to the -working storage. Otherwise, a value of (acl_t)NULL is returned, and -.B errno +working storage. Otherwise, a value of +.Li (acl_t)NULL +is returned, and +.Va errno is set to indicate the error. -.SH ERRORS +.Sh ERRORS If any of the following conditions occur, the -.B acl_from_mode -function returns a value of (acl_t)NULL and sets -.B errno +.Fn acl_from_mode +function returns a value of +.Li (acl_t)NULL +and sets +.Va errno to the corresponding value: -.TP -.SM -\%[ENOMEM] +.Bl -tag -width Er +.It Bq Er ENOMEM The ACL working storage requires more memory than is allowed by the hardware or system-imposed memory management constraints. -.SH STANDARDS +.El +.Sh STANDARDS This is a non-portable, Linux specific extension to the ACL manipulation functions defined in IEEE Std 1003.1e draft 17 (\(lqPOSIX.1e\(rq, abandoned). -.SH AUTHOR +.Sh SEE ALSO +.Xr acl_equiv_mode 3 , +.Xr acl_get_file 3 , +.Xr acl 5 +.Sh AUTHOR Written by -.I "Andreas Gruenbacher" -<a.gruenbacher@computer.org>. -.SH SEE ALSO -.BR acl_equiv_mode (3), -.BR acl (5) +.An "Andreas Gruenbacher" Aq a.gruenbacher@computer.org . diff --git a/man/man3/acl_from_text.3 b/man/man3/acl_from_text.3 index 6d093c5..af642a5 100644 --- a/man/man3/acl_from_text.3 +++ b/man/man3/acl_from_text.3 @@ -14,69 +14,73 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.TH ACL_FROM_TEXT 3 "Linux ACL Library" "March 2002" "Access Control Lists" -.SH NAME -acl_from_text \- create an ACL from text -.SH LIBRARY +.Dd March 23, 2002 +.Dt ACL_FROM_TEXT 3 +.Os "Linux ACL" +.Sh NAME +.Nm acl_from_text +.Nd create an ACL from text +.Sh LIBRARY Linux Access Control Lists library (libacl, \-lacl). -.SH C SYNOPSIS -.sp -.nf -.B #include <sys/types.h> -.B #include <sys/acl.h> -.sp -.B "acl_t acl_from_text (const char *\f2buf_p\f3);" -.Op -.SH DESCRIPTION +.Sh SYNOPSIS +.In sys/types.h +.In sys/acl.h +.Ft acl_t +.Fn acl_from_text "const char *buf_p" +.Sh DESCRIPTION The -.B acl_from_text +.Fn acl_from_text function converts the text form of the ACL referred to by -.I buf_p +.Va buf_p into the internal form of an ACL and returns a pointer to the working storage that contains the ACL. The -.B acl_from_text +.Fn acl_from_text function accepts as input the long text form and short text form of an ACL as described in -.BR acl (5). -.PP +.Xr acl 5 . +.Pp This function may cause memory to be allocated. The caller should free any releasable memory, when the new ACL is no longer required, by calling -.BR acl_free (3) -with the (void*)acl_t returned by -.B acl_from_text +.Xr acl_free 3 +with the +.Va (void*)acl_t +returned by +.Fn acl_from_text as an argument. -.SH RETURN VALUE +.Sh RETURN VALUE Upon successful completion, this function returns a pointer to the -working storage. Otherwise, a value of (acl_t)NULL is returned, and -.B errno +working storage. Otherwise, a value of +.Li (acl_t)NULL +is returned, and +.Va errno is set to indicate the error. -.SH ERRORS +.Sh ERRORS If any of the following conditions occur, the -.B acl_from_text -function returns a value of (acl_t)NULL and sets -.B errno +.Fn acl_from_text +function returns a value of +.Li (acl_t)NULL +and sets +.Va errno to the corresponding value: -.TP -.SM -\%[EINVAL] +.Bl -tag -width Er +.It Bq Er EINVAL The argument -.I buf_p +.Va buf_p cannot be translated into an ACL. -.TP -.SM -\%[ENOMEM] +.It Bq Er ENOMEM The -.B acl_t +.Va acl_t to be returned requires more memory than is allowed by the hardware or system-imposed memory management constraints. -.SH STANDARDS +.El +.Sh STANDARDS IEEE Std 1003.1e draft 17 (\(lqPOSIX.1e\(rq, abandoned) -.SH AUTHOR +.Sh SEE ALSO +.Xr acl_free 3 , +.Xr acl_get_entry 3 , +.Xw acl_to_text 3 , +.Xr acl 5 +.Sh AUTHOR Derived from the FreeBSD manual pages written by -.IR "Robert N M Watson" ; +.An "Robert N M Watson" Aq rwatson@FreeBSD.org , and adapted for Linux by -.I "Andreas Gruenbacher" -<a.gruenbacher@computer.org>. -.SH SEE ALSO -.BR acl_to_text (3), -.BR acl_free (3), -.BR acl (5) +.An "Andreas Gruenbacher" Aq a.gruenbacher@computer.org . diff --git a/man/man3/acl_get_entry.3 b/man/man3/acl_get_entry.3 index f85abf3..61e6b0e 100644 --- a/man/man3/acl_get_entry.3 +++ b/man/man3/acl_get_entry.3 @@ -14,115 +14,122 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.TH ACL_GET_ENTRY 3 "Linux ACL Library" "March 2002" "Access Control Lists" -.SH NAME -acl_get_entry \- get an ACL entry -.SH LIBRARY +.Dd March 23, 2002 +.Dt ACL_GET_ENTRY 3 +.Os "Linux ACL" +.Sh NAME +.Nm acl_get_entry +.Nd get an ACL entry +.Sh LIBRARY Linux Access Control Lists library (libacl, \-lacl). -.SH C SYNOPSIS -.sp -.nf -.B #include <sys/types.h> -.B #include <sys/acl.h> -.sp -.B "int acl_get_entry (acl_t \f2acl\f3, int \f2entry_id\f3, " -.B " acl_entry_t *\f2entry_p\f3);" -.Op -.SH DESCRIPTION +.Sh SYNOPSIS +.In sys/types.h +.In sys/acl.h +.Ft int +.Fn acl_get_entry "acl_t acl" "int entry_id" "acl_entry_t *entry_p" +.Sh DESCRIPTION The -.B acl_get_entry +.Fn acl_get_entry function obtains a descriptor for an ACL entry as specified by -.I entry_id +.Va entry_id within the ACL indicated by the argument -.IR acl . +.Va acl . If the value of -.I entry_id +.Va entry_id is ACL_FIRST_ENTRY, then the function returns in -.I entry_p +.Va entry_p a descriptor for the first ACL entry within -.IR acl . +.Va acl . If the value of -.I entry_id +.Va entry_id is ACL_NEXT_ENTRY, then the function returns in -.I entry_p +.Va entry_p a descriptor for the next ACL entry within -.IR acl . -.PP +.Va acl . +.Pp If a call is made to -.B acl_get_entry +.Fn acl_get_entry with -.I entry_id +.Va entry_id set to ACL_NEXT_ENTRY when there has not been either an initial successful call to -.BR acl_get_entry , +.Fn acl_get_entry , or a previous successful call to -.B acl_get_entry +.Fn acl_get_entry following a call to -.BR acl_calc_mask (3), -.BR acl_copy_int (3), -.BR acl_create_entry (3), -.BR acl_delete_entry (3), -.BR acl_dup (3), -.BR acl_from_text (3), -.BR acl_get_fd (3), -.BR acl_get_file (3), -.BR acl_set_fd (3), -.BR acl_set_file (3), +.Fn acl_calc_mask , +.Fn acl_copy_int , +.Fn acl_create_entry , +.Fn acl_delete_entry , +.Fn acl_dup , +.Fn acl_from_text , +.Fn acl_get_fd , +.Fn acl_get_file , +.Fn acl_set_fd , +.Fn acl_set_file , or -.BR acl_valid (3), +.Fn acl_valid , then the effect is unspecified. -.PP +.Pp Calls to -.B acl_get_entry +.Fn acl_get_entry do not modify any ACL entries. Subsequent operations using the returned ACL entry descriptor operate on the ACL entry within the ACL in working storage. The order of all existing entries in the ACL remains unchanged. Any existing ACL entry descriptors that refer to entries within the ACL continue to refer to those entries. Any existing ACL pointers that refer to the ACL referred to by -.I acl +.Va acl continue to refer to the ACL. -.SH RETURN VALUE +.Sh RETURN VALUE If the function successfully obtains an ACL entry, the function returns a -value of 1. -If the ACL has no ACL entries, the function returns the value 0. +value of +.Li 1 . +If the ACL has no ACL entries, the function returns the value +.Li 0 . If the value of -.I entry_id +.Va entry_id is ACL_NEXT_ENTRY and the last ACL entry in the ACL has already been returned by a previous call to -.BR acl_get_entry , -the function returns the value 0 until a successful call with an -.I entry_id -of ACL_FIRST_ENTRY is made. Otherwise, the value -1 -is returned and errno is set to indicate the error. -.SH ERRORS +.Fn acl_get_entry , +the function returns the value +.Li 0 +until a successful call with an +.Va entry_id +of ACL_FIRST_ENTRY is made. Otherwise, the value +.Li -1 +is returned and +.Va errno +is set to indicate the error. +.Sh ERRORS If any of the following conditions occur, the -.B acl_get_entry -function returns -1 and sets -.B errno +.Fn acl_get_entry +function returns +.Li -1 +and sets +.Va errno to the corresponding value: -.TP -.SM -\%[EINVAL] +.Bl -tag -width Er +.It Bq Er EINVAL The argument -.I acl_p +.Va acl_p is not a valid pointer to an ACL. -.TP -.SM -\%[EINVAL] +.Pp The argument -.I entry_id +.Va entry_id is neither ACL_NEXT_ENTRY nor ACL_FIRST_ENTRY. -.SH STANDARDS +.El +.Sh STANDARDS IEEE Std 1003.1e draft 17 (\(lqPOSIX.1e\(rq, abandoned) -.SH AUTHOR +.Sh SEE ALSO +.Xr acl_calc_mask 3 , +.Xr acl_create_entry 3 , +.Xr acl_copy_entry 3 , +.Xr acl_delete_entry 3 , +.Xr acl_get_file 3 , +.Xr acl 5 +.Sh AUTHOR Derived from the FreeBSD manual pages written by -.IR "Robert N M Watson" ; +.An "Robert N M Watson" Aq rwatson@FreeBSD.org , and adapted for Linux by -.I "Andreas Gruenbacher" -<a.gruenbacher@computer.org>. -.SH SEE ALSO -.BR acl_create_entry (3), -.BR acl_copy_entry (3), -.BR acl_delete_entry (3), -.BR acl (5) +.An "Andreas Gruenbacher" Aq a.gruenbacher@computer.org . diff --git a/man/man3/acl_get_fd.3 b/man/man3/acl_get_fd.3 index bccea63..e2cc1c4 100644 --- a/man/man3/acl_get_fd.3 +++ b/man/man3/acl_get_fd.3 @@ -14,67 +14,76 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.TH ACL_GET_FD 3 "Linux ACL Library" "March 2002" "Access Control Lists" -.SH NAME -acl_get_fd \- get an ACL by file descriptor -.SH LIBRARY +.Dd March 23, 2002 +.Dt ACL_GET_FD 3 +.Os "Linux ACL" +.Sh NAME +.Nm acl_get_fd +.Nd get an ACL by file descriptor +.Sh LIBRARY Linux Access Control Lists library (libacl, \-lacl). -.SH C SYNOPSIS -.sp -.nf -.B #include <sys/types.h> -.B #include <sys/acl.h> -.sp -.B "acl_t acl_get_fd (const char *\f2fd\f3);" -.Op -.SH DESCRIPTION +.Sh SYNOPSIS +.In sys/types.h +.In sys/acl.h +.Ft acl_t +.Fn acl_get_fd "int fd" +.Sh DESCRIPTION The -.B acl_get_fd +.Fn acl_get_fd function retrieves the access ACL associated with the file referred to by -.IR fd . +.Va fd . The ACL is placed into working storage and -.B acl_get_fd +.Fn acl_get_fd returns a pointer to that storage. -.PP +.Pp In order to read an ACL from an object, a process must have read access to the object's attributes. -.PP +.Pp This function may cause memory to be allocated. The caller should free any releasable memory, when the new ACL is no longer required, by calling -.BR acl_free (3) -with the (void*)acl_t returned by -.B acl_get_fd +.Xr acl_free 3 +with the +.Va (void*)acl_t +returned by +.Fn acl_get_fd as an argument. -.SH RETURN VALUE +.Sh RETURN VALUE Upon successful completion, this function shall return a pointer to the -working storage. Otherwise, a value of (acl_t)NULL shall be returned, and -.B errno +working storage. Otherwise, a value of +.Li (acl_t)NULL +shall be returned, and +.Va errno shall be set to indicate the error. -.SH ERRORS +.Sh ERRORS If any of the following conditions occur, the -.B acl_get_fd -function returns a value of (acl_t)NULL and sets -.B errno +.Fn acl_get_fd +function returns a value of +.Li (acl_t)NULL +and sets +.Va errno to the corresponding value: -.TP -.SM -\%[ENOMEM] +.Bl -tag -width Er +.It Bq Er EBADF +The +.Va fd +argument is not a valid file descriptor. +.It Bq Er ENOMEM The ACL working storage requires more memory than is allowed by the hardware or system-imposed memory management constraints. -.TP -.SM -\%[ENOTSUP] +.It Bq Er ENOTSUP The file system on which the file identified by -.I fd +.Va fd is located does not support ACLs, or ACLs are disabled. -.SH STANDARDS +.El +.Sh STANDARDS IEEE Std 1003.1e draft 17 (\(lqPOSIX.1e\(rq, abandoned) -.SH AUTHOR +.Sh SEE ALSO +.Xr acl_free 3 , +.Xr acl_get_entry 3 , +.Xr acl_get_file 3 , +.Xr acl_set_fd 3 , +.Xr acl 5 +.Sh AUTHOR Derived from the FreeBSD manual pages written by -.IR "Robert N M Watson" ; +.An "Robert N M Watson" Aq rwatson@FreeBSD.org , and adapted for Linux by -.I "Andreas Gruenbacher" -<a.gruenbacher@computer.org>. -.SH SEE ALSO -.BR acl_get_file (3), -.BR acl_set_file (3), -.BR acl (5) +.An "Andreas Gruenbacher" Aq a.gruenbacher@computer.org . diff --git a/man/man3/acl_get_file.3 b/man/man3/acl_get_file.3 index fd211ae..3e07c1e 100644 --- a/man/man3/acl_get_file.3 +++ b/man/man3/acl_get_file.3 @@ -14,93 +14,107 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.TH ACL_GET_FILE 3 "Linux ACL Library" "March 2002" "Access Control Lists" -.SH NAME -acl_get_file \- get an ACL by filename -.SH LIBRARY +.Dd March 23, 2002 +.Dt ACL_GET_FILE 3 +.Os "Linux ACL" +.Sh NAME +.Nm acl_get_file +.Nd get an ACL by filename +.Sh LIBRARY Linux Access Control Lists library (libacl, \-lacl). -.SH C SYNOPSIS -.sp -.nf -.B #include <sys/types.h> -.B #include <sys/acl.h> -.sp -.B "acl_t acl_get_file (const char *\f2path_p\f3, acl_type_t \f2type\f3);" -.Op -.SH DESCRIPTION +.Sh SYNOPSIS +.In sys/types.h +.In sys/acl.h +.Ft acl_t +.Fn acl_get_file "const char *path_p" "acl_type_t type" +.Sh DESCRIPTION The -.B acl_get_file +.Fn acl_get_file function retrieves the access ACL associated with a file or directory, or the default ACL associated with a directory. The pathname for the file or directory is pointed to by the argument -.IR path_p . +.Va path_p . The ACL is placed into working storage and -.B acl_get_file +.Fn acl_get_file returns a pointer to that storage. -.PP +.Pp In order to read an ACL from an object, a process must have read access to the object's attributes. -.PP +.Pp The value of the argument -.I type +.Va type is used to indicate whether the access ACL or the default ACL associated with -.I path_p +.Va path_p is returned. If -.I type +.Va type is ACL_TYPE_ACCESS, the access ACL of -.I path_p -is returned. -If -.I type +.Va path_p +is returned. If +.Va type is ACL_TYPE_DEFAULT, the default ACL of -.I path_p -is returned. -If -.I type +.Va path_p +is returned. If +.Va type is TYPE_DEFAULT and no default ACL is associated with -.IR path_p , +.Va path_p , then an ACL containing zero ACL entries is returned. -.PP +.Pp This function may cause memory to be allocated. The caller should free any releasable memory, when the new ACL is no longer required, by calling -.BR acl_free (3) -with the (void*)acl_t returned by -.B acl_get_file +.Xr acl_free 3 +with the +.Va (void*)acl_t +returned by +.Fn acl_get_file as an argument. -.SH RETURN VALUE +.Sh RETURN VALUE Upon successful completion, this function returns a pointer to the -working storage. Otherwise, a value of (acl_t)NULL is returned, and -.B errno +working storage. Otherwise, a value of +.Li (acl_t)NULL +is returned, and +.Va errno is set to indicate the error. -.SH ERRORS +.Sh ERRORS If any of the following conditions occur, the -.B acl_get_file -function returns a value of (acl_t)NULL and sets -.B errno +.Fn acl_get_file +function returns a value of +.Li (acl_t)NULL +and sets +.Va errno to the corresponding value: -.TP -.SM -\%[EINVAL] +.Bl -tag -width Er +.It Bq Er EACCES +Search permission is denied for a component of the path prefix or the +object exists and the process does not have appropriate access rights. +.It Bq Er EINVAL The argument -.I type +.Va type is not ACL_TYPE_ACCESS or ACL_TYPE_DEFAULT. -.TP -.SM -\%[ENOMEM] +.It Bq Er ENAMETOOLONG +The length of the argument +.Va path_p +is too long. +.It Bq Er ENOENT +The named object does not exist or the argument +.Va path_p +points to an empty string. +.It Bq Er ENOMEM The ACL working storage requires more memory than is allowed by the hardware or system-imposed memory management constraints. -.TP -.SM -\%[ENOTSUP] +.It Bq Er ENOTDIR +A component of the path prefix is not a directory. +.It Bq Er ENOTSUP The file system on which the file identified by -.I path_p +.Va path_p is located does not support ACLs, or ACLs are disabled. -.SH STANDARDS +.El +.Sh STANDARDS IEEE Std 1003.1e draft 17 (\(lqPOSIX.1e\(rq, abandoned) -.SH AUTHOR +.Sh SEE ALSO +.Xr acl_free 3 , +.Xr acl_get_entry 3 , +.Xr acl_get_fd 3 , +.Xr acl_set_file 3 , +.Xr acl 5 +.Sh AUTHOR Derived from the FreeBSD manual pages written by -.IR "Robert N M Watson" ; +.An "Robert N M Watson" Aq rwatson@FreeBSD.org , and adapted for Linux by -.I "Andreas Gruenbacher" -<a.gruenbacher@computer.org>. -.SH SEE ALSO -.BR acl_get_fd (3), -.BR acl_set_file (3), -.BR acl (5) +.An "Andreas Gruenbacher" Aq a.gruenbacher@computer.org . diff --git a/man/man3/acl_get_perm.3 b/man/man3/acl_get_perm.3 index 5d371db..9dd8ffe 100644 --- a/man/man3/acl_get_perm.3 +++ b/man/man3/acl_get_perm.3 @@ -14,73 +14,77 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.TH ACL_GET_PERM 3 "Linux ACL Library" "March 2002" "Access Control Lists" -.SH NAME -acl_get_perm \- test for a permission in an ACL permission set -.SH LIBRARY +.Dd March 23, 2002 +.Dt ACL_GET_PERM 3 +.Os "Linux ACL" +.Sh NAME +.Nm acl_get_perm +.Nd test for a permission in an ACL permission set +.Sh LIBRARY Linux Access Control Lists library (libacl, \-lacl). -.SH C SYNOPSIS -.sp -.nf -.B #include <sys/types.h> -.B #include <sys/acl.h> -.sp -.B "int acl_get_perm (acl_permset_t \f2permset_d\f3, " -.B " acl_perm_t \f2perm\f3);" -.Op -.SH DESCRIPTION +.Sh SYNOPSIS +.In sys/types.h +.In acl/libacl.h +.Ft int +.Fn acl_get_perm "acl_permset_t permset_d" "acl_perm_t perm" +.Sh DESCRIPTION The -.B acl_get_perm +.Fn acl_get_perm function tests if the permission specified by the argument -.I perm +.Va perm is contained in the ACL permission set pointed to by the argument -.IR permset_d . -.PP +.Va permset_d . +.Pp Any existing descriptors that refer to -.I permset_d +.Va permset_d continue to refer to that permission set. -.SH RETURN VALUE +.Sh RETURN VALUE If successful, the -.B acl_get_perm -function returns 1 if the permission specified by -.I perm +.Fn acl_get_perm +function returns +.Li 1 +if the permission specified by +.Va perm is contained in the ACL permission set -.IR permset_d , -and 0 if the permission is not contained in the permission set. -Otherwise, the value -1 is returned and the global variable -.B errno +.Va permset_d , +and +.Li 0 +if the permission is not contained in the permission set. Otherwise, +the value +.Li -1 +is returned and the global variable +.Va errno is set to indicate the error. -.SH ERRORS +.Sh ERRORS If any of the following conditions occur, the -.B acl_get_perm -function returns -1 and sets -.B errno +.Fn acl_get_perm +function returns +.Li -1 +and sets +.Va errno to the corresponding value: -.TP -.SM -\%[EINVAL] +.Bl -tag -width Er +.It Bq Er EINVAL The argument -.I permset_d +.Va permset_d is not a valid descriptor for a permission set within an ACL entry. -.TP -.SM -\%[EINVAL] +.Pp The argument -.I perm +.Va perm is not a valid -.I acl_perm_t +.Va acl_perm_t value. -.SH STANDARDS +.El +.Sh STANDARDS This is a non-portable, Linux specific extension to the ACL manipulation functions defined in IEEE Std 1003.1e draft 17 (\(lqPOSIX.1e\(rq, abandoned). -.SH AUTHOR +.Sh SEE ALSO +.Xr acl_add_perm 3 , +.Xr acl_clear_perms 3 , +.Xr acl_delete_perm 3 , +.Xr acl_get_permset 3 , +.Xr acl_set_permset 3 , +.Xr acl 5 +.Sh AUTHOR Written by -.I "Andreas Gruenbacher" -<a.gruenbacher@computer.org>. -.SH SEE ALSO -.BR acl_add_perm (3), -.BR acl_delete_perm (3), -.BR acl_clear_perms (3), -.BR acl_get_permset (3), -.BR acl_set_permset (3), -.BR acl (5) +.An "Andreas Gruenbacher" Aq a.gruenbacher@computer.org . diff --git a/man/man3/acl_get_permset.3 b/man/man3/acl_get_permset.3 index 660426b..06468dc 100644 --- a/man/man3/acl_get_permset.3 +++ b/man/man3/acl_get_permset.3 @@ -14,63 +14,62 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.TH ACL_GET_PERMSET 3 "Linux ACL Library" "March 2002" "Access Control Lists" -.SH NAME -acl_get_permset \- retrieve the permission set from an ACL entry -.SH LIBRARY +.Dd March 23, 2002 +.Dt ACL_GET_PERMSET 3 +.Os "Linux ACL" +.Sh NAME +.Nm acl_get_permset +.Nd retrieve the permission set from an ACL entry +.Sh LIBRARY Linux Access Control Lists library (libacl, \-lacl). -.SH C SYNOPSIS -.sp -.nf -.B #include <sys/types.h> -.B #include <sys/acl.h> -.sp -.B "int acl_get_permset (acl_entry_t \f2entry_d\f3, " -.B " acl_permset_t *\f2permset_p\f3);" -.Op -.SH DESCRIPTION +.Sh SYNOPSIS +.In sys/types.h +.In sys/acl.h +.Ft int +.Fn acl_get_permset "acl_entry_t entry_d" "acl_permset_t *permset_p" +.Sh DESCRIPTION The -.B acl_get_permset +.Fn acl_get_permset function returns in -.I permset_p +.Va permset_p a descriptor to the permission set in the ACL entry indicated by -.IR entry_d . +.Va entry_d . Subsequent operations using the returned permission set descriptor operate on the permission set within the ACL entry. -.PP +.Pp Any ACL entry descriptors that refer to the entry referred to by -.I entry_d +.Va entry_d shall continue to refer to those entries. -.SH RETURN VALUE -The value 0 is returned if successful; otherwise the value -1 is -returned and the global variable errno is set to indicate the error. -.SH ERRORS +.Sh RETURN VALUE +.Rv -std acl_get_permset +.Sh ERRORS If any of the following conditions occur, the -.B acl_get_permset -function returns -1 and sets -.B errno +.Fn acl_get_permset +function returns +.Li -1 +and sets +.Va errno to the corresponding value: -.TP -.SM -\%[EINVAL] +.Bl -tag -width Er +.It Bq Er EINVAL The argument -.I entry_d +.Va entry_d is not a valid descriptor for an ACL entry. -.SH STANDARDS +.El +.Sh STANDARDS IEEE Std 1003.1e draft 17 (\(lqPOSIX.1e\(rq, abandoned) -.SH AUTHOR +.Sh SEE ALSO +.Xr acl_add_perm 3 , +.Xr acl_clear_perms 3 , +.Xr acl_delete_perm 3 , +.Xr acl_get_perm 3 , +.Xr acl_get_qualifier 3 , +.Xr acl_get_tag_type 3 , +.Xr acl_set_permset 3 , +.Xr acl_set_qualifier 3 , +.Xr acl_set_tag_type 3 , +.Xr acl 5 +.Sh AUTHOR Derived from the FreeBSD manual pages written by -.IR "Robert N M Watson" ; +.An "Robert N M Watson" Aq rwatson@FreeBSD.org , and adapted for Linux by -.I "Andreas Gruenbacher" -<a.gruenbacher@computer.org>. -.SH SEE ALSO -.BR acl_get_perm (3), -.BR acl_add_perm (3), -.BR acl_delete_perm (3), -.BR acl_clear_perms (3), -.BR acl_set_permset (3), -.BR acl_get_qualifier (3), -.BR acl_set_qualifier (3), -.BR acl_get_tag_type (3), -.BR acl_set_tag_type (3), -.BR acl (5) +.An "Andreas Gruenbacher" Aq a.gruenbacher@computer.org . diff --git a/man/man3/acl_get_qualifier.3 b/man/man3/acl_get_qualifier.3 index 5ceacb9..6c4dbad 100644 --- a/man/man3/acl_get_qualifier.3 +++ b/man/man3/acl_get_qualifier.3 @@ -14,108 +14,105 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.TH ACL_GET_QUALIFIER 3 "Linux ACL Library" "March 2002" "Access Control Lists" -.SH NAME -acl_get_qualifier \- retrieve the qualifier from an ACL entry -.SH LIBRARY +.Dd March 23, 2002 +.Dt ACL_GET_QUALIFIER 3 +.Os "Linux ACL" +.Sh NAME +.Nm acl_get_qualifier +.Nd retrieve the qualifier from an ACL entry +.Sh LIBRARY Linux Access Control Lists library (libacl, \-lacl). -.SH C SYNOPSIS -.sp -.nf -.B #include <sys/types.h> -.B #include <sys/acl.h> -.sp -.B "void * acl_get_qualifier (acl_entry_t \f2entry_d\f3);" -.Op -.SH DESCRIPTION +.Sh SYNOPSIS +.In sys/types.h +.In sys/acl.h +.Ft void * +.Fn acl_get_qualifier "acl_entry_t entry_d" +.Sh DESCRIPTION The -.B acl_get_qualifier +.Fn acl_get_qualifier function retrieves the qualifier from the ACL entry indicated by the argument -.I entry_d +.Va entry_d into working storage and returns a pointer to that storage. -.PP +.Pp If the value of the tag type in the ACL entry referred to by -.I entry_d +.Va entry_d is ACL_USER, then the value returned by -.B acl_get_qualifier +.Fn acl_get_qualifier is a pointer to type -.BR uid_t . +.Va uid_t . If the value of the tag type in the ACL entry referred to by -.I entry_d +.Va entry_d is ACL_GROUP, then the value returned by -.B acl_get_qualifier +.Fn acl_get_qualifier is a pointer to type -.IR gid_t . +.Va gid_t . If the tag type in the ACL entry referred to by -.I entry_d +.Va entry_d is a tag type for which a qualifier is not supported, -.B acl_get_qualifier -returns a value of NULL +.Fn acl_get_qualifier +returns a value of +.Li (void *)NULL and the function fails. Subsequent operations using the returned pointer -operate on an independent copy of the qualifier in working storage, and -will not change the qualifier of the ACL entry. -.PP +operate on an independent copy of the qualifier in working storage, and will not change the qualifier of the ACL entry. +.Pp This function may cause memory to be allocated. The caller should free any releasable memory, when the new qualifier is no longer required, by calling -.B acl_free +.Fn acl_free with the -.B "void *" +.Va void * value returned by -.B acl_get_qualifier +.Fn acl_get_qualifier as an argument. -.PP +.Pp The argument -.I entry_d +.Va entry_d and any other ACL entry descriptors that refer to entries within the ACL containing the entry referred to by -.I entry_d +.Va entry_d continue to refer to those entries. The order of all existing entries in the ACL containing the entry referred to by -.I entry_d +.Va entry_d remains unchanged. -.SH RETURN VALUE -Upon successful completion, the function returns a pointer to the tag -qualifier that was retrieved into ACL working storage. Otherwise, a value -of NULL is returned and -.B errno +.Sh RETURN VALUE +Upon successful completion, the function returns a pointer to the tag qualifier that was retrieved into ACL working storage. Otherwise, a value of +.Li (void *)NULL +is returned and +.Va errno is set to indicate the error. -.SH ERRORS +.Sh ERRORS If any of the following conditions occur, the -.B acl_get_qualifier -function returns (void *)NULL and sets -.B errno +.Fn acl_get_qualifier +function returns +.Li (void *)NULL +and sets +.Va errno to the corresponding value: -.TP -.SM -\%[EINVAL] +.Bl -tag -width Er +.It Bq Er EINVAL The argument -.I entry_d +.Va entry_d is not a valid descriptor for an ACL entry. -.TP -.SM -\%[EINVAL] -The value of the tag type in the ACL entry referenced by the -.I entry_d -argument is neither ACL_USER nor ACL_GROUP. -.TP -.SM -\%[ENOMEM] +.Pp +The value of the tag type in the ACL entry referenced by the argument +.Va entry_d +is neither ACL_USER nor ACL_GROUP. +.It Bq Er ENOMEM The value to be returned requires more memory than is allowed by the hardware or system-imposed memory management constraints. -.SH STANDARDS +.El +.Sh STANDARDS IEEE Std 1003.1e draft 17 (\(lqPOSIX.1e\(rq, abandoned) -.SH AUTHOR +.Sh SEE ALSO +.Xr acl_create_entry 3 , +.Xr acl_free 3 , +.Xr acl_get_entry 3 , +.Xr acl_get_permset 3 , +.Xr acl_get_tag_type 3 , +.Xr acl_set_permset 3 , +.Xr acl_set_qualifier 3 , +.Xr acl_set_tag_type 3 , +.Xr acl 5 +.Sh AUTHOR Derived from the FreeBSD manual pages written by -.IR "Robert N M Watson" ; +.An "Robert N M Watson" Aq rwatson@FreeBSD.org , and adapted for Linux by -.I "Andreas Gruenbacher" -<a.gruenbacher@computer.org>. -.SH SEE ALSO -.BR acl_create_entry (3), -.BR acl_get_entry (3), -.BR acl_set_qualifier (3), -.BR acl_get_tag_type (3), -.BR acl_set_tag_type (3), -.BR acl_get_permset (3), -.BR acl_set_permset (3), -.BR acl_free (3), -.BR acl (5) +.An "Andreas Gruenbacher" Aq a.gruenbacher@computer.org . diff --git a/man/man3/acl_get_tag_type.3 b/man/man3/acl_get_tag_type.3 index 43209e5..fa2111d 100644 --- a/man/man3/acl_get_tag_type.3 +++ b/man/man3/acl_get_tag_type.3 @@ -14,63 +14,62 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.TH ACL_GET_TAG_TYPE 3 "Linux ACL Library" "March 2002" "Access Control Lists" -.SH NAME -acl_get_tag_type \- get the tag type of an ACL entry -.SH LIBRARY +.Dd March 23, 2002 +.Dt ACL_GET_TAG_TYPE 3 +.Os "Linux ACL" +.Sh NAME +.Nm acl_get_tag_type +.Nd get the tag type of an ACL entry +.Sh LIBRARY Linux Access Control Lists library (libacl, \-lacl). -.SH C SYNOPSIS -.sp -.nf -.B #include <sys/types.h> -.B #include <sys/acl.h> -.sp -.B "int acl_get_tag_type (acl_entry_t \f2entry_d\f3, " -.B " acl_tag_t *\f2tag_type_p\f3);" -.Op -.SH DESCRIPTION +.Sh SYNOPSIS +.In sys/types.h +.In sys/acl.h +.Ft int +.Fn acl_get_tag_type "acl_entry_t entry_d" "acl_tag_t *tag_type_p" +.Sh DESCRIPTION The -.B acl_get_tag_type +.Fn acl_get_tag_type function assigns to the value pointed to by -.I tag_type_p +.Va tag_type_p the tag type for the ACL entry indicated by the argument -.IR entry_d . -.PP +.Va entry_d . +.Pp The argument -.I entry_d +.Va entry_d and any other ACL entry descriptors that refer to entries in the same ACL continue to refer to those entries. The order of all existing entries in the ACL remain unchanged. -.SH RETURN VALUE -The value 0 is returned if successful; otherwise the value -1 is -returned and the global variable errno is set to indicate the error. -.SH ERRORS +.Sh RETURN VALUE +.Rv -std acl_get_tag_type +.Sh ERRORS If any of the following conditions occur, the -.B acl_get_tag_type -function returns -1 and sets -.B errno +.Fn acl_get_tag_type +function returns +.Li -1 +and sets +.Va errno to the corresponding value: -.TP -.SM -\%[EINVAL] +.Bl -tag -width Er +.It Bq Er EINVAL The argument -.I entry_d +.Va entry_d is not a valid descriptor for an ACL entry. -.SH STANDARDS +.El +.Sh STANDARDS IEEE Std 1003.1e draft 17 (\(lqPOSIX.1e\(rq, abandoned) -.SH AUTHOR +.Sh SEE ALSO +.Xr acl_create_entry 3 , +.Xr acl_free 3 , +.Xr acl_get_entry 3 , +.Xr acl_get_permset 3 , +.Xr acl_get_qualifier 3 , +.Xr acl_set_permset 3 , +.Xr acl_set_qualifier 3 , +.Xr acl_set_tag_type 3 , +.Xr acl 5 +.Sh AUTHOR Derived from the FreeBSD manual pages written by -.IR "Robert N M Watson" ; +.An "Robert N M Watson" Aq rwatson@FreeBSD.org , and adapted for Linux by -.I "Andreas Gruenbacher" -<a.gruenbacher@computer.org>. -.SH SEE ALSO -.BR acl_create_entry (3), -.BR acl_get_entry (3), -.BR acl_get_qualifier (3), -.BR acl_set_qualifier (3), -.BR acl_set_tag_type (3), -.BR acl_get_permset (3), -.BR acl_set_pe)mset (3), -.BR acl_free (3), -.BR acl (5) +.An "Andreas Gruenbacher" Aq a.gruenbacher@computer.org . diff --git a/man/man3/acl_init.3 b/man/man3/acl_init.3 index 73b63e7..0bc5cd3 100644 --- a/man/man3/acl_init.3 +++ b/man/man3/acl_init.3 @@ -14,67 +14,67 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.TH ACL_INIT 3 "Linux ACL Library" "March 2002" "Access Control Lists" -.SH NAME -acl_init \- initialize ACL working storage -.SH LIBRARY +.Dd March 23, 2002 +.Dt ACL_INIT 3 +.Os "Linux ACL" +.Sh NAME +.Nm acl_init +.Nd initialize ACL working storage +.Sh LIBRARY Linux Access Control Lists library (libacl, \-lacl). -.SH C SYNOPSIS -.sp -.nf -.B #include <sys/types.h> -.B #include <sys/acl.h> -.sp -.B "acl_t acl_init (int \f2count\f3);" -.Op -.SH DESCRIPTION +.Sh SYNOPSIS +.In sys/types.h +.In sys/acl.h +.Ft acl_t +.Fn acl_init "int count" +.Sh DESCRIPTION The -.B acl_init +.Fn acl_init function allocates and initializes the working storage for an ACL of at least -.I count +.Va count ACL entries. The ACL created initially contains no ACL entries. A pointer to the working storage is returned. -.PP +.Pp This function may cause memory to be allocated. The caller should free any releasable memory, when the new ACL is no longer required, by calling -.BR acl_free (3) +.Xr acl_free 3 with the -.B (void*)acl_t +.Va (void*)acl_t returned by -.B acl_init +.Fn acl_init as an argument. -.SH RETURN VALUE +.Sh RETURN VALUE Upon successful completion, this function returns a pointer to the -working storage. Otherwise, a value of (acl_t)NULL is returned, and -.B errno +working storage. Otherwise, a value of +.Li (acl_t)NULL +is returned, and +.Va errno is set to indicate the error. -.SH ERRORS +.Sh ERRORS If any of the following conditions occur, the -.B acl_init -function returns a value of (acl_t)NULL and sets -.B errno +.Fn acl_init +function returns a value of +.Li (acl_t)NULL +and sets +.Va errno to the corresponding value: -.TP -.SM -\%[EINVAL] -The value of -.I count -is less than zero. -.TP -.SM -\%[ENOMEM] +.Bl -tag -width Er +.It Bq Er EINVAL +The value of count is less than zero. +.It Bq Er ENOMEM The -.B acl_t +.Va acl_t to be returned requires more memory than is allowed by the hardware or system-imposed memory management constraints. -.SH STANDARDS +.El +.Sh STANDARDS IEEE Std 1003.1e draft 17 (\(lqPOSIX.1e\(rq, abandoned) -.SH AUTHOR +.Sh SEE ALSO +.Xr acl_get_file 3 , +.Xr acl_free 3 , +.Xr acl 5 +.Sh AUTHOR Derived from the FreeBSD manual pages written by -.IR "Robert N M Watson" ; +.An "Robert N M Watson" Aq rwatson@FreeBSD.org , and adapted for Linux by -.I "Andreas Gruenbacher" -<a.gruenbacher@computer.org>. -.SH SEE ALSO -.BR acl_free (3), -.BR acl (5) +.An "Andreas Gruenbacher" Aq a.gruenbacher@computer.org . diff --git a/man/man3/acl_set_fd.3 b/man/man3/acl_set_fd.3 index 0a181e9..b1f8f69 100644 --- a/man/man3/acl_set_fd.3 +++ b/man/man3/acl_set_fd.3 @@ -14,77 +14,71 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.TH ACL_SET_FD 3 "Linux ACL Library" "March 2002" "Access Control Lists" -.SH NAME -acl_set_fd \- set an ACL by file descriptor -.SH LIBRARY +.Dd March 23, 2002 +.Dt ACL_SET_FD 3 +.Os "Linux ACL" +.Sh NAME +.Nm acl_set_fd +.Nd set an ACL by file descriptor +.Sh LIBRARY Linux Access Control Lists library (libacl, \-lacl). -.SH SYNOPSIS -.sp -.nf -.B #include <sys/types.h> -.B #include <sys/acl.h> -.sp -.B "int acl_set_fd (int \f2fd\f3, acl_t \f2acl\f3);" -.Op -.SH DESCRIPTION +.Sh SYNOPSIS +.In sys/types.h +.In sys/acl.h +.Ft int +.Fn acl_set_fd "int fd" "acl_t acl" +.Sh DESCRIPTION The -.B acl_set_fd +.Fn acl_set_fd function associates an access ACL with the file referred to by -.IR fd . -.PP +.Va fd . +.Pp The effective user ID of the process must match the owner of the file or the process must have the CAP_FOWNER capability for the request to succeed. -.SH RETURN VALUE -The value 0 is returned if successful; otherwise the value -1 is -returned and the global variable errno is set to indicate the error. -.SH ERRORS +.Sh RETURN VALUE +.Rv -std acl_set_fd +.Sh ERRORS If any of the following conditions occur, the -.B acl_set_fd -function returns the value -1 and and sets -.B errno +.Fn acl_set_fd +function returns the value +.Li -1 +and and sets +.Va errno to the corresponding value: -.TP -.SM -\%[EINVAL] +.Bl -tag -width Er +.It Bq Er EBADF +The +.Va fd +argument is not a valid file descriptor. +.It Bq Er EINVAL The argument -.I acl +.Va acl does not point to a valid ACL. -.TP -.SM -\%[EINVAL] +.Pp The ACL has more entries than the file referred to by -.I fd +.Va fd can obtain. -.TP -.SM -\%[ENOSPC] +.It Bq Er ENOSPC The directory or file system that would contain the new ACL cannot be extended or the file system is out of file allocation resources. -.TP -.SM -\%[EPERM] -The process does not have appropriate privilege to perform the operation to set the ACL. -.TP -.SM -\%[EROFS] -This function requires modification of a file system which is currently read-only. -.TP -.SM -\%[ENOTSUP] +.It Bq Er ENOTSUP The file identified by -.I fd +.Va fd cannot be associated with the ACL because the file system on which the file is located does not support this. -.SH STANDARDS +.It Bq Er EPERM +The process does not have appropriate privilege to perform the operation to set the ACL. +.It Bq Er EROFS +This function requires modification of a file system which is currently read-only. +.El +.Sh STANDARDS IEEE Std 1003.1e draft 17 (\(lqPOSIX.1e\(rq, abandoned) -.SH AUTHOR +.Sh SEE ALSO +.Xr acl_delete_def_file 3 , +.Xr acl_get_file 3 , +.Xr acl_set_file 3 , +.Xr acl_valid 3 , +.Xr acl 5 +.Sh AUTHOR Derived from the FreeBSD manual pages written by -.IR "Robert N M Watson" ; +.An "Robert N M Watson" Aq rwatson@FreeBSD.org , and adapted for Linux by -.I "Andreas Gruenbacher" -<a.gruenbacher@computer.org>. -.SH SEE ALSO -.BR acl_delete_def_file (3), -.BR acl_get_file (3), -.BR acl_set_file (3), -.BR acl_valid (3), -.BR acl (5) +.An "Andreas Gruenbacher" Aq a.gruenbacher@computer.org . diff --git a/man/man3/acl_set_file.3 b/man/man3/acl_set_file.3 index 79057b6..a22cb1f 100644 --- a/man/man3/acl_set_file.3 +++ b/man/man3/acl_set_file.3 @@ -14,137 +14,143 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.TH ACL_SET_FILE 3 "Linux ACL Library" "March 2002" "Access Control Lists" -.SH NAME -acl_set_file \- set an ACL by filename -.SH LIBRARY +.Dd March 23, 2002 +.Dt ACL_SET_FILE 3 +.Os "Linux ACL" +.Sh NAME +.Nm acl_set_file +.Nd set an ACL by filename +.Sh LIBRARY Linux Access Control Lists library (libacl, \-lacl). -.SH SYNOPSIS -.sp -.nf -.B #include <sys/types.h> -.B #include <sys/acl.h> -.sp -.B "int acl_set_file (const char *\f2path_p\f3, " -.B " acl_type_t \f2type\f3, acl_t \f2acl\f3);" -.Op -.SH DESCRIPTION +.Sh SYNOPSIS +.In sys/types.h +.In sys/acl.h +.Ft int +.Fn acl_set_file "const char *path_p" "acl_type_t type" "acl_t acl" +.Sh DESCRIPTION The -.B acl_set_file +.Fn acl_set_file function associates an access ACL with a file or directory, or associates a default ACL with a directory. The pathname for the file or directory is pointed to by the argument -.IR path_p . -.PP +.Va path_p . +.Pp The effective user ID of the process must match the owner of the file or directory or the process must have the CAP_FOWNER capability for the request to succeed. -.PP +.Pp The value of the argument -.I type +.Va type is used to indicate whether the access ACL or the default ACL associated with -.I path_p +.Va path_p is being set. If the -.I type +.Va type parameter is ACL_TYPE_ACCESS, the access ACL of -.I path_p -shall be set. -If the -.I type +.Va path_p +shall be set. If the +.Va type parameter is ACL_TYPE_DEFAULT, the default ACL of -.I path_p -shall be set. -If the argument -.I type +.Va path_p +shall be set. If the argument +.Va type specifies a type of ACL that cannot be associated with -.IR path_p , +.Va path_p , then the function will fail. -.PP +.Pp The -.I acl +.Va acl parameter must reference a valid ACL according to the rules described on the -.BR acl_valid (3) +.Xr acl_valid 3 manual page if the -.I type +.Va type parameter is ACL_TYPE_ACCESS, and must either reference a valid ACL or an ACL with zero ACL entries if the -.I type +.Va type parameter is ACL_TYPE_DEFAULT. If the -.I acl +.Va acl parameter references an empty ACL, then the -.B acl_set_file +.Fn acl_set_file function removes any default ACL associated with the directory referred to by the -.I path_p +.Va path_p parameter. -.SH RETURN VALUE -The value 0 is returned if successful; otherwise the value -1 is -returned and the global variable errno is set to indicate the error. -.SH ERRORS +.Sh RETURN VALUE +.Rv -std acl_set_file +.Sh ERRORS If any of the following conditions occur, the -.B acl_set_file -function returns -1 and sets -.B errno +.Fn acl_set_file +function returns +.Li -1 +and sets +.Va errno to the corresponding value: -.TP -.SM -\%[EINVAL] +.Bl -tag -width Er +.It Bq Er EACCES +Search permission is denied for a component of the path prefix or the +object exists and the process does not have appropriate access rights. +.It Bq Er EINVAL The argument -.I acl +.Va acl does not point to a valid ACL. -.PP +.Pp The ACL has more entries than the file referred to by -.I path_p +.Va path_p can obtain. -.PP +.Pp The -.I type +.Va type +parameter is not ACL_TYPE_ACCESS or ACL_TYPE_DEFAULT. +.Pp +The +.Va type parameter is ACL_TYPE_DEFAULT, but the file referred to by -.I path_p +.Va path_p is not a directory. -.TP -.SM -\%[ENOSPC] +.It Bq Er ENAMETOOLONG +The length of the argument +.Va path_p +is too long. +.It Bq Er ENOENT +The named object does not exist or the argument +.Va path_p +points to an empty string. +.It Bq Er ENOSPC The directory or file system that would contain the new ACL cannot be extended or the file system is out of file allocation resources. -.TP -.SM -\%[EPERM] -The process does not have appropriate privilege to perform the operation to set the ACL. -.TP -.SM -\%[EROFS] -This function requires modification of a file system which is currently read-only. -.TP -.SM -\%[ENOTSUP] +.It Bq Er ENOTDIR +A component of the path prefix is not a directory. +.It Bq Er ENOTSUP The file identified by -.I path_p +.Va path_p cannot be associated with the ACL because the file system on which the file is located does not support this. -.SH STANDARDS +.It Bq Er EPERM +The process does not have appropriate privilege to perform the operation to set the ACL. +.It Bq Er EROFS +This function requires modification of a file system which is currently read-only. +.El +.Sh STANDARDS IEEE Std 1003.1e draft 17 (\(lqPOSIX.1e\(rq, abandoned) -.PP +.Pp The behavior of -.B acl_set_file +.Fn acl_set_file when the -.I acl +.Va acl parameter refers to an empty ACL and the -.I type +.Va type parameter is ACL_TYPE_DEFAULT is an extension in the Linux implementation, in order that all values returned by -.BR acl_get_file (3) +.Fn acl_get_file can be passed to -.BR acl_set_file . +.Fn acl_set_file . The POSIX.1e function for removing a default ACL is -.BR acl_delete_def_file . -.SH AUTHOR +.Fn acl_delete_def_file . +.Sh SEE ALSO +.Xr acl_delete_def_file 3 , +.Xr acl_get_file 3 , +.Xr acl_set_fd 3 , +.Xr acl_valid 3 , +.Xr acl 5 +.Sh AUTHOR Derived from the FreeBSD manual pages written by -.IR "Robert N M Watson" ; +.An "Robert N M Watson" Aq rwatson@FreeBSD.org , and adapted for Linux by -.I "Andreas Gruenbacher" -<a.gruenbacher@computer.org>. -.SH SEE ALSO -.BR acl_delete_def_file (3), -.BR acl_get_file (3), -.BR acl_set_fd (3), -.BR acl_valid (3), -.BR acl (5) +.An "Andreas Gruenbacher" Aq a.gruenbacher@computer.org . diff --git a/man/man3/acl_set_permset.3 b/man/man3/acl_set_permset.3 index cd69f2b..87caf32 100644 --- a/man/man3/acl_set_permset.3 +++ b/man/man3/acl_set_permset.3 @@ -14,83 +14,78 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.TH ACL_SET_PERMSET 3 "Linux ACL Library" "March 2002" "Access Control Lists" -.SH NAME -acl_set_permset \- set the permission set in an ACL entry -.SH LIBRARY +.Dd March 23, 2002 +.Dt ACL_SET_PERMSET 3 +.Os "Linux ACL" +.Sh NAME +.Nm acl_set_permset +.Nd set the permission set in an ACL entry +.Sh LIBRARY Linux Access Control Lists library (libacl, \-lacl). -.SH SYNOPSIS -.sp -.nf -.B #include <sys/types.h> -.B #include <sys/acl.h> -.sp -.B "int acl_set_permset (acl_entry_t \f2entry_d\f3, " -.B " acl_permset_t \f2permset_d\f3);" -.Op -.SH DESCRIPTION +.Sh SYNOPSIS +.In sys/types.h +.In sys/acl.h +.Ft int +.Fn acl_set_permset "acl_entry_t entry_d" "acl_permset_t permset_d" +.Sh DESCRIPTION The -.B acl_set_permset +.Fn acl_set_permset function sets the permission set of the ACL entry indicated by the argument -.I entry_d +.Va entry_d to the permissions contained in the argument -.IR permset_d . -.PP +.Va permset_d . +.Pp Any ACL entry descriptors that refer to the entry containing the permission set referred to by -.I permset_d +.Va permset_d shall continue to refer to those entries. Any ACL entry descriptors that refer to the entry referred to by -.I entry_d +.Va entry_d shall continue to refer to that entry. -.SH RETURN VALUE -The value 0 is returned if successful; otherwise the value -1 is -returned and the global variable errno is set to indicate the error. -.SH ERRORS +.Sh RETURN VALUE +.Rv -std acl_set_permset +.Sh ERRORS If any of the following conditions occur, the -.B acl_set_permset -function returns -1 and sets -.B errno +.Fn acl_set_permset +function returns +.Li -1 +and sets +.Va errno to the corresponding value: -.TP -.SM -\%[EINVAL] +.Bl -tag -width Er +.It Bq Er EINVAL The argument -.I entry_d +.Va entry_d is not a valid descriptor for an ACL entry. -.TP -.SM -\%[EINVAL] +.Pp The argument -.I permset_d +.Va permset_d is not a valid descriptor for a permission set within an ACL entry. -.TP -.SM -\%[EINVAL] +.Pp .\" <AG> .\" The following condition seems strange. .\" </AG> The argument -.I permset_d +.Va permset_d contains values which are not valid -.B acl_permset_t +.Va acl_permset_t values. -.SH STANDARDS +.El +.Sh STANDARDS IEEE Std 1003.1e draft 17 (\(lqPOSIX.1e\(rq, abandoned) -.SH AUTHOR +.Sh SEE ALSO +.Xr acl_add_perm 3 , +.Xr acl_clear_perms 3 , +.Xr acl_delete_perm 3 , +.Xr acl_get_perm 3 , +.Xr acl_get_permset 3 , +.Xr acl_get_qualifier 3 , +.Xr acl_get_tag_type 3 , +.Xr acl_set_qualifier 3 , +.Xr acl_set_tag_type 3 , +.Xr acl 5 +.Sh AUTHOR Derived from the FreeBSD manual pages written by -.IR "Robert N M Watson" ; +.An "Robert N M Watson" Aq rwatson@FreeBSD.org , and adapted for Linux by -.I "Andreas Gruenbacher" -<a.gruenbacher@computer.org>. -.SH SEE ALSO -.BR acl_get_perm (3), -.BR acl_add_perm (3), -.BR acl_delete_perm (3), -.BR acl_clear_perms (3), -.BR acl_get_permset (3), -.BR acl_get_qualifier (3), -.BR acl_set_qualifier (3), -.BR acl_get_tag_type (3), -.BR acl_set_tag_type (3), -.BR acl (5) +.An "Andreas Gruenbacher" Aq a.gruenbacher@computer.org . diff --git a/man/man3/acl_set_qualifier.3 b/man/man3/acl_set_qualifier.3 index a26b319..23feb6c 100644 --- a/man/man3/acl_set_qualifier.3 +++ b/man/man3/acl_set_qualifier.3 @@ -14,100 +14,93 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.TH ACL_SET_QUALIFIER 3 "Linux ACL Library" "March 2002" "Access Control Lists" -.SH NAME -acl_set_qualifier \- set the qualifier of an ACL entry -.SH LIBRARY +.Dd March 23, 2002 +.Dt ACL_SET_QUALIFIER 3 +.Os "Linux ACL" +.Sh NAME +.Nm acl_set_qualifier +.Nd set the qualifier of an ACL entry +.Sh LIBRARY Linux Access Control Lists library (libacl, \-lacl). -.SH SYNOPSIS -.sp -.nf -.B #include <sys/types.h> -.B #include <sys/acl.h> -.sp -.B "int acl_set_qualifier (acl_entry_t \f2entry_d\f3, " -.B " const void *\f2qualifier_p\f3);" -.Op -.SH DESCRIPTION +.Sh SYNOPSIS +.In sys/types.h +.In sys/acl.h +.Ft int +.Fn acl_set_qualifier "acl_entry_t entry_d" "const void *qualifier_p" +.Sh DESCRIPTION The -.B acl_set_qualifier +.Fn acl_set_qualifier function sets the qualifier of the ACL entry indicated by the argument -.I entry_d +.Va entry_d to the value referred to by the argument -.IR qualifier_p . +.Va qualifier_p . If the value of the tag type in the ACL entry referred to by -.I entry_d +.Va entry_d is ACL_USER, then the value referred to by -.I qualifier_p +.Va qualifier_p shall be of type -.BR uid_t . +.Va uid_t . If the value of the tag type in the ACL entry referred to by -.I entry_d +.Va entry_d is ACL_GROUP, then the value referred to by -.I qualifier_p +.Va qualifier_p shall be of type -.BR gid_t . +.Va gid_t . If the value of the tag type in the ACL entry referred to by -.I entry_d +.Va entry_d is a tag type for which a qualifier is not supported, -.B acl_set_qualifier +.Fn acl_set_qualifier returns an error. -.PP +.Pp Any ACL entry descriptors that refer to the entry referred to by -.I entry_d +.Va entry_d continue to refer to that entry. This function may cause memory to be allocated. The caller should free any releasable memory, when the ACL is no longer required, by calling -.BR acl_free (3) +.Fn acl_free with a pointer to the ACL as argument. -.SH RETURN VALUE -The value 0 is returned if successful; otherwise the value -1 is -returned and the global variable errno is set to indicate the error. -.SH ERRORS +.Sh RETURN VALUE +.Rv -std acl_set_qualifier +.Sh ERRORS If any of the following conditions occur, the -.B acl_set_qualifier -function returns -1 and sets -.B errno +.Fn acl_set_qualifier +function returns +.Li -1 +and sets +.Va errno to the corresponding value: -.TP -.SM -\%[EINVAL] +.Bl -tag -width Er +.It Bq Er EINVAL The argument -.I entry_d +.Va entry_d is not a valid descriptor for an ACL entry. -.TP -.SM -\%[EINVAL] -The value of the tag type in the ACL entry referenced by the -.I entry_d -argument is neither ACL_USER nor ACL_GROUP. -.TP -.SM -\%[EINVAL] +.Pp +The value of the tag type in the ACL entry referenced by the argument +.Va entry_d +is neither ACL_USER nor ACL_GROUP. +.Pp The value pointed to by the argument -.I qualifier_p +.Va qualifier_p is not valid. -.TP -.SM -\%[ENOMEM] +.It Bq Er ENOMEM The -.B acl_set_qualifier +.Fn acl_set_qualifier function is unable to allocate the memory required for the ACL qualifier. -.SH STANDARDS +.El +.Sh STANDARDS IEEE Std 1003.1e draft 17 (\(lqPOSIX.1e\(rq, abandoned) -.SH AUTHOR +.Sh SEE ALSO +.Xr acl_create_entry 3 , +.Xr acl_free 3 , +.Xr acl_get_permset 3 , +.Xr acl_get_qualifier 3 , +.Xr acl_get_tag_type 3 , +.Xr acl_set_entry 3 , +.Xr acl_set_permset 3 , +.Xr acl_set_tag_type 3 , +.Xr acl 5 +.Sh AUTHOR Derived from the FreeBSD manual pages written by -.IR "Robert N M Watson" ; +.An "Robert N M Watson" Aq rwatson@FreeBSD.org , and adapted for Linux by -.I "Andreas Gruenbacher" -<a.gruenbacher@computer.org>. -.SH SEE ALSO -.BR acl_create_entry (3), -.BR acl_set_entry (3), -.BR acl_get_qualifier (3), -.BR acl_get_tag_type (3), -.BR acl_set_tag_type (3), -.BR acl_get_permset (3), -.BR acl_set_permset (3), -.BR acl_free (3), -.BR acl (5) +.An "Andreas Gruenbacher" Aq a.gruenbacher@computer.org . diff --git a/man/man3/acl_set_tag_type.3 b/man/man3/acl_set_tag_type.3 index 78dc740..e73496e 100644 --- a/man/man3/acl_set_tag_type.3 +++ b/man/man3/acl_set_tag_type.3 @@ -14,67 +14,64 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.TH ACL_SET_TAG_TYPE 3 "Linux ACL Library" "March 2002" "Access Control Lists" -.SH NAME -acl_set_tag_type \- set the tag type of an ACL entry -.SH LIBRARY +.Dd March 23, 2002 +.Dt ACL_SET_TAG_TYPE 3 +.Os "Linux ACL" +.Sh NAME +.Nm acl_set_tag_type +.Nd set the tag type of an ACL entry +.Sh LIBRARY Linux Access Control Lists library (libacl, \-lacl). -.SH SYNOPSIS -.sp -.nf -.B #include <sys/types.h> -.B #include <sys/acl.h> -.sp -.B "int acl_set_tag_type (acl_entry_t \f2entry_d\f3, " -.B " acl_tag_t \f2tag_type\f3);" -.Op -.SH DESCRIPTION +.Sh SYNOPSIS +.In sys/types.h +.In sys/acl.h +.Ft int +.Fn acl_set_tag_type "acl_entry_t entry_d" "acl_tag_t tag_type" +.Sh DESCRIPTION The -.B acl_set_tag_type +.Fn acl_set_tag_type function sets the tag type of the ACL entry indicated by the argument -.I entry_d +.Va entry_d to the value of the argument -.IR tag_type . -.PP +.Va tag_type . +.Pp Any ACL entry descriptors that refer to the entry referred to by -.I entry_d +.Va entry_d continue to refer to that entry. -.SH RETURN VALUE -The value 0 is returned if successful; otherwise the value -1 is -returned and the global variable errno is set to indicate the error. -.SH ERRORS +.Sh RETURN VALUE +.Rv -std acl_set_tag_type +.Sh ERRORS If any of the following conditions occur, the -.B acl_set_tag_type -function returns -1 and sets -.B errno +.Fn acl_set_tag_type +function returns +.Li -1 +and sets +.Va errno to the corresponding value: -.TP -.SM -\%[EINVAL] +.Bl -tag -width Er +.It Bq Er EINVAL The argument -.I entry_d +.Va entry_d is not a valid descriptor for an ACL entry. -.TP -.SM -\%[EINVAL] +.Pp The argument -.I tag_type +.Va tag_type is not a valid tag type. -.SH STANDARDS +.El +.Sh STANDARDS IEEE Std 1003.1e draft 17 (\(lqPOSIX.1e\(rq, abandoned) -.SH AUTHOR +.Sh SEE ALSO +.Xr acl_create_entry 3 , +.Xr acl_free 3 , +.Xr acl_get_permset 3 , +.Xr acl_get_qualifier 3 , +.Xr acl_get_tag_type 3 , +.Xr acl_set_entry 3 , +.Xr acl_set_permset 3 , +.Xr acl_set_qualifier 3 , +.Xr acl 5 +.Sh AUTHOR Derived from the FreeBSD manual pages written by -.IR "Robert N M Watson" ; +.An "Robert N M Watson" Aq rwatson@FreeBSD.org , and adapted for Linux by -.I "Andreas Gruenbacher" -<a.gruenbacher@computer.org>. -.SH SEE ALSO -.BR acl_create_entry (3), -.BR acl_set_entry (3), -.BR acl_get_qualifier (3), -.BR acl_set_qualifier (3), -.BR acl_get_tag_type (3), -.BR acl_get_permset (3), -.BR acl_set_permset (3), -.BR acl_free (3), -.BR acl (5) +.An "Andreas Gruenbacher" Aq a.gruenbacher@computer.org . diff --git a/man/man3/acl_size.3 b/man/man3/acl_size.3 index 44d4516..a785e3b 100644 --- a/man/man3/acl_size.3 +++ b/man/man3/acl_size.3 @@ -14,62 +14,65 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.TH ACL_SIZE 3 "Linux ACL Library" "March 2002" "Access Control Lists" -.SH NAME -acl_size \- get the size of the external representation of an ACL -.SH LIBRARY +.Dd March 23, 2002 +.Dt ACL_SIZE 3 +.Os "Linux ACL" +.Sh NAME +.Nm acl_size +.Nd get the size of the external representation of an ACL +.Sh LIBRARY Linux Access Control Lists library (libacl, \-lacl). -.SH SYNOPSIS -.sp -.nf -.B #include <sys/types.h> -.B #include <sys/acl.h> -.sp -.B "ssize_t acl_size (acl_t \f2acl\f3);" -.Op -.SH DESCRIPTION +.Sh SYNOPSIS +.In sys/types.h +.In sys/acl.h +.Ft ssize_t +.Fn acl_size "acl_t acl" +.Sh DESCRIPTION The -.B acl_size +.Fn acl_size function return the size, in bytes, of the buffer required to hold the exportable, contiguous, persistent form of the ACL pointed to by the argument -.IR acl , +.Va acl , when converted by -.BR acl_copy_ext (3). -.PP +.Fn acl_copy_ext . +.Pp Any existing ACL entry descriptors that refer to entries in -.I acl +.Va acl continue to refer to the same entries. Any existing ACL pointers that refer to the ACL referred to by -.I acl +.Va acl continue to refer to the ACL. The order of ACL entries within -.I acl +.Va acl remains unchanged. -.SH RETURN VALUE +.Sh RETURN VALUE Upon successful completion, the -.B acl_size +.Fn acl_size function returns the size in bytes of the contiguous, persistent form of -the ACL. Otherwise, a value of (ssize_t)-1 is returned and -.B errno +the ACL. Otherwise, a value of +.Li (ssize_t)-1 +is returned and +.Va errno is set to indicate the error. -.SH ERRORS +.Sh ERRORS If any of the following conditions occur, the -.BR acl_size (3) -function returns a value of (ssize_t)-1 and sets -.B errno +.Fn acl_size +function returns a value of +.Li (ssize_t)-1 +and sets +.Va errno to the corresponding value: -.TP -.SM -\%[EINVAL] +.Bl -tag -width Er +.It Bq Er EINVAL The argument -.I acl +.Va acl is not a valid pointer to an ACL. -.SH STANDARDS +.El +.Sh STANDARDS IEEE Std 1003.1e draft 17 (\(lqPOSIX.1e\(rq, abandoned) -.SH AUTHOR +.Sh SEE ALSO +.Xr acl_copy_ext 3 , +.Xr acl 5 +.Sh AUTHOR Derived from the FreeBSD manual pages written by -.IR "Robert N M Watson" ; +.An "Robert N M Watson" Aq rwatson@FreeBSD.org , and adapted for Linux by -.I "Andreas Gruenbacher" -<a.gruenbacher@computer.org>. -.SH SEE ALSO -.BR acl_copy_ext (3), -.BR acl (5) +.An "Andreas Gruenbacher" Aq a.gruenbacher@computer.org . diff --git a/man/man3/acl_to_any_text.3 b/man/man3/acl_to_any_text.3 index 0d33bd0..ef59ba9 100644 --- a/man/man3/acl_to_any_text.3 +++ b/man/man3/acl_to_any_text.3 @@ -14,146 +14,150 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.TH ACL_TO_ANY_TEXT 3 "Linux ACL Library" "March 2002" "Access Control Lists" -.SH NAME -acl_to_any_text \- convert an ACL to text -.SH LIBRARY +.Dd March 25, 2002 +.Dt ACL_TO_ANY_TEXT 3 +.Os "Linux ACL" +.Sh NAME +.Nm acl_to_any_text +.Nd convert an ACL to text +.Sh LIBRARY Linux Access Control Lists library (libacl, \-lacl). -.SH SYNOPSIS -.sp -.nf -.B #include <sys/types.h> -.B #include <sys/acl.h> -.B #include <acl/libacl.h> -.sp -.B "char *acl_to_any_text (acl_t \f2acl\f3, const char *\f2prefix\f3, " -.B " char \f2separator\f3, int \f2options\f3);" -.Op -.SH DESCRIPTION +.Sh SYNOPSIS +.In sys/types.h +.In acl/libacl.h +.Ft char * +.Fo acl_to_any_text +.Fa "acl_t acl" +.Fa "const char *prefix" +.Fa "char separator" +.Fa "int options" +.Fc +.Sh DESCRIPTION The -.B acl_to_any_text +.Fn acl_to_any_text function translates the ACL pointed to by the argument -.I acl -into a NULL terminated character string. This character string +.Va acl +into a +.Li NULL +terminated character string. This character string is composed of the ACL entries contained in -.IR acl , +.Va acl , in the entry text format described on -.BR acl (5). +.Xr acl 5 . Entries are separated from each other by the -.I separator -character. -If the argument -.I prefix -is not NULL, +.Va separator +character. If the argument +.Va prefix +is not +.Li (const char *)NULL , each entry is prefixed by this character string. -.PP +.Pp If the argument -.I options -is 0, ACL entries are converted using the entry tag type keywords -.BR user , -.BR group , -.BR mask , +.Va options +is +.Li 0 , +ACL entries are converted using the entry tag type keywords +.Li user , group , mask , and -.BR other . +.Li other . User IDs and group IDs of ACL entries that contain such qualifiers are converted to their corresponding names; if an identifier has no corresponding name, a decimal number string is produced. The ACL text representation contains no additional comments. -.PP + A bitwise combinations of the following -.I options +.Va options can be used to modify the result: -.TP -.B TEXT_ABBREVIATE +.Bl -tag +.It TEXT_ABBREVIATE Instead of the full tag type keywords, single letter abbreviations are used. The abbreviation for -.B user +.Li user is -.BR u , +.Li u , the abbreviation for -.B group +.Li group is -.BR g , +.Li g , the abbreviation for -.B mask +.Li mask is -.BR m , +.Li m , and the abbreviation for -.B other +.Li other is -.BR o . -.TP -.B TEXT_NUMERIC_IDS +.Li o . +.It TEXT_NUMERIC_IDS User IDs and group IDs are included as decimal numbers instead of names. -.TP -.B TEXT_SOME_EFFECTIVE +.It TEXT_SOME_EFFECTIVE A comment containing the effective permissions of the ACL entry is included after ACL entries that contain permissions which are ineffective because they are masked by an ACL_MASK entry. The ACL entry and the comment are separated by a tab character. -.TP -.B TEXT_ALL_EFFECTIVE +.It TEXT_ALL_EFFECTIVE A comment containing the effective permissions of the ACL entry is included after all ACL entries that are affected by an ACL_MASK entry. The comment is included even if the permissions contained in the ACL entry equal the effective permissions. The ACL entry and the comment are separated by a tab character. -.TP -.B TEXT_SMART_INDENT +.It TEXT_SMART_INDENT This option is used in combination with the TEXT_SOME_EFFECTIVE or TEXT_ALL_EFFECTIVE option. The number of tab characters inserted between the ACL entry and the comment is increased so that the comment is -aligned to at least column 32, if printed starting from column 0. A tab -width of 8 characters is assumed. -.PP +aligned to the fourth tab stop position. +A tab width of 8 characters is assumed. +.El +.Pp The ACL referred to by -.I acl +.Va acl is not changed. -.PP +.Pp This function allocates any memory necessary to contain the string and returns a pointer to the string. The caller should free any releasable memory, when the new string is no longer required, by calling -.BR acl_free (3) -with the char* returned by -.B acl_to_any_text +.Fn acl_free +with the +.Va (void*)char +returned by +.Fn acl_to_any_text as an argument. -.SH RETURN VALUE +.Sh RETURN VALUE Upon successful completion, this function returns a pointer to the text -representation of the ACL. Otherwise, a value of NULL is returned, and -.B errno +representation of the ACL. Otherwise, a value of +.Li (char *)NULL +is returned, and +.Va errno is set to indicate the error. -.SH ERRORS +.Sh ERRORS If any of the following conditions occur, the -.B acl_to_any_text -function returns a value of NULL and sets -.B errno +.Fn acl_to_any_text +function returns a value of +.Li (char *)NULL +and sets +.Va errno to the corresponding value: -.TP -.SM -\%[EINVAL] +.Bl -tag -width Er +.It Bq Er EINVAL The argument -.I acl +.Va acl is not a valid pointer to an ACL. -.TP -.SM -\%[EINVAL] +.Pp The ACL referenced by -.I acl +.Va acl contains one or more improperly formed ACL entries, or for some other reason cannot be translated into the text form of an ACL. -.TP -.SM -\%[ENOMEM] +.It Bq Er ENOMEM The character string to be returned requires more memory than is allowed by the hardware or system-imposed memory management constraints. -.SH STANDARDS +.El +.Sh STANDARDS This is a non-portable, Linux specific extension to the ACL manipulation functions defined in IEEE Std 1003.1e draft 17 (\(lqPOSIX.1e\(rq, abandoned). -.SH AUTHOR +.Sh SEE ALSO +.Xr acl_from_text 3 , +.Xr acl_to_text 3 , +.Xr acl_free 3 , +.Xr acl 5 +.Sh AUTHOR Written by -.I "Andreas Gruenbacher" -<a.gruenbacher@computer.org>. -.SH SEE ALSO -.BR acl_to_text (3), -.BR acl_free (3), -.BR acl (5) +.An "Andreas Gruenbacher" Aq a.gruenbacher@computer.org . diff --git a/man/man3/acl_to_text.3 b/man/man3/acl_to_text.3 index 21af96d..2a2d261 100644 --- a/man/man3/acl_to_text.3 +++ b/man/man3/acl_to_text.3 @@ -14,85 +14,91 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.TH ACL_FROM_TEXT 3 "Linux ACL Library" "March 2002" "Access Control Lists" -.SH NAME -acl_to_text \- convert an ACL to text -.SH LIBRARY +.Dd March 23, 2002 +.Dt ACL_FROM_TEXT 3 +.Os "Linux ACL" +.Sh NAME +.Nm acl_to_text +.Nd convert an ACL to text +.Sh LIBRARY Linux Access Control Lists library (libacl, \-lacl). -.SH SYNOPSIS -.sp -.nf -.B #include <sys/types.h> -.B #include <sys/acl.h> -.sp -.B "char * acl_to_text (acl_t \f2acl\f3, ssize_t *\f2len_p\f3);" -.Op -.SH DESCRIPTION +.Sh SYNOPSIS +.In sys/types.h +.In sys/acl.h +.Ft char * +.Fn acl_to_text "acl_t acl" "ssize_t *len_p" +.Sh DESCRIPTION The -.B acl_to_text -function translates the ACL pointed to by the -.I acl -argument into a NULL terminated character string. If the pointer -.I len_p -is not NULL, +.Fn acl_to_text +function translates the ACL pointed to by the argument +.Va acl +into a +.Li NULL +terminated character string. If the pointer +.Va len_p +is not +.Li NULL , then the function returns the length of the string (not -including the NULL terminator) in the location pointed to by -.IR len_p . +including the +.Li NULL +terminator) in the location pointed to by +.Va len_p . The format of the text string returned by -.B acl_to_text +.Fn acl_to_text is the long text form defined in -.BR acl (5). +.Xr acl 5 . The ACL referred to by -.I acl +.Va acl is not changed. -.PP +.Pp This function allocates any memory necessary to contain the string and returns a pointer to the string. The caller should free any releasable memory, when the new string is no longer required, by calling -.BR acl_free (3) -with the (void*)char returned by -.B acl_to_text +.Xr acl_free 3 +with the +.Va (void*)char +returned by +.Fn acl_to_text as an argument. -.SH RETURN VALUE +.Sh RETURN VALUE Upon successful completion, this function returns a pointer to the long text form of the ACL. -Otherwise, a value of NULL is returned, and -.B errno +Otherwise, a value of +.Li (char *)NULL +is returned, and +.Va errno is set to indicate the error. -.SH ERRORS +.Sh ERRORS If any of the following conditions occur, the -.B acl_to_text -function returns a value of NULL and sets -.B errno +.Fn acl_to_text +function returns a value of +.Li (char *)NULL +and sets +.Va errno to the corresponding value: -.TP -.SM -\%[EINVAL] +.Bl -tag -width Er +.It Bq Er EINVAL The argument -.I acl +.Va acl is not a valid pointer to an ACL. -.TP -.SM -\%[EINVAL] +.Pp The ACL referenced by -.I acl +.Va acl contains one or more improperly formed ACL entries, or for some other reason cannot be translated into a text form of an ACL. -.TP -.SM -\%[ENOMEM] +.It Bq Er ENOMEM The character string to be returned requires more memory than is allowed by the hardware or system-imposed memory management constraints. -.SH STANDARDS +.El +.Sh STANDARDS IEEE Std 1003.1e draft 17 (\(lqPOSIX.1e\(rq, abandoned) -.SH AUTHOR +.Sh SEE ALSO +.Xr acl_free 3 , +.Xw acl_from_text 3 , +.Xr acl_to_any_text 3 , +.Xr acl 5 +.Sh AUTHOR Derived from the FreeBSD manual pages written by -.IR "Robert N M Watson" ; +.An "Robert N M Watson" Aq rwatson@FreeBSD.org , and adapted for Linux by -.I "Andreas Gruenbacher" -<a.gruenbacher@computer.org>. -.SH SEE ALSO -.BR acl_from_text (3), -.BR acl_free (3), -.BR acl_to_any_text (3), -.BR acl (5) +.An "Andreas Gruenbacher" Aq a.gruenbacher@computer.org . diff --git a/man/man3/acl_valid.3 b/man/man3/acl_valid.3 index 205eba5..b2580b8 100644 --- a/man/man3/acl_valid.3 +++ b/man/man3/acl_valid.3 @@ -14,70 +14,66 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.TH ACL_VALID 3 "Linux ACL Library" "March 2002" "Access Control Lists" -.SH NAME -acl_valid \- validate an ACL -.SH LIBRARY +.Dd March 23, 2002 +.Dt ACL_VALID 3 +.Os "Linux ACL" +.Sh NAME +.Nm acl_valid +.Nd validate an ACL +.Sh LIBRARY Linux Access Control Lists library (libacl, \-lacl). -.SH C SYNOPSIS -.sp -.nf -.B #include <sys/types.h> -.B #include <sys/acl.h> -.sp -.B "int acl_valid (acl_t \f2acl\f3);" -.Op -.SH DESCRIPTION +.Sh SYNOPSIS +.In sys/types.h +.In sys/acl.h +.Ft int +.Fn acl_valid "acl_t acl" +.Sh DESCRIPTION The -.B acl_valid +.Fn acl_valid function checks the ACL referred to by the argument -.I acl +.Va acl for validity. -.PP +.Pp The three required entries ACL_USER_OBJ, ACL_GROUP_OBJ, and ACL_OTHER must exist exactly once in the ACL. If the ACL contains any ACL_USER or ACL_GROUP entries, then an ACL_MASK entry is also required. The ACL may contain at most one ACL_MASK entry. -.PP +.Pp The user identifiers must be unique among all entries of type ACL_USER. The group identifiers must be unique among all entries of type ACL_GROUP. -.SH RETURN VALUE -The value 0 is returned if successful; otherwise the value -1 is -returned and the global variable errno is set to indicate the error. -.SH ERRORS +.Sh RETURN VALUE +.Rv -std acl_valid +.Sh ERRORS If any of the following conditions occur, the -.B acl_valid -function returns -1 and sets -.B errno +.Fn acl_valid +function returns +.Li -1 +and sets +.Va errno to the corresponding value: -.TP -.SM -\%[EINVAL] +.Bl -tag -width Er +.It Bq Er EINVAL The argument -.I acl +.Va acl is not a valid pointer to an ACL. -.TP -.SM -\%[EINVAL] +.Pp The argument -.I acl +.Va acl does not point to a valid ACL. -.TP -.SM -\%[EINVAL] +.Pp One or more of the required ACL entries is not present in -.IR acl . -.TP -.SM -\%[EINVAL] +.Va acl . +.Pp The ACL contains entries that are not unique. -.SH STANDARDS +.El +.Sh STANDARDS IEEE Std 1003.1e draft 17 (\(lqPOSIX.1e\(rq, abandoned) -.SH AUTHOR +.Sh SEE ALSO +.Xr acl_check 3 , +.Xr acl_set_file 3 , +.Xr acl 5 +.Sh AUTHOR Derived from the FreeBSD manual pages written by -.IR "Robert N M Watson" ; +.An "Robert N M Watson" Aq rwatson@FreeBSD.org , and adapted for Linux by -.I "Andreas Gruenbacher" -<a.gruenbacher@computer.org>. -.SH SEE ALSO -.BR acl (5) +.An "Andreas Gruenbacher" Aq a.gruenbacher@computer.org . |