*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> acl_get_file (3c)              
Title
Content
Arch
Section
 

Contents


ACL_GET_FILE(3C)					      ACL_GET_FILE(3C)


NAME    [Toc]    [Back]

     acl_get_file, acl_set_file	 - get or set the ACL for a pathname

SYNOPSIS    [Toc]    [Back]

     #include <sys/acl.h>

     struct acl	* acl_get_file(const char *path, acl_type_t type);
     int acl_set_file(const char *path,	acl_type_t type, struct	acl *aclp);

DESCRIPTION    [Toc]    [Back]

     acl_get_file returns a pointer to an allocated struct acl associated with
     the pathname pointed to by	path.  type determines whether the default ACL
     (type == ACL_TYPE_DEFAULT)	or access ACL (type == ACL_TYPE_ACCESS)	is
     returned.	The default ACL	is available only for directories.  If there
     is	no default ACL associated with the specified directory,	an ACL
     containing	zero entries is	returned.  If _POSIX_MAC is in effect, then
     the process must have MAC read access to the object.

     acl_set_file sets the ACL of the specified	pathname.  type	indicates
     which ACL,	default	or access, is to be set.  Only directories can have a
     default ACL.  If type is not valid, the call fails.  The ACL is first
     checked for validity by acl_valid(3c).  The effective UID of the process
     must match	the owner of the object	or the process must have appropriate
     privilege to set the access ACL or	the default ACL	on path.  If
     _POSIX_CAP	is in effect, then the appropriate capability must include
     CAP_FOWNER.  In addition, if _POSIX_MAC is	in effect, then	the process
     must have MAC write access	to the object.

RETURN VALUES    [Toc]    [Back]

     acl_get_file a pointer to an allocated struct acl if successful, NULL
     otherwise.	 The storage should be freed with a call to acl_free with the
     returned pointer as an argument when it is	no longer needed.

     acl_set_file returns 0 if successful, -1 otherwise.

ERRORS    [Toc]    [Back]

     acl_get_file:

     EACCESS	     Search permission is denied for a component of the	path
		     prefix or the object exists and the process does not have
		     appropriate access	rights.

     EINVAL	     type is not valid

     ENAMETOLONG     The pathname or one of its	components is too long.

     ENOENT	     The named object does not exist or	path points to an
		     empty string.

     ENOMEM	     allocation	of the struct acl failed.





									Page 1






ACL_GET_FILE(3C)					      ACL_GET_FILE(3C)



     ENOSYS	     ACL support is not	available (not installed).

     ENOTDIR	     A component of the	path prefix is not a directory.

     acl_set_file:

     EACCESS	     Search permission is denied for a component of the	path
		     prefix or the object exists and the process does not have
		     appropriate access	rights.

     EINVAL	     aclp points to an invalid ACL.  type is not either
		     ACL_TYPE_ACCESS, or ACL_TYPE_DEFAULT.  The	ACL is too
		     large (too	many entries).

     ENAMETOLONG     The pathname or one of its	components is too long.

     ENOENT	     The named object does not exist or	path points to an
		     empty string.

     ENOSPC	     The file system is	full or	some other resource needed for
		     the ACL storage is	not available.

     ENOSYS	     ACL support is not	available (not installed).

     ENOTDIR	     A component of the	path prefix is not a directory.

     EPERM	     The process does not have appropriate privilege to
		     perform the operation to set the ACL.

     EROFS	     This function requires modification of a file system
		     which is currently	read-only.

SEE ALSO    [Toc]    [Back]

      
      
     acl(4)


									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
namei OpenBSD pathname lookup
relookup NetBSD pathname lookup
NDINIT OpenBSD pathname lookup
lookup OpenBSD pathname lookup
realpath Tru64 Resolve pathname
relookup OpenBSD pathname lookup
lookup NetBSD pathname lookup
namei NetBSD pathname lookup
cap_get_file IRIX get or set the capabilities for a pathname
mac_get_file IRIX get or set the MAC label for a pathname
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service