OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / acl / original / man3 / acl_calc_mask.3
1 .\" Access Control Lists manual pages
2 .\"
3 .\" (C) 2002 Andreas Gruenbacher, <a.gruenbacher@bestbits.at>
4 .\"
5 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
6 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
7 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
8 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
9 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
10 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
11 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
12 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
13 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
14 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
15 .\" SUCH DAMAGE.
16 .\"
17 .Dd March 23, 2002
18 .Dt ACL_CALC_MASK 3
19 .Os "Linux ACL"
20 .Sh NAME
21 .Nm acl_calc_mask
22 .Nd calculate the file group class mask
23 .Sh LIBRARY
24 Linux Access Control Lists library (libacl, \-lacl).
25 .Sh SYNOPSIS
26 .In sys/types.h
27 .In sys/acl.h
28 .Ft int
29 .Fn acl_calc_mask "acl_t *acl_p"
30 .Sh DESCRIPTION
31 The
32 .Fn acl_calc_mask
33 function calculates and sets the permissions associated with the ACL_MASK
34 ACL entry of the ACL referred to by
35 .Va acl_p .
36 The value of the new permissions is the union of the permissions
37 granted by all entries of tag type ACL_GROUP, ACL_GROUP_OBJ, or ACL_USER.
38 If the ACL referred to by
39 .Va acl_p
40 already contains an ACL_MASK entry, its permissions are overwritten;
41 if it does not contain an ACL_MASK entry, one is added.
42 .Pp
43 If the ACL referred to by
44 .Va acl_p
45 does not contain enough space for the new ACL entry, then additional working
46 storage may be allocated. If the working storage cannot be increased in the
47 current location, then it may be relocated and the previous working storage
48 is released and a pointer to the new working storage is returned via
49 .Va acl_p .
50 .Pp
51 The order of existing entries in the ACL is undefined after this function.
52 .Pp
53 Any existing ACL entry descriptors that refer to entries in the ACL continue to
54 refer to those entries. Any existing ACL pointers that refer to the ACL
55 referred to by
56 .Va acl_p
57 continue to refer to the ACL.
58 .\" <AG>
59 .\" Conflict between requirements:
60 .\" (a) ACL may be relocated,
61 .\" (b) all pointers remain valid.
62 .\" </AG>
63 .Sh RETURN VALUE
64 .Rv -std acl_calc_mask
65 .Sh ERRORS
66 If any of the following conditions occur, the
67 .Fn acl_calc_mask
68 function returns
69 .Li -1
70 and sets
71 .Va errno
72 to the corresponding value:
73 .Bl -tag -width Er
74 .It Bq Er EINVAL
75 The argument
76 .Va acl
77 is not a valid pointer to an ACL.
78 .It Bq Er ENOMEM
79 The
80 .Fn acl_calc_mask
81 function is unable to allocate the memory required for an ACL_MASK ACL entry.
82 .El
83 .Sh STANDARDS
84 IEEE Std 1003.1e draft 17 (\(lqPOSIX.1e\(rq, abandoned)
85 .Sh SEE ALSO
86 .Xr acl_check 3 ,
87 .Xr acl_get_entry 3 ,
88 .Xr acl_valid 3 ,
89 .Xr acl 5
90 .Sh AUTHOR
91 Derived from the FreeBSD manual pages written by
92 .An "Robert N M Watson" Aq rwatson@FreeBSD.org ,
93 and adapted for Linux by
94 .An "Andreas Gruenbacher" Aq a.gruenbacher@bestbits.at .