public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] remove function audit_receive_filter here in kerenl/audit.c
@ 2009-05-21  2:31 Zhenwen Xu
  2009-05-21  3:06 ` Li Zefan
  0 siblings, 1 reply; 2+ messages in thread
From: Zhenwen Xu @ 2009-05-21  2:31 UTC (permalink / raw)
  To: linux-kernel; +Cc: viro, eparis


both case AUDIT_LIST: and case AUDIT_LIST_RULES: call this function
audit_receive_filter in the same way, so I think we can put them together
by removing another one.


Signed-off-by: Zhenwen Xu <helight.xu@gmail.com>
---
 kernel/audit.c |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)

diff --git a/kernel/audit.c b/kernel/audit.c
index 9442c35..40fc803 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
@@ -790,6 +790,7 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
 		}
 		/* fallthrough */
 	case AUDIT_LIST:
+	case AUDIT_LIST_RULES:
 		err = audit_receive_filter(msg_type, NETLINK_CB(skb).pid,
 					   uid, seq, data, nlmsg_len(nlh),
 					   loginuid, sessionid, sid);
@@ -807,12 +808,6 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
 			audit_log_end(ab);
 			return -EPERM;
 		}
-		/* fallthrough */
-	case AUDIT_LIST_RULES:
-		err = audit_receive_filter(msg_type, NETLINK_CB(skb).pid,
-					   uid, seq, data, nlmsg_len(nlh),
-					   loginuid, sessionid, sid);
-		break;
 	case AUDIT_TRIM:
 		audit_trim_trees();
 
-- 
1.5.6.5

-- 
--------------------------------
http://zhwen.org - Open and Free

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-05-21  3:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-21  2:31 [PATCH] remove function audit_receive_filter here in kerenl/audit.c Zhenwen Xu
2009-05-21  3:06 ` Li Zefan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox