Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ getacent(3) — Motorola System V 88k Release 4 Version 4.2

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

auclassmgmt(1M)

auclass(4)

getacent(3)  —  LIBRARY FUNCTIONS

NAME

getacent, getaccid, getacnam, setacent, endacent, fgetacent − gets audit class entry

SYNOPSIS

#include <auclass.h>
#include <stdio.h>
 struct auclass ∗getacent ()
 struct auclass ∗getaccid (cid)
int cid;
 struct auclass ∗getacnam (name)
char ∗name;
 int setacent ()
 void endacent ()
 struct auclass ∗fgetacent (f)
FILE ∗f;
 

DESCRIPTION

getacent, getaccid, and getacnam each return a pointer to an object with the auclass  structure containing the fields of a line in the /var/security/auclass file.  Each line in the file corresponds to an auclass structure, declared in the <auclass.h> header file:

 struct  auclass
 {
intac_cid;
char∗ac_name;
char∗ac_desc;
 };

The fields have the meanings defined in auclass(4). 

getacent, when first called, returns a pointer to the first auclass structure in the file.  Thereafter, it returns a pointer to the next auclass structure in the file, so successive calls can be used to search the entire file. 

getaccid searches from the beginning of the file until a numerical audit class ID matching cid is found and returns a pointer to the particular structure in which it was found. 

getacnam searches from the beginning of the file until an audit class name matching name is found and returns a pointer to the particular structure in which it was found. 

If an end-of-file or an error is encountered on reading, the three preceding functions will return a NULL pointer. 

If the audit class file is already open, a call to setacent will have the effect of rewinding the audit class file to allow repeated searches.  Otherwise, setacent will open the audit class file. 

endacent is called to close the audit class file when processing is complete. 

fgetacent returns a pointer to the next auclass structure that matches the format of /var/security/auclass in the stream f. 

Lines in the audit class file that are blank or begin with a pound character (#) are ignored. 

Except for endacent, these functions all require super-user privilege. 

FILES

/var/security/auclassaudit class file

SEE ALSO

auclassmgmt(1M), auclass(4)

DIAGNOSTICS

A NULL pointer is returned on EOF or error, except for setacent which returns -1 on error. 

WARNINGS

The above routines use <stdio.h>, which causes them to increase the size of programs more than might be expected if the programs do not otherwise use standard I/O. 

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

(Security Enhancement)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026