diff options
Diffstat (limited to 'security/selinux/avc.c')
-rw-r--r-- | security/selinux/avc.c | 32 |
1 files changed, 6 insertions, 26 deletions
diff --git a/security/selinux/avc.c b/security/selinux/avc.c index 5c1326e18836..68d82daed257 100644 --- a/security/selinux/avc.c +++ b/security/selinux/avc.c | |||
@@ -65,14 +65,8 @@ struct avc_cache { | |||
65 | }; | 65 | }; |
66 | 66 | ||
67 | struct avc_callback_node { | 67 | struct avc_callback_node { |
68 | int (*callback) (u32 event, u32 ssid, u32 tsid, | 68 | int (*callback) (u32 event); |
69 | u16 tclass, u32 perms, | ||
70 | u32 *out_retained); | ||
71 | u32 events; | 69 | u32 events; |
72 | u32 ssid; | ||
73 | u32 tsid; | ||
74 | u16 tclass; | ||
75 | u32 perms; | ||
76 | struct avc_callback_node *next; | 70 | struct avc_callback_node *next; |
77 | }; | 71 | }; |
78 | 72 | ||
@@ -499,22 +493,12 @@ noinline int slow_avc_audit(u32 ssid, u32 tsid, u16 tclass, | |||
499 | * avc_add_callback - Register a callback for security events. | 493 | * avc_add_callback - Register a callback for security events. |
500 | * @callback: callback function | 494 | * @callback: callback function |
501 | * @events: security events | 495 | * @events: security events |
502 | * @ssid: source security identifier or %SECSID_WILD | ||
503 | * @tsid: target security identifier or %SECSID_WILD | ||
504 | * @tclass: target security class | ||
505 | * @perms: permissions | ||
506 | * | 496 | * |
507 | * Register a callback function for events in the set @events | 497 | * Register a callback function for events in the set @events. |
508 | * related to the SID pair (@ssid, @tsid) | 498 | * Returns %0 on success or -%ENOMEM if insufficient memory |
509 | * and the permissions @perms, interpreting | 499 | * exists to add the callback. |
510 | * @perms based on @tclass. Returns %0 on success or | ||
511 | * -%ENOMEM if insufficient memory exists to add the callback. | ||
512 | */ | 500 | */ |
513 | int __init avc_add_callback(int (*callback)(u32 event, u32 ssid, u32 tsid, | 501 | int __init avc_add_callback(int (*callback)(u32 event), u32 events) |
514 | u16 tclass, u32 perms, | ||
515 | u32 *out_retained), | ||
516 | u32 events, u32 ssid, u32 tsid, | ||
517 | u16 tclass, u32 perms) | ||
518 | { | 502 | { |
519 | struct avc_callback_node *c; | 503 | struct avc_callback_node *c; |
520 | int rc = 0; | 504 | int rc = 0; |
@@ -527,9 +511,6 @@ int __init avc_add_callback(int (*callback)(u32 event, u32 ssid, u32 tsid, | |||
527 | 511 | ||
528 | c->callback = callback; | 512 | c->callback = callback; |
529 | c->events = events; | 513 | c->events = events; |
530 | c->ssid = ssid; | ||
531 | c->tsid = tsid; | ||
532 | c->perms = perms; | ||
533 | c->next = avc_callbacks; | 514 | c->next = avc_callbacks; |
534 | avc_callbacks = c; | 515 | avc_callbacks = c; |
535 | out: | 516 | out: |
@@ -669,8 +650,7 @@ int avc_ss_reset(u32 seqno) | |||
669 | 650 | ||
670 | for (c = avc_callbacks; c; c = c->next) { | 651 | for (c = avc_callbacks; c; c = c->next) { |
671 | if (c->events & AVC_CALLBACK_RESET) { | 652 | if (c->events & AVC_CALLBACK_RESET) { |
672 | tmprc = c->callback(AVC_CALLBACK_RESET, | 653 | tmprc = c->callback(AVC_CALLBACK_RESET); |
673 | 0, 0, 0, 0, NULL); | ||
674 | /* save the first error encountered for the return | 654 | /* save the first error encountered for the return |
675 | value and continue processing the callbacks */ | 655 | value and continue processing the callbacks */ |
676 | if (!rc) | 656 | if (!rc) |