From owner-p4-projects@FreeBSD.ORG Sat May 17 13:16:48 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0893B10656AA; Sat, 17 May 2008 13:16:48 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE2701065690 for ; Sat, 17 May 2008 13:16:47 +0000 (UTC) (envelope-from diego@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id AACD38FC26 for ; Sat, 17 May 2008 13:16:47 +0000 (UTC) (envelope-from diego@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m4HDGlio071138 for ; Sat, 17 May 2008 13:16:47 GMT (envelope-from diego@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m4HDGluh071136 for perforce@freebsd.org; Sat, 17 May 2008 13:16:47 GMT (envelope-from diego@FreeBSD.org) Date: Sat, 17 May 2008 13:16:47 GMT Message-Id: <200805171316.m4HDGluh071136@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to diego@FreeBSD.org using -f From: Diego Giagio To: Perforce Change Reviews Cc: Subject: PERFORCE change 141763 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2008 13:16:48 -0000 http://perforce.freebsd.org/chv.cgi?CH=141763 Change 141763 by diego@diego_black on 2008/05/17 13:16:28 Better naming conventions Affected files ... .. //depot/projects/soc2008/diego-audit/src/sys/contrib/pf/net/pf_ioctl.c#4 edit .. //depot/projects/soc2008/diego-audit/src/sys/netinet/ip_fw2.c#4 edit .. //depot/projects/soc2008/diego-audit/src/sys/netinet/ip_fw_pfil.c#3 edit .. //depot/projects/soc2008/diego-audit/src/sys/security/audit/audit.h#7 edit .. //depot/projects/soc2008/diego-audit/src/sys/security/audit/audit_pfil.c#3 edit Differences ... ==== //depot/projects/soc2008/diego-audit/src/sys/contrib/pf/net/pf_ioctl.c#4 (text+ko) ==== @@ -3875,12 +3875,12 @@ switch(type) { case MOD_LOAD: error = pf_load(); - AUDIT_CALL(audit_pfil_enable_pf(error)); + AUDIT_CALL(audit_pf_enable(error)); break; case MOD_UNLOAD: error = pf_unload(); - AUDIT_CALL(audit_pfil_disable_pf(error)); + AUDIT_CALL(audit_pf_disable(error)); break; default: error = EINVAL; ==== //depot/projects/soc2008/diego-audit/src/sys/netinet/ip_fw2.c#4 (text+ko) ==== @@ -4210,7 +4210,7 @@ IPFW_WUNLOCK(&layer3_chain); if (rule != NULL) reap_rules(rule); - AUDIT_CALL(audit_pfil_flush_ipfw(error)); + AUDIT_CALL(audit_ipfw_flush(error)); break; case IP_FW_ADD: @@ -4225,7 +4225,7 @@ if (!error && sopt->sopt_dir == SOPT_GET) error = sooptcopyout(sopt, rule, size); } - AUDIT_CALL(audit_pfil_addrule_ipfw(rule, error)); + AUDIT_CALL(audit_ipfw_addrule(rule, error)); free(rule, M_TEMP); break; @@ -4255,7 +4255,7 @@ ~(1< static void -audit_pfil_enable_common(char *name, int error) +audit_enable_common(char *name, int error) { struct kaudit_record *ar; @@ -54,7 +54,7 @@ } static void -audit_pfil_disable_common(char *name, int error) +audit_disable_common(char *name, int error) { struct kaudit_record *ar; @@ -67,31 +67,19 @@ } void -audit_pfil_enable_ipfw(int error) +audit_ipfw_enable(int error) { - audit_pfil_enable_common("ipfw", error); + audit_enable_common("ipfw", error); } void -audit_pfil_disable_ipfw(int error) +audit_ipfw_disable(int error) { - audit_pfil_disable_common("ipfw", error); + audit_disable_common("ipfw", error); } void -audit_pfil_enable_pf(int error) -{ - audit_pfil_enable_common("pf", error); -} - -void -audit_pfil_disable_pf(int error) -{ - audit_pfil_disable_common("pf", error); -} - -void -audit_pfil_addrule_ipfw(struct ip_fw *rule, int error) +audit_ipfw_addrule(struct ip_fw *rule, int error) { struct kaudit_record *ar; @@ -105,7 +93,7 @@ } void -audit_pfil_delrule_ipfw(struct ip_fw *rule, int error) +audit_ipfw_delrule(struct ip_fw *rule, int error) { struct kaudit_record *ar; @@ -119,7 +107,7 @@ } void -audit_pfil_flush_ipfw(int error) +audit_ipfw_flush(int error) { struct kaudit_record *ar; @@ -133,7 +121,7 @@ } void -audit_pfil_table_ipfw(u_int32_t table, int error) +audit_ipfw_table(u_int32_t table, int error) { struct kaudit_record *ar; @@ -146,3 +134,15 @@ audit_commit(ar, error, 0); } +void +audit_pf_enable(int error) +{ + audit_enable_common("pf", error); +} + +void +audit_pf_disable(int error) +{ + audit_disable_common("pf", error); +} +