From owner-p4-projects@FreeBSD.ORG Mon Dec 8 10:11:13 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id CF6E11065672; Mon, 8 Dec 2008 10:11:13 +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 934FD106564A for ; Mon, 8 Dec 2008 10:11:13 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 800CC8FC19 for ; Mon, 8 Dec 2008 10:11:13 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id mB8ABD6i023828 for ; Mon, 8 Dec 2008 10:11:13 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id mB8ABDWt023826 for perforce@freebsd.org; Mon, 8 Dec 2008 10:11:13 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Mon, 8 Dec 2008 10:11:13 GMT Message-Id: <200812081011.mB8ABDWt023826@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 154324 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, 08 Dec 2008 10:11:14 -0000 http://perforce.freebsd.org/chv.cgi?CH=154324 Change 154324 by rwatson@rwatson_cinnamon on 2008/12/08 10:11:09 audit_submit(3) accepts a local error number for reterr, rather than a BSM one, so perform the conversion. Pointed out by: csjp Affected files ... .. //depot/projects/trustedbsd/openbsm/NEWS#18 edit .. //depot/projects/trustedbsd/openbsm/libbsm/audit_submit.3#15 edit .. //depot/projects/trustedbsd/openbsm/libbsm/bsm_wrappers.c#28 edit Differences ... ==== //depot/projects/trustedbsd/openbsm/NEWS#18 (text+ko) ==== @@ -2,6 +2,10 @@ OpenBSM 1.1 alpha 4 +- With the addition of BSM error number mapping, we also need to map the + local error number passed to audit_submit(3) to a BSM error number, rather + than have the caller perform that conversion. + OpenBSM 1.1 alpha 3 - Add two new functions, au_bsm_to_errno() and au_errno_to_bsm(), to map @@ -365,4 +369,4 @@ to support reloading of kernel event table. - Allow comments in /etc/security configuration files. -$P4: //depot/projects/trustedbsd/openbsm/NEWS#17 $ +$P4: //depot/projects/trustedbsd/openbsm/NEWS#18 $ ==== //depot/projects/trustedbsd/openbsm/libbsm/audit_submit.3#15 (text+ko) ==== @@ -27,7 +27,7 @@ .\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $P4: //depot/projects/trustedbsd/openbsm/libbsm/audit_submit.3#14 $ +.\" $P4: //depot/projects/trustedbsd/openbsm/libbsm/audit_submit.3#15 $ .\" .Dd January 18, 2008 .Dt audit_submit 3 @@ -58,7 +58,10 @@ .Fa status and .Fa reterr -arguments. +arguments; unlike the argument to +.Xr au_to_return , +.Fa reterr +should be a local rather than BSM error number. Optionally, a text token will be created as a part of this record. .Pp Text token output is under the control of a ==== //depot/projects/trustedbsd/openbsm/libbsm/bsm_wrappers.c#28 (text+ko) ==== @@ -26,7 +26,7 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_wrappers.c#27 $ + * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_wrappers.c#28 $ */ #ifdef __APPLE__ @@ -178,7 +178,7 @@ return (-1); } } - token = au_to_return32(status, reterr); + token = au_to_return32(status, au_errno_to_bsm(reterr)); if (token == NULL) { syslog(LOG_AUTH | LOG_ERR, "audit: enable to build return token");