getdvagent.3 (2010 09)
g
getdvagent(3) getdvagent(3)
(TO BE OBSOLETED)
NAME
getdvagent(), getdvagnam(), setdvagent(), enddvagent(), putdvagnam(), copydvagent() - manipulate device
assignment database entry for a trusted system
SYNOPSIS
#include <sys/types.h>
#include <hpsecurity.h>
#include <prot.h>
struct dev_asg *getdvagent( );
struct dev_asg *getdvagnam(const char *name);
void setdvagent( );
void enddvagent( );
int putdvagnam(const char *name, struct dev_asg *dv);
struct dev_asg *copydvagent(struct dev_asg *dv);
DESCRIPTION
getdvagent, getdvagnam, and copydvagent each return a pointer to an object with the following
structure containing the broken-out fields of an entry in the Device Assignment database. Each database
entry is returned as a dev_asg structure, declared in the <prot.h> header file:
struct dev_field {
char *fd_name; /* external name */
char **fd_devs; /* device list */
mask_t fd_type[1]; /* tape, printer, terminal */
char **fd_users; /* authorized user list */
};
/* Device Assignment Database entry */
#define AUTH_DEV_TYPE "device type"
#define AUTH_DEV_PRINTER 0
#define AUTH_DEV_TERMINAL 1
#define AUTH_DEV_TAPE 2
#define AUTH_DEV_REMOTE 3
#define AUTH_MAX_DEV_TYPE 3
#define AUTH_DEV_TYPE_SIZE (WORD_OF_BIT (AUTH_MAX_DEV_TYPE) + 1)
/* this structure tells which of the corresponding fields
* in dev_field are valid (filled).
*/
struct dev_flag {
unsigned short
fg_name : 1,
fg_devs : 1,
fg_type : 1,
fg_users : 1,
;
};
struct dev_asg {
struct dev_field ufld;
struct dev_flag uflg;
struct dev_field sfld;
struct dev_flag sflg;
};
The Device Assignment database stores device characteristics that are related to user authorizations and
synonyms. On systems supporting network connections, the Device Assignment database stores informa-
tion about hosts initiating connections.
Each entry contains a name, which is a cross reference to the terminal control database, and a list of dev-
ices , each of which is a pathname corresponding to that device. This list allows the device assignment
software of the trusted system to invalidate all references to a device when re-assigning it. The list is a
HP-UX 11i Version 3: September 2010 − 1 − Hewlett-Packard Company 1