From owner-p4-projects@FreeBSD.ORG Sat Oct 15 22:16:00 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1272E16A421; Sat, 15 Oct 2005 22:16:00 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C6CBC16A41F for ; Sat, 15 Oct 2005 22:15:59 +0000 (GMT) (envelope-from wsalamon@computer.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7959443D48 for ; Sat, 15 Oct 2005 22:15:59 +0000 (GMT) (envelope-from wsalamon@computer.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j9FMFxBJ095604 for ; Sat, 15 Oct 2005 22:15:59 GMT (envelope-from wsalamon@computer.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j9FMFxJA095601 for perforce@freebsd.org; Sat, 15 Oct 2005 22:15:59 GMT (envelope-from wsalamon@computer.org) Date: Sat, 15 Oct 2005 22:15:59 GMT Message-Id: <200510152215.j9FMFxJA095601@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to wsalamon@computer.org using -f From: Wayne Salamon To: Perforce Change Reviews Cc: Subject: PERFORCE change 85352 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, 15 Oct 2005 22:16:00 -0000 http://perforce.freebsd.org/chv.cgi?CH=85352 Change 85352 by wsalamon@gretsch on 2005/10/15 22:15:17 Initialize some globals that weren't previously be initialized. Rearrange the globals into groups of related bits. Reported by: panxj Affected files ... .. //depot/projects/trustedbsd/audit3/sys/security/audit/kern_audit.c#46 edit Differences ... ==== //depot/projects/trustedbsd/audit3/sys/security/audit/kern_audit.c#46 (text+ko) ==== @@ -102,9 +102,9 @@ int audit_fail_stop; /* - * Audit queue control settings (minimum free, low/high water marks, etc.) + * Are we currently "failing stop" due to out of disk space? */ -struct au_qctrl audit_qctrl; +static int audit_in_failure; /* * Global audit statistiscs. @@ -135,6 +135,11 @@ static int audit_pre_q_len; /* + * Audit queue control settings (minimum free, low/high water marks, etc.) + */ +struct au_qctrl audit_qctrl; + +/* * Condition variable to signal to the worker that it has work to do: * either new records are in the queue, or a log replacement is taking * place. @@ -188,11 +193,6 @@ static int audit_file_rotate_wait; /* - * Are we currently "failing stop" due to out of disk space? - */ -static int audit_in_failure; - -/* * Perform a deep free of an audit record (core record and referenced objects) */ static void @@ -594,17 +594,24 @@ int error; printf("Security auditing service present\n"); - TAILQ_INIT(&audit_q); - audit_q_len = 0; - audit_pre_q_len = 0; audit_enabled = 0; audit_suspended = 0; + audit_panic_on_write_fail = 0; + audit_fail_stop = 0; + audit_in_failure = 0; + + audit_replacement_vp = NULL; audit_replacement_cred = NULL; audit_replacement_flag = 0; - audit_file_rotate_wait = 0; - audit_replacement_vp = NULL; + audit_fstat.af_filesz = 0; /* '0' means unset, unbounded */ audit_fstat.af_currsz = 0; + audit_nae_mask.am_success = AU_NULL; + audit_nae_mask.am_failure = AU_NULL; + + TAILQ_INIT(&audit_q); + audit_q_len = 0; + audit_pre_q_len = 0; audit_qctrl.aq_hiwater = AQ_HIWATER; audit_qctrl.aq_lowater = AQ_LOWATER; audit_qctrl.aq_bufsz = AQ_BUFSZ; @@ -619,6 +626,7 @@ /* Initialize the BSM audit subsystem. */ kau_init(); + audit_file_rotate_wait = 0; audit_trigger_init(); /* Register shutdown handler. */