[BACK]Return to acl_get_file.html CVS log [TXT][DIR] Up to [Development] / xfs-website.orig / manpages

File: [Development] / xfs-website.orig / manpages / acl_get_file.html (download) (as text)

Revision 1.1, Thu Jan 25 19:55:30 2001 UTC (16 years, 8 months ago) by xfs
Branch: MAIN
CVS Tags: HEAD

Man pages update.

<html>
<head>
<meta name="Content-Style" content="text/css">
</head>
<body>
<a href="#NAME">NAME</a><br>
<a href="#SYNOPSIS">SYNOPSIS</a><br>
<a href="##include &lt;sys/acl.h&gt;">#include &lt;sys/acl.h&gt;</a><br>
<a href="#struct acl * acl_get_file(const char *path, acl_type_t type);">struct acl * acl_get_file(const char *path, acl_type_t type);</a><br>
<a href="#int acl_set_file(const char *path, acl_type_t type, struct acl *aclp);">int acl_set_file(const char *path, acl_type_t type, struct acl *aclp);</a><br>
<a href="#DESCRIPTION">DESCRIPTION</a><br>
<a href="#RETURN VALUES">RETURN VALUES</a><br>
<a href="#ERRORS">ERRORS</a><br>
<!-- Creator     : groff version 1.16.1  -->
<!-- CreationDate: Wed Jan 24 01:42:48 2001
 -->
