PERFORCE change 153884 for review
Robert Watson
rwatson at FreeBSD.org
Mon Dec 1 04:48:40 PST 2008
http://perforce.freebsd.org/chv.cgi?CH=153884
Change 153884 by rwatson at 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
More information about the p4-projects
mailing list