From owner-p4-projects@FreeBSD.ORG Wed Nov 12 16:31:41 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BDF51106579D; Wed, 12 Nov 2008 16:31:41 +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 80E461065799 for ; Wed, 12 Nov 2008 16:31:41 +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 766878FC18 for ; Wed, 12 Nov 2008 16:31:41 +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 mACGVfDt045713 for ; Wed, 12 Nov 2008 16:31:41 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 mACGVfT6045711 for perforce@freebsd.org; Wed, 12 Nov 2008 16:31:41 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Wed, 12 Nov 2008 16:31:41 GMT Message-Id: <200811121631.mACGVfT6045711@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 152873 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: Wed, 12 Nov 2008 16:31:42 -0000 http://perforce.freebsd.org/chv.cgi?CH=152873 Change 152873 by rwatson@rwatson_cinnamon on 2008/11/12 16:30:40 Define a new set of errno constants, BSM_E*, to represent the BSM error space. The first ~35 have identical values across most UNIX systems, the next ~120 we adopt the Solaris constants, and the final 15 are for error numbers defined in FreeBSD but not Solaris. Create a mapping table between local and BSM error constants, and two new functions that map between them. Always represent BSM constants in network byte order, as we do for the remainder of the BSM stream. (Possibly we should do the byte order conversion during token encoding and decoding instead). These functions aren't yet used, and there are some TODO items; for example, it would be nice to do something more mature than an O(1) walk of the mapping table. Sponsored by: Apple Inc. Affected files ... .. //depot/projects/trustedbsd/openbsm/libbsm/Makefile.am#6 edit .. //depot/projects/trustedbsd/openbsm/libbsm/Makefile.in#10 edit .. //depot/projects/trustedbsd/openbsm/libbsm/bsm_errno.c#1 add .. //depot/projects/trustedbsd/openbsm/sys/bsm/Makefile.am#2 edit .. //depot/projects/trustedbsd/openbsm/sys/bsm/Makefile.in#3 edit .. //depot/projects/trustedbsd/openbsm/sys/bsm/audit_errno.h#1 add Differences ... ==== //depot/projects/trustedbsd/openbsm/libbsm/Makefile.am#6 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $P4: //depot/projects/trustedbsd/openbsm/libbsm/Makefile.am#5 $ +# $P4: //depot/projects/trustedbsd/openbsm/libbsm/Makefile.am#6 $ # if USE_NATIVE_INCLUDES @@ -14,6 +14,7 @@ bsm_audit.c \ bsm_class.c \ bsm_control.c \ + bsm_errno.c \ bsm_event.c \ bsm_flags.c \ bsm_io.c \ ==== //depot/projects/trustedbsd/openbsm/libbsm/Makefile.in#10 (text+ko) ==== @@ -15,7 +15,7 @@ @SET_MAKE@ # -# $P4: //depot/projects/trustedbsd/openbsm/libbsm/Makefile.in#9 $ +# $P4: //depot/projects/trustedbsd/openbsm/libbsm/Makefile.in#10 $ # VPATH = @srcdir@ @@ -60,13 +60,13 @@ LTLIBRARIES = $(lib_LTLIBRARIES) libbsm_la_LIBADD = am__libbsm_la_SOURCES_DIST = bsm_audit.c bsm_class.c bsm_control.c \ - bsm_event.c bsm_flags.c bsm_io.c bsm_mask.c bsm_token.c \ - bsm_user.c bsm_notify.c bsm_wrappers.c + bsm_errno.c bsm_event.c bsm_flags.c bsm_io.c bsm_mask.c \ + bsm_token.c bsm_user.c bsm_notify.c bsm_wrappers.c @HAVE_AUDIT_SYSCALLS_TRUE@am__objects_1 = bsm_notify.lo \ @HAVE_AUDIT_SYSCALLS_TRUE@ bsm_wrappers.lo am_libbsm_la_OBJECTS = bsm_audit.lo bsm_class.lo bsm_control.lo \ - bsm_event.lo bsm_flags.lo bsm_io.lo bsm_mask.lo bsm_token.lo \ - bsm_user.lo $(am__objects_1) + bsm_errno.lo bsm_event.lo bsm_flags.lo bsm_io.lo bsm_mask.lo \ + bsm_token.lo bsm_user.lo $(am__objects_1) libbsm_la_OBJECTS = $(am_libbsm_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(top_builddir)/config@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/config/depcomp @@ -199,9 +199,9 @@ @USE_NATIVE_INCLUDES_FALSE@INCLUDES = -I$(top_builddir) -I$(top_srcdir) -I$(top_srcdir)/sys @USE_NATIVE_INCLUDES_TRUE@INCLUDES = -I$(top_builddir) -I$(top_srcdir) lib_LTLIBRARIES = libbsm.la -libbsm_la_SOURCES = bsm_audit.c bsm_class.c bsm_control.c bsm_event.c \ - bsm_flags.c bsm_io.c bsm_mask.c bsm_token.c bsm_user.c \ - $(am__append_1) +libbsm_la_SOURCES = bsm_audit.c bsm_class.c bsm_control.c bsm_errno.c \ + bsm_event.c bsm_flags.c bsm_io.c bsm_mask.c bsm_token.c \ + bsm_user.c $(am__append_1) man3_MANS = \ au_class.3 \ au_control.3 \ @@ -286,6 +286,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsm_audit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsm_class.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsm_control.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsm_errno.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsm_event.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsm_flags.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsm_io.Plo@am__quote@ ==== //depot/projects/trustedbsd/openbsm/sys/bsm/Makefile.am#2 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $P4: //depot/projects/trustedbsd/openbsm/sys/bsm/Makefile.am#1 $ +# $P4: //depot/projects/trustedbsd/openbsm/sys/bsm/Makefile.am#2 $ # @@ -8,6 +8,7 @@ openbsm_HEADERS = \ audit.h \ + audit_errno.h \ audit_internal.h \ audit_kevents.h \ audit_record.h ==== //depot/projects/trustedbsd/openbsm/sys/bsm/Makefile.in#3 (text+ko) ==== @@ -15,7 +15,7 @@ @SET_MAKE@ # -# $P4: //depot/projects/trustedbsd/openbsm/sys/bsm/Makefile.in#2 $ +# $P4: //depot/projects/trustedbsd/openbsm/sys/bsm/Makefile.in#3 $ # VPATH = @srcdir@ @@ -48,8 +48,8 @@ CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = -am__openbsm_HEADERS_DIST = audit.h audit_internal.h audit_kevents.h \ - audit_record.h +am__openbsm_HEADERS_DIST = audit.h audit_errno.h audit_internal.h \ + audit_kevents.h audit_record.h am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -173,6 +173,7 @@ @USE_NATIVE_INCLUDES_FALSE@openbsmdir = $(includedir)/bsm @USE_NATIVE_INCLUDES_FALSE@openbsm_HEADERS = \ @USE_NATIVE_INCLUDES_FALSE@ audit.h \ +@USE_NATIVE_INCLUDES_FALSE@ audit_errno.h \ @USE_NATIVE_INCLUDES_FALSE@ audit_internal.h \ @USE_NATIVE_INCLUDES_FALSE@ audit_kevents.h \ @USE_NATIVE_INCLUDES_FALSE@ audit_record.h