NAME

catgen_log - log a predefined event log message

SYNOPSIS

#include <cat/gen.h>

int catgen_log(cat_session *sess, int code);

DESCRIPTION

This function logs one of a number of predefined event log messages where code is one of the CATLOG_ symbols defined in "gen.h". These symbols are defined as follows:

CATLOG_CONNFAIL
The connection to the server failed.

Severity: E

Message: ``ERROR: failed to connect to &1''

CATLOG_CERTUSERFAIL
The certificate could not be mapped to a user.

Severity: I

Message: ``REJECT &C: certificate not mapped to a user''

CATLOG_NOPAC
The certificate is not a PAC.

Severity: I

Message: ``REJECT &C: certificate is not a pac &1''

CATLOG_MISSLOGID
The certificate does not have a PAC logid.

Severity: I

Message: ``REJECT &C: certificate missing pac logid''

CATLOG_AUTHFAIL
The specified login name is not permitted to log in as the mapped login name.

Severity: I

Message: ``REJECT &L@&C not permitted to log in as &1''

CATLOG_AUTHOK
Authentication successful.

Severity: I

Message: ``OK &L@&C granted access''

CATLOG_MAPFAIL
No credential mapping found.

Severity: I

Message: ``REJECT &L@&C as &1: no mapping found''

CATLOG_MAPOK
Successful credential mapping from a user name to a given name.

Severity: I

Message: ``OK &L@&C successful mapping &1 -> &2''

CATLOG_CERTEXPIRED
The certificate has expired.

Severity: W

Message: ``REJECT &C: Certificate expired''

CATLOG_CERTINVALID
The certificate is invalid.

Severity: W

Message: ``REJECT &C: Certificate invalid''

CATLOG_CERTCRITICAL
The certificate contains an unsupported critical extension.

Severity: W

Message: ``REJECT &C: Certificate contains unsupported critical extension''

CATLOG_CERTREVOKED
The certificate has been revoked.

Severity: W

Message: ``REJECT &C: Certificate has been revoked''

CATLOG_CERTISSUERUNKNOWN
The certificate has been issued by an unknown CA.

Severity: W

Message: ``REJECT &C: Certificate issuer unknown''

CATLOG_CERTBADSIGNATURE
The certificate has an invalid signature.

Severity: W

Message: ``REJECT &C: Certificate invalid (bad signature)''

CATLOG_SERVAUTHFAIL
The server denied the user access.

Severity: E

Message: ``ERROR &L@&C: denied access as &1@&2''

CATLOG_AUTHUSEROK
The server granted the user access.

Severity: I

Message: ``OK &L@&C granted access as &1''

CATLOG_HOSTPSD
Successfully loaded the Agent Host Virtual Card.

Severity: I

Message: ``Loaded Host Virtual Card (PSD): &1''

CATLOG_HOSTPSDERR
Could not load Agent Host Virtual Card (PSD).

Severity: W

Message: ``Failed to load Host Virtual Card (PSD)''

See catlog for a detailed description of the specification strings, severity, etc.

NOTES

Most errors are logged automatically by the other catgen functions, so the remaining relevant errors to be logged are CATLOG_AUTHOK, CATLOG_MAPOK, CATLOG_MAPFAIL, CATLOG_AUTHUSEROK, and CATLOG_SERVAUTHFAIL.

RETURN VALUES

This function returns CAT_OK if successful, or a negative code on error.

SEE ALSO

cat, catgen, catlog