dg_running_with(3C) DG/UX 5.4 Rel. 2.01 dg_running_with(3C)
NAME
dgrunningwithaa, dgrunningwithacl, dgrunningwithaudit,
dgrunningwithmac, dgrunningwithpriv, - determine if the system
is configured for the given feature
SYNOPSIS
int dgrunningwithaa()
int dgrunningwithacl()
int dgrunningwithaudit()
int dgrunningwithmac()
int dgrunningwithpriv()
DESCRIPTION
Use the dgrunningwith function to find out if the given feature is
configured into the currently running system. These functions are
contained in the libdgc.a library.
The dgrunningwithaa function returns 1 if the system is configured
for Trusted DG/UX Authentication and Authorization. This is
determined to be the case if sysconf(SCSECLEVEL) returns a value
of DGC2, DGB1 or DGB2.
The dgrunningwithacl function returns 1 if the system is
configured for Trusted DG/UX Access Control Lists. This is
determined to be the case if sysconf(SCACL) returns a value of
POSIXACL.
The dgrunningwithaudit function returns 1 if the system is
configured for Trusted DG/UX Auditing. This is determined to be the
case if sysconf(SCAUD) returns a value of DGAUD.
The dgrunningwithmac function returns 1 if the system is
configured for Trusted DG/UX Mandatory Access Control. This is
determined to be the case if sysconf(SCMAC) returns a value of
POSIXMAC.
The dgrunningwithpriv function returns 1 if the system is
configured for Trusted DG/UX Least Privilege. This is determined to
be the case if sysconf(SCPRIV) returns a value of POSIXPRV.
These routines should be used rather than using direct calls to
sysconf(2) because Data General reserves the right to change the
underlying test that these routines use to detect the presence of the
various features.
These routines allow applications to be written that can change their
behavior based on the configuration of the system. If written
correctly, the same binary image of the application can then run on
both DG/UX and Trusted DG/UX.
Licensed material--property of copyright holder(s) 1
dg_running_with(3C) DG/UX 5.4 Rel. 2.01 dg_running_with(3C)
EXAMPLE
Below is an excerpt from the ttymon source code showing a change in
behavior based on the presence of the A&A feature:
/*
* If host system running A&A, use -s to identify as
* "login" service.
*/
if (dgrunningwithaa()) {
pmtab->pserver = "/usr/bin/login -s login";
}
else {
pmtab->pserver = "/usr/bin/login";
}
SEE ALSO
sysconf(2).
Licensed material--property of copyright holder(s) 2