smp_audit_fail(S-osr5)
smp_audit_fail --
write audit record
Syntax
cc . . . -lprot
#include <sys/types.h>
#include <prot.h>
void smp_audit_fail(usrp)
struct smp_user_info *usrp;
Description
smp_audit_fail writes an audit record based on
the return value of a failing routine. Records are written
using the routines
audit_login(S-osr5)
and
audit_passwd(S-osr5),
which are used, respectively, to indicate a failed login or
password change. It should be called when a value returned
by one of the other SMP routines indicates that
the program should not continue with either the login or
the password change but before the program itself exits.
When an audit record is written the last unsuccessful login
or password change time is written. In the case of a
failed login, the failed login count is also written, both
for the user and the terminal.
usrp points to a smp_user_info
structure which has been created by the previous call to
smp_check_user. Storage which may have been
previously allocated for an old password is cleared. Then
the value stored previously as the result is used to
determine the type of audit record to be written.
Return values
smp_audit_fail does not return a value.
Diagnostics
smp_audit_fail produces no diagnostic messages.
Examples
The following example illustrates the usage of smp_audit_fail :
...
switch (smp_check_user(SMP_LOGIN, gets(line), ttyname(0), 0, &usrp,
&pwtries, &reason)) {
...
case SMP_TERMLOCK:
put("terminal locked\n");
smp_audit_fail(usrp);
exit(1);
...
case SMP_RETIRED:
put("account retired\n");
smp_audit_fail(usrp);
exit(1);
...
}
Files
/lib/libprot.a-
security subsystem library routines
/usr/lib/libp/libprot.a-
as above but used for profiling
/usr/include/prot.h-
defines the smp_user_info structure
/dev/auditw-
audit interface device, see
audit(HW)
See also
smp_check_user(S-osr5),
smp_check_pw(S-osr5),
smp_generate_pw(S-osr5),
smp_get_messages(S-osr5),
smp_pw_change(S-osr5),
smp_pw_choice(S-osr5),
smp_set_identity(S-osr5),
smp_set_pw(S-osr5),
smp_try_pw(S-osr5)
Standards conformance
smp_audit_fail is not part of any currently
supported standard; it is an extension of AT&T System V
provided by The Santa Cruz Operation, Inc.
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005