From owner-p4-projects@FreeBSD.ORG Sat Nov 29 23:38:21 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9CCD91065675; Sat, 29 Nov 2008 23:38:21 +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 612D91065672 for ; Sat, 29 Nov 2008 23:38:21 +0000 (UTC) (envelope-from csjp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 535E18FC14 for ; Sat, 29 Nov 2008 23:38:21 +0000 (UTC) (envelope-from csjp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id mATNcLLx023646 for ; Sat, 29 Nov 2008 23:38:21 GMT (envelope-from csjp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id mATNcLV4023644 for perforce@freebsd.org; Sat, 29 Nov 2008 23:38:21 GMT (envelope-from csjp@freebsd.org) Date: Sat, 29 Nov 2008 23:38:21 GMT Message-Id: <200811292338.mATNcLV4023644@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to csjp@freebsd.org using -f From: "Christian S.J. Peron" To: Perforce Change Reviews Cc: Subject: PERFORCE change 153800 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, 29 Nov 2008 23:38:21 -0000 http://perforce.freebsd.org/chv.cgi?CH=153800 Change 153800 by csjp@hvm02 on 2008/11/29 23:37:23 Fix a bug in how we calculate the total length or size for the token. We accounted for the NULL termination characters twice. Affected files ... .. //depot/projects/trustedbsd/openbsm/NEWS#13 edit .. //depot/projects/trustedbsd/openbsm/libbsm/bsm_token.c#75 edit Differences ... ==== //depot/projects/trustedbsd/openbsm/NEWS#13 (text+ko) ==== @@ -1,5 +1,9 @@ OpenBSM Version History +- Fix a bug how au_to_exec_args(3) and au_to_exec_env(3) calculates the total + size for the token. This bug resulted in "unknown" tokens being printed + after the exec args/env tokens. + OpenBSM 1.1 alpha 3 - Add two new functions, au_bsm_to_errno() and au_errno_to_bsm(), to map @@ -356,4 +360,4 @@ to support reloading of kernel event table. - Allow comments in /etc/security configuration files. -$P4: //depot/projects/trustedbsd/openbsm/NEWS#12 $ +$P4: //depot/projects/trustedbsd/openbsm/NEWS#13 $ ==== //depot/projects/trustedbsd/openbsm/libbsm/bsm_token.c#75 (text+ko) ==== @@ -30,7 +30,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_token.c#74 $ + * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_token.c#75 $ */ #include @@ -1207,7 +1207,6 @@ nextarg = *(argv + count); } - totlen += count * sizeof(char); /* nul terminations. */ GET_TOKEN_AREA(t, dptr, sizeof(u_char) + sizeof(u_int32_t) + totlen); if (t == NULL) return (NULL); @@ -1269,7 +1268,6 @@ nextenv = *(envp + count); } - totlen += sizeof(char) * count; GET_TOKEN_AREA(t, dptr, sizeof(u_char) + sizeof(u_int32_t) + totlen); if (t == NULL) return (NULL);