<!-- Total number of pages: 1 -->
<!-- Page: 1 -->
<!-- left  margin: 220 -->
<!-- right margin: 750 -->
<a name="NAME"></a><h2>NAME</h2><p style="margin-left: 18%"><font size=3>acl_get_file, acl_set_file - get or set the ACL for a pathname</font></p>
<a name="SYNOPSIS"></a><h2>SYNOPSIS</h2><a name="#include &lt;sys/acl.h&gt;"></a><h2>#include &lt;sys/acl.h&gt;</h2><a name="struct acl * acl_get_file(const char *path, acl_type_t type);"></a><h2>struct acl * acl_get_file(const char *path, acl_type_t type);</h2><a name="int acl_set_file(const char *path, acl_type_t type, struct acl *aclp);"></a><h2>int acl_set_file(const char *path, acl_type_t type, struct acl *aclp);</h2><a name="DESCRIPTION"></a><h2>DESCRIPTION</h2><p style="margin-left: 18%"><font size=3><I>acl_get_file</I></font> <font size=3>returns a pointer to an allocated</font> <font size=3><I>struct acl</I></font> <font size=3>associated with the pathname pointed to by</font> <font size=3><I>path</I></font><font size=3>.</font> <font size=3><I>type</I></font> <font size=3>determines whether the default ACL (</font><font size=3><I>type == ACL_TYPE_DEFAULT</I></font><font size=3>) or access ACL (</font><font size=3><I>type == ACL_TYPE_ACCESS</I></font><font size=3>) 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</font> <font size=3><B>_POSIX_MAC</B></font> <font size=3>is in effect, then the process must have MAC read access to the object.</font></p>
<p style="margin-left: 18%"><font size=3><I>acl_set_file</I></font> <font size=3>sets the ACL of the specified pathname.</font> <font size=3><I>type</I></font> <font size=3>indicates which ACL, default or access, is to be set. Only directories can have a default ACL. If</font> <font size=3><I>type</I></font> <font size=3>is not valid, the call fails. The ACL is first checked for validity by</font> <font size=3><I>acl_valid</I></font><font size=3>(3). 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</font> <font size=3><I>path</I></font><font size=3>. If</font> <font size=3><B>_POSIX_CAP</B></font> <font size=3>is in effect, then the appropriate capability must include CAP_FOWNER. In addition, if</font> <font size=3><B>_POSIX_MAC</B></font> <font size=3>is in effect, then the process must have MAC write access to the object.</font></p>
<a name="RETURN VALUES"></a><h2>RETURN VALUES</h2><p style="margin-left: 18%"><font size=3><I>acl_get_file</I></font> <font size=3>a pointer to an allocated</font> <font size=3><I>struct acl</I></font> <font size=3>if successful, NULL otherwise. The storage should be freed with a call to</font> <font size=3><I>acl_free</I></font> <font size=3>with the returned pointer as an argument when it is no longer needed.</font></p>
<p style="margin-left: 18%"><font size=3><I>acl_set_file</I></font> <font size=3>returns 0 if successful, &shy;1 otherwise.</font></p>
<a name="ERRORS"></a><h2>ERRORS</h2>
<table width="98%" rules="none" frame="none" cols="4" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td valign="top" align="left" width="18%">
</td>
<td valign="top" align="left" width="11%">
<p><font size=3><I>acl_get_file:</I></font></p>
</td>
<td valign="top" align="left" width="3%">
</td>
<td valign="top" align="left" width="66%">
</td>
</tr>
<tr valign="top" align="left">
<td valign="top" align="left" width="18%">
</td>
<td valign="top" align="left" width="11%">
<p><font size=3>EACCESS</font></p>
</td>
<td valign="top" align="left" width="3%">
</td>
<td valign="top" align="left" width="66%">
<p><font size=3>Search permission is denied for a component of the path prefix or the object exists and the process does not have appropriate access rights.</font></p>
</td>
</tr>
<tr valign="top" align="left">
<td valign="top" align="left" width="18%">
</td>
<td valign="top" align="left" width="11%">
<p><font size=3>EINVAL</font></p>
</td>
<td valign="top" align="left" width="3%">
</td>
<td valign="top" align="left" width="66%">
<p><font size=3><I>type</I></font> <font size=3>is not valid</font></p>
</td>
</tr>
</table>
<p style="margin-left: 18%"><font size=3>ENAMETOLONG</font>
<table width="98%" rules="none" frame="none" cols="4" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td valign="top" align="left" width="18%">
</p>
</td>
<td valign="top" align="left" width="11%">
</td>
<td valign="top" align="left" width="3%">
</td>
<td valign="top" align="left" width="66%">
<p><font size=3>The pathname or one of its components is too long.</font></p>
</td>
</tr>
<tr valign="top" align="left">
<td valign="top" align="left" width="18%">
</td>
<td valign="top" align="left" width="11%">
<p><font size=3>ENOENT</font></p>
<p><font size=3>ENOMEM</font></p>
<p><font size=3>ENOSYS</font></p>
<p><font size=3>ENOTDIR</font></p>
<p><font size=3><I>acl_set_file:</I></font></p>
</td>
<td valign="top" align="left" width="3%">
</td>
<td valign="top" align="left" width="66%">
<p><font size=3>The named object does not exist or</font> <font size=3><I>path</I></font> <font size=3>points to an empty string.</font></p>
<p><font size=3>allocation of the</font> <font size=3><I>struct acl</I></font> <font size=3>failed.</font></p>
<p><font size=3>ACL support is not available (not installed).</font></p>
<p><font size=3>A component of the path prefix is not a directory.</font></p>
</td>
</tr>
<tr valign="top" align="left">
<td valign="top" align="left" width="18%">
</td>
<td valign="top" align="left" width="11%">
<p><font size=3>EACCESS</font></p>
</td>
<td valign="top" align="left" width="3%">
</td>
<td valign="top" align="left" width="66%">
<p><font size=3>Search permission is denied for a component of the path prefix or the object exists and the process does not have appropriate access rights.</font></p>
</td>
</tr>
<tr valign="top" align="left">
<td valign="top" align="left" width="18%">
</td>
<td valign="top" align="left" width="11%">
<p><font size=3>EINVAL</font></p>
</td>
<td valign="top" align="left" width="3%">
</td>
<td valign="top" align="left" width="66%">
<p><font size=3><I>aclp</I></font> <font size=3>points to an invalid ACL.</font> <font size=3><I>type</I></font> <font size=3>is not either ACL_TYPE_ACCESS, or ACL_TYPE_DEFAULT. The ACL is too large (too many entries).</font></p>
</td>
</tr>
</table>
</p>
<p style="margin-left: 18%"><font size=3>ENAMETOLONG</font>
<table width="98%" rules="none" frame="none" cols="4" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td valign="top" align="left" width="18%">
</p>
</td>
<td valign="top" align="left" width="9%">
</td>
<td valign="top" align="left" width="5%">
</td>
<td valign="top" align="left" width="66%">
<p><font size=3>The pathname or one of its components is too long.</font></p>
</td>
</tr>
<tr valign="top" align="left">
<td valign="top" align="left" width="18%">
</td>
<td valign="top" align="left" width="9%">
<p><font size=3>ENOENT</font></p>
<p><font size=3>ENOSPC</font></p>
</td>
<td valign="top" align="left" width="5%">
</td>
<td valign="top" align="left" width="66%">
<p><font size=3>The named object does not exist or</font> <font size=3><I>path</I></font> <font size=3>points to an empty string.</font></p>
<p><font size=3>The file system is full or some other resource needed for the ACL storage is not available.</font></p>
</td>
</tr>
<tr valign="top" align="left">
<td valign="top" align="left" width="18%">
</td>
<td valign="top" align="left" width="9%">
<p><font size=3>ENOSYS</font></p>
<p><font size=3>ENOTDIR EPERM</font></p>
</td>
<td valign="top" align="left" width="5%">
</td>
<td valign="top" align="left" width="66%">
<p><font size=3>ACL support is not available (not installed).</font></p>
<p><font size=3>A component of the path prefix is not a directory.</font></p>
<p><font size=3>The process does not have appropriate privilege to perform the operation to set the ACL.</font></p>
</td>
</tr>
<tr valign="top" align="left">
<td valign="top" align="left" width="18%">
</td>
<td valign="top" align="left" width="9%">
<p><font size=3>EROFS</font></p>
</td>
<td valign="top" align="left" width="5%">
</td>
<td valign="top" align="left" width="66%">
<p><font size=3>This function requires modification of a file system which is currently read&shy;only.</font></p>
</td>
</tr>
</table>
<br>
</p>
</body>
</html>