1getauclassent(3BSM) Security and Auditing Library Functionsgetauclassent(3BSM)
2
3
4

NAME

6       getauclassent,  getauclassnam, setauclass, endauclass, getauclassnam_r,
7       getauclassent_r - get audit_class entry
8

SYNOPSIS

10       cc [ flag... ] file... -lbsm  -lsocket   -lnsl   [ library... ]
11       #include <sys/param.h>
12       #include <bsm/libbsm.h>
13
14       struct au_class_ent *getauclassnam( const char *name);
15
16
17       struct au_class_ent *getauclassnam_r( au_class_ent_t *class_int,
18            const char *name);
19
20
21       struct au_class_ent *getauclassent(void);
22
23
24       struct au_class_ent *getauclassent_r( au_class_ent_t *class_int);
25
26
27       void setauclass(void);
28
29
30       void endauclass(void);
31
32

DESCRIPTION

34       The  getauclassent()  function  and  getauclassnam()  each  return   an
35       audit_class entry.
36
37
38       The  getauclassnam()  function searches for an audit_class entry with a
39       given class name name.
40
41
42       The getauclassent() function enumerates audit_class entries. Successive
43       calls  to  getauclassent() return either successive audit_class entries
44       or NULL.
45
46
47       The setauclass() function ``rewinds'' to the beginning of the  enumera‐
48       tion  of  audit_class  entries.  Calls to getauclassnam() may leave the
49       enumeration in an indeterminate state, so setauclass() should be called
50       before the first getauclassent().
51
52
53       The  endauclass() may be called to indicate that audit_class processing
54       is complete; the system may then close any open audit_class file, deal‐
55       locate storage, and so forth.
56
57
58       The  getauclassent_r()  and  getauclassnam_r()  functions both return a
59       pointer to an audit_class entry as do their  similarly  named  counter‐
60       parts.   They  each take an additional argument, a pointer to pre-allo‐
61       cated space for an au_class_ent_t, which is returned  if  the  call  is
62       successful.  To  assure  there  is  enough  space  for  the information
63       returned, the  applications  programmer  should  be  sure  to  allocate
64       AU_CLASS_NAME_MAX  and  AU_CLASS_DESC_MAX  bytes  for  the  ac_name and
65       ac_desc members of the au_class_ent_t data structure.
66
67
68       The internal representation of an audit_user entry is  an  au_class_ent
69       structure defined in  <bsm/libbsm.h> with the following members:
70
71         char        *ac_name;
72         au_class_t     ac_class;
73         char       *ac_desc;
74
75

RETURN VALUES

77       The getauclassnam() and getauclassnam_r() functions return a pointer to
78       a au_class_ent structure if  they  successfully  locate  the  requested
79       entry. Otherwise they return NULL.
80
81
82       The getauclassent() and getauclassent_r() functions return a pointer to
83       a au_class_ent structure if they successfully enumerate an entry.  Oth‐
84       erwise they return NULL, indicating the end of the enumeration.
85

FILES

87       /etc/security/audit_class    file that aps audit class numbers to audit
88                                    class names
89
90

ATTRIBUTES

92       See attributes(5) for descriptions of the following attributes:
93
94
95
96
97       ┌─────────────────────────────┬─────────────────────────────┐
98       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
99       ├─────────────────────────────┼─────────────────────────────┤
100       │MT-Level                     │MT-Safe with exceptions.     │
101       └─────────────────────────────┴─────────────────────────────┘
102
103
104       All of the functions described on  this  man-page  are  MT-Safe  except
105       getauclassent()   and  getauclassnam,  which  are  Unsafe.  The  getau‐
106       classent_r() and getauclassnam_r() functions have the same  functional‐
107       ity  as  the  Unsafe  functions, but have a slightly different function
108       call interface to make them MT-Safe.
109

SEE ALSO

111       bsmconv(1M), audit_class(4), audit_event(4), attributes(5)
112

NOTES

114       All information is contained in a static area, so it must be copied  if
115       it is to be saved.
116
117
118       The  functionality  described  on this manual page is available only if
119       the Solaris Auditing has been enabled.  See bsmconv(1M) for more infor‐
120       mation.
121
122
123
124SunOS 5.11                        31 Mar 2005              getauclassent(3BSM)
Impressum