Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Dec 2008 12:48:39 GMT
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 153884 for review
Message-ID:  <200812011248.mB1CmdGI051529@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 <sys/types.h>
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200812011248.mB1CmdGI051529>