From owner-p4-projects@FreeBSD.ORG Mon Dec 1 12:48:39 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A42E310656B6; Mon, 1 Dec 2008 12:48:39 +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 6607B1065690 for ; Mon, 1 Dec 2008 12:48:39 +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 4EFF68FC08 for ; Mon, 1 Dec 2008 12:48:39 +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 mB1CmdAq051533 for ; Mon, 1 Dec 2008 12:48:39 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 mB1CmdGI051529 for perforce@freebsd.org; Mon, 1 Dec 2008 12:48:39 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Mon, 1 Dec 2008 12:48:39 GMT Message-Id: <200812011248.mB1CmdGI051529@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 153884 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, 01 Dec 2008 12:48:40 -0000 http://perforce.freebsd.org/chv.cgi?CH=153884 Change 153884 by rwatson@rwatson_cinnamon_macosx on 2008/12/01 12:48:32 Don't put au_to_zonename() in the middle of the execve-related token functions, as it makes the ifdefs more complicated when merging new OpenBSM parts to the FreeBSD and Mac OS X kernels. Affected files ... .. //depot/projects/trustedbsd/openbsm/libbsm/bsm_token.c#78 edit Differences ... ==== //depot/projects/trustedbsd/openbsm/libbsm/bsm_token.c#78 (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#77 $ + * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_token.c#78 $ */ #include @@ -1223,29 +1223,6 @@ } /* - * token ID 1 byte - * zonename length 2 bytes - * zonename N bytes + 1 terminating NULL byte - */ -token_t * -au_to_zonename(const char *zonename) -{ - u_char *dptr = NULL; - u_int16_t textlen; - token_t *t; - - textlen = strlen(zonename) + 1; - GET_TOKEN_AREA(t, dptr, sizeof(u_char) + sizeof(u_int16_t) + textlen); - if (t == NULL) - return (NULL); - - ADD_U_CHAR(dptr, AUT_ZONENAME); - ADD_U_INT16(dptr, textlen); - ADD_STRING(dptr, zonename, textlen); - return (t); -} - -/* * token ID 1 byte * count 4 bytes * text count null-terminated strings @@ -1287,6 +1264,29 @@ /* * token ID 1 byte + * zonename length 2 bytes + * zonename N bytes + 1 terminating NULL byte + */ +token_t * +au_to_zonename(const char *zonename) +{ + u_char *dptr = NULL; + u_int16_t textlen; + token_t *t; + + textlen = strlen(zonename) + 1; + GET_TOKEN_AREA(t, dptr, sizeof(u_char) + sizeof(u_int16_t) + textlen); + if (t == NULL) + return (NULL); + + ADD_U_CHAR(dptr, AUT_ZONENAME); + ADD_U_INT16(dptr, textlen); + ADD_STRING(dptr, zonename, textlen); + return (t); +} + +/* + * token ID 1 byte * record byte count 4 bytes * version # 1 byte [2] * event type 2 bytes