|
@@ -65,14 +65,8 @@ struct avc_cache {
|
|
};
|
|
};
|
|
|
|
|
|
struct avc_callback_node {
|
|
struct avc_callback_node {
|
|
- int (*callback) (u32 event, u32 ssid, u32 tsid,
|
|
|
|
- u16 tclass, u32 perms,
|
|
|
|
- u32 *out_retained);
|
|
|
|
|
|
+ int (*callback) (u32 event);
|
|
u32 events;
|
|
u32 events;
|
|
- u32 ssid;
|
|
|
|
- u32 tsid;
|
|
|
|
- u16 tclass;
|
|
|
|
- u32 perms;
|
|
|
|
struct avc_callback_node *next;
|
|
struct avc_callback_node *next;
|
|
};
|
|
};
|
|
|
|
|
|
@@ -499,22 +493,12 @@ noinline int slow_avc_audit(u32 ssid, u32 tsid, u16 tclass,
|
|
* avc_add_callback - Register a callback for security events.
|
|
* avc_add_callback - Register a callback for security events.
|
|
* @callback: callback function
|
|
* @callback: callback function
|
|
* @events: security events
|
|
* @events: security events
|
|
- * @ssid: source security identifier or %SECSID_WILD
|
|
|
|
- * @tsid: target security identifier or %SECSID_WILD
|
|
|
|
- * @tclass: target security class
|
|
|
|
- * @perms: permissions
|
|
|
|
*
|
|
*
|
|
- * Register a callback function for events in the set @events
|
|
|
|
- * related to the SID pair (@ssid, @tsid)
|
|
|
|
- * and the permissions @perms, interpreting
|
|
|
|
- * @perms based on @tclass. Returns %0 on success or
|
|
|
|
- * -%ENOMEM if insufficient memory exists to add the callback.
|
|
|
|
|
|
+ * Register a callback function for events in the set @events.
|
|
|
|
+ * Returns %0 on success or -%ENOMEM if insufficient memory
|
|
|
|
+ * exists to add the callback.
|
|
*/
|
|
*/
|
|
-int __init avc_add_callback(int (*callback)(u32 event, u32 ssid, u32 tsid,
|
|
|
|
- u16 tclass, u32 perms,
|
|
|
|
- u32 *out_retained),
|
|
|
|
- u32 events, u32 ssid, u32 tsid,
|
|
|
|
- u16 tclass, u32 perms)
|
|
|
|
|
|
+int __init avc_add_callback(int (*callback)(u32 event), u32 events)
|
|
{
|
|
{
|
|
struct avc_callback_node *c;
|
|
struct avc_callback_node *c;
|
|
int rc = 0;
|
|
int rc = 0;
|
|
@@ -527,9 +511,6 @@ int __init avc_add_callback(int (*callback)(u32 event, u32 ssid, u32 tsid,
|
|
|
|
|
|
c->callback = callback;
|
|
c->callback = callback;
|
|
c->events = events;
|
|
c->events = events;
|
|
- c->ssid = ssid;
|
|
|
|
- c->tsid = tsid;
|
|
|
|
- c->perms = perms;
|
|
|
|
c->next = avc_callbacks;
|
|
c->next = avc_callbacks;
|
|
avc_callbacks = c;
|
|
avc_callbacks = c;
|
|
out:
|
|
out:
|
|
@@ -669,8 +650,7 @@ int avc_ss_reset(u32 seqno)
|
|
|
|
|
|
for (c = avc_callbacks; c; c = c->next) {
|
|
for (c = avc_callbacks; c; c = c->next) {
|
|
if (c->events & AVC_CALLBACK_RESET) {
|
|
if (c->events & AVC_CALLBACK_RESET) {
|
|
- tmprc = c->callback(AVC_CALLBACK_RESET,
|
|
|
|
- 0, 0, 0, 0, NULL);
|
|
|
|
|
|
+ tmprc = c->callback(AVC_CALLBACK_RESET);
|
|
/* save the first error encountered for the return
|
|
/* save the first error encountered for the return
|
|
value and continue processing the callbacks */
|
|
value and continue processing the callbacks */
|
|
if (!rc)
|
|
if (!rc)
|