Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

authcap(4)

default(4)

getprpwent(3)

getprtcent(3)

getdvagent(3)

getprdfent(3)

NAME

getprdfent, getprdfnam, setprdfent, endprdfent, putprdfnam − manipulate system default database entry for a trusted system

SYNOPSIS

#include <sys/types.h>
#include <hpsecurity.h>
#include <prot.h>

struct pr_default ∗getprdfent(void);

struct pr_default ∗getprdfnam(const char ∗name);

void setprdfent(void);

void endprdfent(void);

int putprdfnam(const char ∗name, struct pr_default ∗pr);

DESCRIPTION

getprdfent and getprdfnam each returns a pointer to an object with the following structure containing the broken-out fields of a line in the system default database.  Each line in the database contains a pr_default structure, declared in the <prot.h> header file:

struct   system_default_fields  {
time_tfd_inactivity_timeout ;
charfd_boot_authenticate ;
 } ;
 structsystem_default_flags {
unsigned short
fg_inactivity_timeout:1,
fg_boot_authenticate:1,
 } ;
struct   pr_default  {
        char                            dd_name[20] ;
        char                            dg_name ;
        struct pr_field                 prd ;
        struct pr_flag                  prg ;
        struct t_field                  tcd ;
        struct t_flag                   tcg ;
        struct dev_field                devd ;
        struct dev_flag                 devg ;
        struct system_default_fields    sfld ;
        struct system_default_flags     sflg ;
} ;

Currently there is only one entry in the system default database, referenced by name default. 

The System Default database contains default values for all parameters in the Protected Password, Terminal Control, and Device Assignment databases, as well as configurable system-wide parameters.  The fields from the other databases are described in the corresponding manual entries.  fd_inactivity_timeout is the number of seconds until a  session is terminated on trusted systems. 

fd_boot_authenticate is a boolean flag that indicates whether an authorized user must authenticate before the system begins operation. 

getprdfent returns a pointer to the first pr_default structure in the database when first called.  Thereafter, it returns a pointer to the next pr_default structure in the database, so that successive calls can be used to search the database (not currently supported). 

getprdfnam searches from the beginning of the file until a default entry 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, these functions return a NULL pointer. Currently, all programs access the default database by calling getprdfnam ("default"). 

A call to setprdfent has the effect of rewinding the default control file to allow repeated searches.  endprdfent can be called to close the database when processing is complete. 

putprdfnam puts a new or replaced default control entry pr with key name into the database.  If the prg.fd_name field is 0, the requested entry is deleted from the system default database.  putprdfnam locks the database for all update operations, and performs an endprdfent after the update or failed attempt. 

RETURN VALUE

getprdfent and getprdfnam return NULL pointers on EOF or error.  putprdfnam returns 0 if it cannot add or update the entry. 

WARNINGS

Do not delete the system default entry. 

AUTHOR

SecureWare Inc. 

FILES

/tcb/files/auth/system/default System Defaults database

SEE ALSO

authcap(4), default(4), getprpwent(3), getprtcent(3), getdvagent(3). 

NOTES

The value returned by getprdfent and getprdfnam refers to a structure that is overwritten by calls to these routines.  To retrieve an entry, modify it, and replace it in the database, copy the entry using structure assignment and supply the modified buffer to putprdfnam.

Programs using these routines must be compiled with −lsec. 

Hewlett-Packard Company  —  HP-UX Release 10.20:  July 1996

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