Sun Microsystems, Inc.
spacerspacer
spacer   www.sun.com docs.sun.com | | |  
spacer
black dot
   
A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Y   Z
    
 
Security and Auditing Library Functionsgetauclassent(3BSM)


NAME

 getauclassent, getauclassnam, setauclass, endauclass, getauclassnam_r, getauclassent_r - get audit_class entry

SYNOPSIS

 
cc [ flag ... ] file ... -lbsm -lsocket -lnsl -lintl [ library ... ]
#include <sys/param.h>
#include <bsm/libbsm.h>
struct au_class_ent *getauclassnam( const char *name);
 struct au_class_ent *getauclassnam_r( au_class_ent_t *class_int, const char *name);
 struct au_class_ent *getauclassent( void);
 struct au_class_ent *getauclassent_r( au_class_ent_t *class_int);
 void setauclass( void);
 void endauclass( void);

DESCRIPTION

 

getauclassent() and getauclassnam() each return an audit_class entry.

getauclassnam() searches for an audit_class entry with a given class name name.

getauclassent() enumerates audit_class entries: successive calls to getauclassent() will return either successive audit_class entries or NULL.

setauclass() ``rewinds'' to the beginning of the enumeration of audit_class entries. Calls to getauclassnam() may leave the enumeration in an indeterminate state, so setauclass() should be called before the first getauclassent().

endauclass() may be called to indicate that audit_class processing is complete; the system may then close any open audit_class file, deallocate storage, and so forth.

getauclassent_r() and getauclassnam_r() both return a pointer to an audit_class entry as do their similarly named counterparts. They each take an additional argument, a pointer to pre-allocated space for an au_class_ent_t, which is returned if the call is successful. To assure there is enough space for the information returned, the applications programmer should be sure to allocate AU_CLASS_NAME_MAX and AU_CLASS_DESC_MAX bytes for the ac_name and ac_desc elements of the au_class_ent_t data structure.

The internal representation of an audit_user entry is an au_class_ent structure defined in <bsm/libbsm.h> with the following members:
 
char        *ac_name;
au_class_t	ac_class;
char       *ac_desc;

RETURN VALUES

 

getauclassnam() and getauclassnam_r() return a pointer to a struct au_class_ent if they successfully locate the requested entry; otherwise they return NULL.

getauclassent() and getauclassent_r() return a pointer to a struct au_class_ent if they successfully enumerate an entry; otherwise they return NULL, indicating the end of the enumeration.

FILES

 
/etc/security/audit_class
Maps audit class numbers to audit class names

ATTRIBUTES

 

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPEATTRIBUTE VALUE
MT-LevelMT-Safe with exceptions.

All of the functions described in this man-page are MT-Safe except getauclassent() and getauclassnam. The two functions, getauclassent_r() and getauclassnam_r() have the same functionality as the unsafe functions, but have a slightly different function call interface in order to make them MT-Safe.

SEE ALSO

 

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

NOTES

 

All information is contained in a static area, so it must be copied if it is to be saved.

The functionality described in this man page is available only if the Basic Security Module (BSM) has been enabled. See bsmconv(1M) for more information.


SunOS 5.9Go To TopLast Changed 29 Dec 1996

 
      
      
Copyright 2002 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.