From 94483545da687d9dba81175575d07ba9f77a3eb5 Mon Sep 17 00:00:00 2001 From: Tomas Mraz Date: Thu, 12 Jan 2006 10:06:49 +0000 Subject: Relevant BUGIDs: Purpose of commit: new feature Commit summary: --------------- 2006-01-12 Steve Grubb * configure.in: Add check for audit library. * libpam/Makefile.am (libpam_la_LDFLAGS): Add LIBAUDIT. (libpam_la_SOURCES): Add pam_audit.c. * libpam/pam_account.c (pam_acct_mgmt): Add _pam_auditlog() call. * libpam/pam_auth.c (pam_authenticate), (pam_setcred): Likewise. * libpam/pam_password.c (pam_chauthtok): Likewise. * libpam/pam_session.c (pam_open_session), (pam_close_session): Likewise. * libpam/pam_private.h: Add audit_state member to pam_handle, declare _pam_auditlog and _pam_audit_end. * libpam/pam_start.c (pam_start): Initialize audit_state. * libpam/pam_audit.c: New file with _pam_auditlog and _pam_audit_end implementation. * libpam/pam_end.c (pam_end): Add _pam_audit_end() call. * NEWS: Note about added auditing. --- libpam/pam_private.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'libpam/pam_private.h') diff --git a/libpam/pam_private.h b/libpam/pam_private.h index 2929a2f6..ce255452 100644 --- a/libpam/pam_private.h +++ b/libpam/pam_private.h @@ -150,6 +150,10 @@ struct pam_handle { event driven applications */ const char *mod_name; /* Name of the module currently executed */ int choice; /* Which function we call from the module */ + +#if HAVE_LIBAUDIT + int audit_state; /* keep track of reported audit messages */ +#endif }; /* Values for select arg to _pam_dispatch() */ @@ -286,6 +290,12 @@ if ((pamh) == NULL) { \ #define __PAM_TO_APP(pamh) \ do { (pamh)->caller_is = _PAM_CALLED_FROM_APP; } while (0) + +#if HAVE_LIBAUDIT +extern int _pam_auditlog(pam_handle_t *pamh, int action, int retval, int flags); +extern int _pam_audit_end(pam_handle_t *pamh, int pam_status); +#endif + /* * Copyright (C) 1995 by Red Hat Software, Marc Ewing * Copyright (c) 1996-8,2001 by Andrew G. Morgan -- cgit v1.2.3