From owner-p4-projects@FreeBSD.ORG Mon Aug 25 16:13:09 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id F01DB1065674; Mon, 25 Aug 2008 16:13:08 +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 B138A106566C for ; Mon, 25 Aug 2008 16:13:08 +0000 (UTC) (envelope-from sson@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 996018FC19 for ; Mon, 25 Aug 2008 16:13:08 +0000 (UTC) (envelope-from sson@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.2/8.14.2) with ESMTP id m7PGD8Cn037280 for ; Mon, 25 Aug 2008 16:13:08 GMT (envelope-from sson@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.2/8.14.1/Submit) id m7PGD8FU037278 for perforce@freebsd.org; Mon, 25 Aug 2008 16:13:08 GMT (envelope-from sson@FreeBSD.org) Date: Mon, 25 Aug 2008 16:13:08 GMT Message-Id: <200808251613.m7PGD8FU037278@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sson@FreeBSD.org using -f From: Stacey Son To: Perforce Change Reviews Cc: Subject: PERFORCE change 148394 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: Mon, 25 Aug 2008 16:13:09 -0000 http://perforce.freebsd.org/chv.cgi?CH=148394 Change 148394 by sson@sson_amd64 on 2008/08/25 16:12:46 Bug fix for darwin: missing notify_post(). Typo in comment. Affected files ... .. //depot/projects/trustedbsd/openbsm/bin/auditd/auditd.c#37 edit Differences ... ==== //depot/projects/trustedbsd/openbsm/bin/auditd/auditd.c#37 (text+ko) ==== @@ -26,7 +26,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/openbsm/bin/auditd/auditd.c#36 $ + * $P4: //depot/projects/trustedbsd/openbsm/bin/auditd/auditd.c#37 $ */ #include @@ -301,6 +301,14 @@ close(fd); } else { /* Success. */ +#ifdef USE_MACH_IPC + /* + * auditctl() potentially changes the audit + * state so post that the audit config (may + * have) changed. + */ + notify_post(__BSM_INTERNAL_NOTIFY_KEY); +#endif close_lastfile(TS); lastfile = fn; close(fd); @@ -338,11 +346,6 @@ free_dir_q(); endac(); -#ifdef USE_MACH_IPC - /* Post that the audit config changed. */ - notify_post(__BSM_INTERNAL_NOTIFY_KEY); -#endif - /* * Read the list of directories into a local linked list. * @@ -440,6 +443,12 @@ strerror(errno)); err_ret = 1; } +#ifdef USE_MACH_IPC + /* + * Post a notification that the audit config changed. + */ + notify_post(__BSM_INTERNAL_NOTIFY_KEY); +#endif if (getTSstr(TS, TIMESTAMP_LEN) == 0) close_lastfile(TS); if (lastfile != NULL) @@ -1060,7 +1069,7 @@ #endif /* - * To provide event feedback cycles and avoid auditd becoming + * To prevent event feedback cycles and avoid auditd becoming * stalled if auditing is suspended, auditd and its children run * without their events being audited. We allow the uid, tid, and * mask fields to be implicitly set to zero, but do set the pid. We