From owner-p4-projects Tue May 7 22:19:40 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BB7CC37B406; Tue, 7 May 2002 22:19:31 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id EF49637B403 for ; Tue, 7 May 2002 22:19:30 -0700 (PDT) Received: (from perforce@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g485JUB23714 for perforce@freebsd.org; Tue, 7 May 2002 22:19:30 -0700 (PDT) (envelope-from arr@freebsd.org) Date: Tue, 7 May 2002 22:19:30 -0700 (PDT) Message-Id: <200205080519.g485JUB23714@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: perforce set sender to arr@freebsd.org using -f From: "Andrew R. Reiter" Subject: PERFORCE change 10996 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG http://people.freebsd.org/~peter/p4db/chv.cgi?CH=10996 Change 10996 by arr@arr_shibby on 2002/05/07 22:18:33 - Add security.audit node and a child, debug, that will allow toggling of verbose debugging output when the AUDIT_DEBUG option is used. Affected files ... ... //depot/projects/trustedbsd/audit/sys/kern/kern_audit.c#37 edit Differences ... ==== //depot/projects/trustedbsd/audit/sys/kern/kern_audit.c#37 (text+ko) ==== @@ -63,12 +63,6 @@ static int audit_shutdown_flag = 0; static int audit_id = 0; -#ifdef AUDIT_DEBUG -#define audit_print_record(ar) _audit_print_record((ar)) -#else -#define audit_print_record(ar) -#endif - /* * Re-add this later when handling the decrease in the pool * size can be properly handled. @@ -76,6 +70,24 @@ * static size_t pool_size = 32; */ +SYSCTL_DECL(_security); +SYSCTL_NODE(_security, OID_AUTO, audit, CTLFLAG_RW, 0, ""); + +#ifdef AUDIT_DEBUG +int audit_debug = 0; + +SYSCTL_INT(_security_audit, OID_AUTO, debug, CTLFLAG_RW, &audit_debug, + 0, ""); + +#define audit_print_record(ar) do { \ + if (audit_debug) \ + _audit_print_record((ar)); \ +} while (0) +#else +#define audit_print_record(ar) +#endif + + audit_record_t * audit_record_init(int type, size_t evsz) { To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message