From owner-p4-projects@FreeBSD.ORG Sun Sep 17 09:28:11 2006 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 C567216A415; Sun, 17 Sep 2006 09:28:11 +0000 (UTC) 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 823B416A403 for ; Sun, 17 Sep 2006 09:28:11 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2E70443D49 for ; Sun, 17 Sep 2006 09:28:11 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k8H9S9Ys097237 for ; Sun, 17 Sep 2006 09:28:09 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k8H9S9s8097234 for perforce@freebsd.org; Sun, 17 Sep 2006 09:28:09 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Sun, 17 Sep 2006 09:28:09 GMT Message-Id: <200609170928.k8H9S9s8097234@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Cc: Subject: PERFORCE change 106225 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: Sun, 17 Sep 2006 09:28:12 -0000 http://perforce.freebsd.org/chv.cgi?CH=106225 Change 106225 by rwatson@rwatson_peppercorn on 2006/09/17 09:27:39 Minor white space revisions to previous submit. Affected files ... .. //depot/projects/trustedbsd/audit3/sys/security/audit/audit_private.h#33 edit .. //depot/projects/trustedbsd/audit3/sys/security/audit/audit_syscalls.c#23 edit .. //depot/projects/trustedbsd/audit3/sys/security/audit/audit_worker.c#16 edit Differences ... ==== //depot/projects/trustedbsd/audit3/sys/security/audit/audit_private.h#33 (text+ko) ==== @@ -98,6 +98,7 @@ #define AR_PRESELECT_USER_TRAIL 0x00004000U #define AR_PRESELECT_USER_PIPE 0x00008000U + /* * Audit data is generated as a stream of struct audit_record structures, * linked by struct kaudit_record, and contain storage for possible audit so ==== //depot/projects/trustedbsd/audit3/sys/security/audit/audit_syscalls.c#23 (text+ko) ==== @@ -139,10 +139,11 @@ ar->k_udata = rec; ar->k_ulen = uap->length; ar->k_ar_commit |= AR_COMMIT_USER; + /* * Currently we assume that all preselection has been performed in - * userspace. We unconditionally set these masks so that the records - * get committed both to the trail and pipe. In the future we will + * userspace. We unconditionally set these masks so that the records + * get committed both to the trail and pipe. In the future we will * want to setup kernel based preselection. */ ar->k_ar_commit |= (AR_PRESELECT_USER_TRAIL | AR_PRESELECT_USER_PIPE); ==== //depot/projects/trustedbsd/audit3/sys/security/audit/audit_worker.c#16 (text+ko) ==== @@ -322,7 +322,7 @@ au_id_t auid; int sorf; - if ((ar->k_ar_commit & AR_COMMIT_USER) != 0 && + if ((ar->k_ar_commit & AR_COMMIT_USER) && (ar->k_ar_commit & AR_PRESELECT_USER_TRAIL)) { error = audit_record_write(audit_vp, audit_cred, audit_td, ar->k_udata, ar->k_ulen); @@ -331,10 +331,10 @@ else if (error) printf("audit_worker: write error %d\n", error); } - if ((ar->k_ar_commit & AR_COMMIT_USER) != 0 && - (ar->k_ar_commit & AR_PRESELECT_USER_PIPE)) { + + if ((ar->k_ar_commit & AR_COMMIT_USER) && + (ar->k_ar_commit & AR_PRESELECT_USER_PIPE)) audit_pipe_submit_user(ar->k_udata, ar->k_ulen); - } if (!(ar->k_ar_commit & AR_COMMIT_KERNEL) || ((ar->k_ar_commit & AR_PRESELECT_PIPE) == 0 && @@ -375,6 +375,7 @@ printf("audit_worker: write error %d\n", error); } + if (ar->k_ar_commit & AR_PRESELECT_PIPE) audit_pipe_submit(auid, event, class, sorf, ar->k_ar_commit & AR_PRESELECT_TRAIL, bsm->data,