9330 stack overflow when creating a deeply nested dataset
[unleashed.git] / usr / src / man / man3bsm / getauclassent.3bsm
blobdb4101ebd895f8929ad6256a5e314719ec419ee3
1 '\" te
2 .\" Copyright (c) 2005, Sun Microsystems, Inc.  All Rights Reserved.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH GETAUCLASSENT 3BSM "Mar 6, 2017"
7 .SH NAME
8 getauclassent, getauclassnam, setauclass, endauclass, getauclassnam_r,
9 getauclassent_r \- get audit_class entry
10 .SH SYNOPSIS
11 .LP
12 .nf
13 \fBcc\fR [ \fIflag\fR... ] \fIfile\fR... \fB-lbsm\fR \fB -lsocket \fR \fB -lnsl \fR  [ \fIlibrary\fR... ]
14 #include <sys/param.h>
15 #include <bsm/libbsm.h>
17 \fBstruct au_class_ent *\fR\fBgetauclassnam\fR(\fB const char *\fR\fIname\fR);
18 .fi
20 .LP
21 .nf
22 \fBstruct au_class_ent *\fR\fBgetauclassnam_r\fR(\fB au_class_ent_t *\fR\fIclass_int\fR,
23      \fBconst char *\fR\fIname\fR);
24 .fi
26 .LP
27 .nf
28 \fBstruct au_class_ent *\fR\fBgetauclassent\fR(\fBvoid\fR);
29 .fi
31 .LP
32 .nf
33 \fBstruct au_class_ent *\fR\fBgetauclassent_r\fR(\fB au_class_ent_t *\fR\fIclass_int\fR);
34 .fi
36 .LP
37 .nf
38 \fBvoid\fR \fBsetauclass\fR(\fBvoid\fR);
39 .fi
41 .LP
42 .nf
43 \fBvoid\fR \fBendauclass\fR(\fBvoid\fR);
44 .fi
46 .SH DESCRIPTION
47 .LP
48 The \fBgetauclassent()\fR function and \fBgetauclassnam()\fR each return an
49 \fBaudit_class\fR entry.
50 .sp
51 .LP
52 The \fBgetauclassnam()\fR function searches for an \fBaudit_class\fR entry with
53 a given class name \fIname.\fR
54 .sp
55 .LP
56 The \fBgetauclassent()\fR function enumerates audit_class entries. Successive
57 calls to \fBgetauclassent()\fR return either successive audit_class entries or
58 \fINULL\fR.
59 .sp
60 .LP
61 The \fBsetauclass()\fR function ``rewinds'' to the beginning of the enumeration
62 of audit_class  entries.  Calls to \fBgetauclassnam()\fR may leave the
63 enumeration in an indeterminate state, so \fBsetauclass()\fR should be called
64 before the first \fBgetauclassent()\fR.
65 .sp
66 .LP
67 The \fBendauclass()\fR may be called to indicate that audit_class processing is
68 complete; the system may then close any open audit_class file, deallocate
69 storage, and so forth.
70 .sp
71 .LP
72 The \fBgetauclassent_r()\fR and \fBgetauclassnam_r()\fR functions both return a
73 pointer to an audit_class entry as do their similarly named counterparts.  They
74 each take an additional argument, a pointer to pre-allocated space for an
75 \fBau_class_ent_t\fR, which is returned if the call is successful. To assure
76 there is enough space for the information returned, the applications programmer
77 should be sure to allocate \fBAU_CLASS_NAME_MAX\fR and \fBAU_CLASS_DESC_MAX\fR
78 bytes for the \fBac_name\fR and \fBac_desc\fR members of the
79 \fBau_class_ent_t\fR data structure.
80 .sp
81 .LP
82 The internal representation of an \fBaudit_class\fR entry is an
83 \fBau_class_ent\fR structure defined in  <\fBbsm/libbsm.h\fR> with the
84 following members:
85 .sp
86 .in +2
87 .nf
88 char        *ac_name;
89 au_class_t      ac_class;
90 char       *ac_desc;
91 .fi
92 .in -2
94 .SH RETURN VALUES
95 .LP
96 The \fBgetauclassnam()\fR and \fBgetauclassnam_r()\fR functions return a
97 pointer to a \fBau_class_ent\fR structure if they successfully locate the
98 requested entry. Otherwise they return \fINULL\fR.
99 .sp
101 The \fBgetauclassent()\fR and \fBgetauclassent_r()\fR functions return a
102 pointer to a \fBau_class_ent\fR structure if they successfully enumerate an
103 entry. Otherwise they return \fINULL\fR, indicating the end of the enumeration.
104 .SH FILES
105 .ne 2
107 \fB\fB/etc/security/audit_class\fR\fR
109 .RS 29n
110 file that aps audit class numbers to audit class names
113 .SH ATTRIBUTES
115 See \fBattributes\fR(5) for descriptions of the following attributes:
120 box;
121 c | c
122 l | l .
123 ATTRIBUTE TYPE  ATTRIBUTE VALUE
125 MT-Level        MT-Safe with exceptions.
130 All of the functions described on this man-page are MT-Safe except
131 \fBgetauclassent()\fR and \fBgetauclassnam\fR, which are Unsafe. The
132 \fBgetauclassent_r()\fR and \fBgetauclassnam_r()\fR functions have the same
133 functionality as the Unsafe functions, but have a slightly different function
134 call interface to make them MT-Safe.
135 .SH SEE ALSO
137 \fBaudit_class\fR(4), \fBaudit_event\fR(4),
138 \fBattributes\fR(5)
139 .SH NOTES
141 All information is contained in a static area, so it must be copied if it is to
142 be saved.