kdc: add audit plugin API to windc API
Allow the windc plugin to also implement an audit callback. As part of this change, both the HDB and windc audit function signatures are changed to return void.
This commit is contained in:
16
kdc/misc.c
16
kdc/misc.c
@@ -343,18 +343,20 @@ _kdc_include_pac_p(astgs_request_t r)
|
||||
}
|
||||
|
||||
/*
|
||||
* Notify the HDB backend of the audited event.
|
||||
* Notify the HDB backend and windc plugin of the audited event.
|
||||
*/
|
||||
|
||||
krb5_error_code
|
||||
_kdc_hdb_audit(astgs_request_t r)
|
||||
_kdc_audit_request(astgs_request_t r)
|
||||
{
|
||||
krb5_error_code ret;
|
||||
struct HDB *hdb;
|
||||
|
||||
hdb = r->clientdb ? r->clientdb : r->config->db[0];
|
||||
ret = _kdc_windc_audit(r);
|
||||
if (ret == 0 &&
|
||||
(hdb = r->clientdb ? r->clientdb : r->config->db[0]) &&
|
||||
hdb->hdb_audit)
|
||||
ret = hdb->hdb_audit(r->context, hdb, r->client, (hdb_request_t)r);
|
||||
|
||||
if (hdb && hdb->hdb_audit)
|
||||
return hdb->hdb_audit(r->context, hdb, r->client, (hdb_request_t)r);
|
||||
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
|
Reference in New Issue
Block a user