PERFORCE change 156157 for review

Robert Watson rwatson at FreeBSD.org
Wed Jan 14 05:37:10 PST 2009


http://perforce.freebsd.org/chv.cgi?CH=156157

Change 156157 by rwatson at rwatson_freebsd_capabilities on 2009/01/14 13:36:51

	Integrate TrustedBSD capabilities branch to pickup new OpenBSM.

Affected files ...

.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/INSTALL#2 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/NEWS#2 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/VERSION#3 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/bin/auditd/auditd.8#3 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/bin/auditd/auditd.c#3 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/bin/auditd/auditd_darwin.c#2 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/bin/auditd/auditd_fbsd.c#2 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/bin/auditreduce/auditreduce.c#3 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/bsm/auditd_lib.h#2 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/bsm/libbsm.h#3 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/configure#3 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/configure.ac#3 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/libauditd/Makefile.am#2 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/libauditd/Makefile.in#2 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/libauditd/auditd_lib.c#2 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/libauditd/libauditd.3#1 branch
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/libbsm/Makefile.am#3 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/libbsm/Makefile.in#3 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/libbsm/au_domain.3#1 branch
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/libbsm/au_socket_type.3#1 branch
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/libbsm/au_token.3#3 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/libbsm/bsm_audit.c#3 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/libbsm/bsm_domain.c#1 branch
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/libbsm/bsm_errno.c#2 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/libbsm/bsm_io.c#3 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/libbsm/bsm_socket_type.c#1 branch
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/libbsm/bsm_token.c#3 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/libbsm/libbsm.3#3 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/man/audit_user.5#3 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/sys/bsm/Makefile.am#2 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/sys/bsm/Makefile.in#2 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/sys/bsm/audit.h#2 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/sys/bsm/audit_domain.h#1 branch
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/sys/bsm/audit_errno.h#2 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/sys/bsm/audit_record.h#2 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/sys/bsm/audit_socket_type.h#1 branch
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/test/bsm/generate.c#3 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/test/reference/E2BIG_record#2 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/test/reference/EACCES_record#2 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/test/reference/EBADF_record#2 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/test/reference/EBUSY_record#2 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/test/reference/ECHILD_record#2 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/test/reference/EDEADLK_record#2 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/test/reference/EEXIST_record#2 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/test/reference/EFAULT_record#2 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/test/reference/EFBIG_record#2 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/test/reference/EINTR_record#2 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/test/reference/EINVAL_record#2 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/test/reference/EIO_record#2 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/test/reference/EISDIR_record#2 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/test/reference/EMFILE_record#2 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/test/reference/EMLINK_record#2 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/test/reference/ENFILE_record#2 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/test/reference/ENODEV_record#2 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/test/reference/ENOENT_record#2 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/test/reference/ENOEXEC_record#2 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/test/reference/ENOMEM_record#2 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/test/reference/ENOSPC_record#2 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/test/reference/ENOTBLK_record#2 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/test/reference/ENOTDIR_record#2 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/test/reference/ENOTTY_record#2 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/test/reference/ENXIO_record#2 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/test/reference/EPERM_record#2 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/test/reference/EPIPE_record#2 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/test/reference/EROFS_record#2 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/test/reference/ESPIPE_record#2 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/test/reference/ESRCH_record#2 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/test/reference/ETXTBSY_record#2 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/test/reference/EXDEV_record#2 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/test/reference/arg32_record#3 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/test/reference/data_record#3 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/test/reference/data_token#2 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/test/reference/file_record#3 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/test/reference/in_addr_record#3 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/test/reference/ip_record#3 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/test/reference/ipc_record#3 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/test/reference/iport_record#3 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/test/reference/opaque_record#3 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/test/reference/path_record#3 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/test/reference/process32_record#3 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/test/reference/process32ex_record-IPv4#3 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/test/reference/process32ex_record-IPv6#3 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/test/reference/process64_record#3 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/test/reference/process64ex_record-IPv4#3 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/test/reference/process64ex_record-IPv6#3 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/test/reference/return32_record#3 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/test/reference/seq_record#3 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/test/reference/socketex_record#2 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/test/reference/socketex_token#2 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/test/reference/subject32_record#3 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/test/reference/subject32ex_record#3 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/test/reference/text_record#3 integrate
.. //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/test/reference/zonename_record#3 integrate
.. //depot/projects/trustedbsd/capabilities/src/etc/periodic/weekly/Makefile#3 integrate
.. //depot/projects/trustedbsd/capabilities/src/lib/libbsm/Makefile#3 integrate
.. //depot/projects/trustedbsd/capabilities/src/sbin/fdisk/fdisk.c#4 integrate
.. //depot/projects/trustedbsd/capabilities/src/share/man/man4/ath.4#4 integrate
.. //depot/projects/trustedbsd/capabilities/src/sys/boot/common/load.c#2 delete
.. //depot/projects/trustedbsd/capabilities/src/sys/bsm/audit.h#4 integrate
.. //depot/projects/trustedbsd/capabilities/src/sys/bsm/audit_domain.h#1 branch
.. //depot/projects/trustedbsd/capabilities/src/sys/bsm/audit_errno.h#2 integrate
.. //depot/projects/trustedbsd/capabilities/src/sys/bsm/audit_internal.h#4 integrate
.. //depot/projects/trustedbsd/capabilities/src/sys/bsm/audit_kevents.h#5 integrate
.. //depot/projects/trustedbsd/capabilities/src/sys/bsm/audit_record.h#4 integrate
.. //depot/projects/trustedbsd/capabilities/src/sys/bsm/audit_socket_type.h#1 branch
.. //depot/projects/trustedbsd/capabilities/src/sys/conf/files#11 integrate
.. //depot/projects/trustedbsd/capabilities/src/sys/dev/bce/if_bce.c#5 integrate
.. //depot/projects/trustedbsd/capabilities/src/sys/dev/msk/if_msk.c#5 integrate
.. //depot/projects/trustedbsd/capabilities/src/sys/dev/msk/if_mskreg.h#4 integrate
.. //depot/projects/trustedbsd/capabilities/src/sys/dev/sound/pci/hda/hdac.c#5 integrate
.. //depot/projects/trustedbsd/capabilities/src/sys/fs/msdosfs/msdosfs_conv.c#2 integrate
.. //depot/projects/trustedbsd/capabilities/src/sys/security/audit/audit_bsm_domain.c#1 branch
.. //depot/projects/trustedbsd/capabilities/src/sys/security/audit/audit_bsm_errno.c#2 integrate
.. //depot/projects/trustedbsd/capabilities/src/sys/security/audit/audit_bsm_socket_type.c#1 branch
.. //depot/projects/trustedbsd/capabilities/src/sys/security/audit/audit_bsm_token.c#5 integrate
.. //depot/projects/trustedbsd/capabilities/src/usr.sbin/boot0cfg/boot0cfg.8#3 integrate

Differences ...

==== //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/INSTALL#2 (text) ====

@@ -9,6 +9,12 @@
     ./configure
     make
 
+If doing development work on OpenBSM with gcc, the following invocation of
+configure may be preferred in order to generate full compiler warnings and
+force the compile to fail if a warning is found:
+
+    CFLAGS="-Wall -Werror" ./configure
+
 To install, use:
 
     make install

==== //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/NEWS#2 (text) ====

@@ -1,5 +1,24 @@
 OpenBSM Version History
 
+OpenBSM 1.1 alpha 5
+
+- Stub libauditd(3) man page added.
+- All BSM error number constants with BSM_ERRNO_.
+- Interfaces to convert between local and BSM socket types and protocol
+  families have been added: au_bsm_to_domain(3), au_bsm_to_socket_type(3),
+  au_domain_to_bsm(3), and au_socket_type_to_bsm(3), along with definitions
+  of constants in audit_domain.h and audit_socket_type.h.  This improves
+  interoperability by converting local constant spaces, which vary by OS, to
+  and from Solaris constants (where available) or OpenBSM constants for
+  protocol domains not present in Solaris (a fair number).  These routines
+  should be used when generating and interpreting extended socket tokens.
+- Fix build warnings with full gcc warnings enabled on most supported
+  platforms.
+- Don't compile error strings into bsm_errno.c when building it in the kernel
+  environment.
+- When started by launchd, use the label com.apple.auditd rather than
+  org.trustedbsd.auditd.
+
 OpenBSM 1.1 alpha 4
 
 - With the addition of BSM error number mapping, we also need to map the
@@ -393,4 +412,4 @@
   to support reloading of kernel event table.
 - Allow comments in /etc/security configuration files.
 
-$P4: //depot/projects/trustedbsd/openbsm/NEWS#21 $
+$P4: //depot/projects/trustedbsd/openbsm/NEWS#27 $

==== //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/VERSION#3 (text) ====

@@ -1,1 +1,1 @@
-OPENBSM_1_1_ALPHA_4
+OPENBSM_1_1_ALPHA_5

==== //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/bin/auditd/auditd.8#3 (text) ====

@@ -25,7 +25,7 @@
 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.\" $P4: //depot/projects/trustedbsd/openbsm/bin/auditd/auditd.8#16 $
+.\" $P4: //depot/projects/trustedbsd/openbsm/bin/auditd/auditd.8#17 $
 .\"
 .Dd December 11, 2008
 .Dt AUDITD 8
@@ -115,6 +115,7 @@
 .Nm .
 .Sh SEE ALSO
 .Xr asl 3 ,
+.Xr libauditd 3 ,
 .Xr audit 4 ,
 .Xr audit_class 5 ,
 .Xr audit_control 5 ,

==== //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/bin/auditd/auditd.c#3 (text) ====

@@ -26,7 +26,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $P4: //depot/projects/trustedbsd/openbsm/bin/auditd/auditd.c#40 $
+ * $P4: //depot/projects/trustedbsd/openbsm/bin/auditd/auditd.c#41 $
  */
 
 #include <sys/types.h>
@@ -252,7 +252,7 @@
 	 */
 	err = auditd_read_dirs(audit_warn_soft, audit_warn_hard);
 	if (err) {
-		auditd_log_err("auditd_read_dirs() %s: %m",
+		auditd_log_err("auditd_read_dirs(): %s",
 		    auditd_strerror(err));
 		if (err == ADE_HARDLIM)
 			audit_warn_allhard();

==== //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/bin/auditd/auditd_darwin.c#2 (text) ====

@@ -26,7 +26,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $P4: //depot/projects/trustedbsd/openbsm/bin/auditd/auditd_darwin.c#2 $
+ * $P4: //depot/projects/trustedbsd/openbsm/bin/auditd/auditd_darwin.c#3 $
  */
 
 #include <sys/types.h>
@@ -83,7 +83,7 @@
 #endif /* __BSM_INTERNAL_NOTIFY_KEY */
 
 #ifndef	__AUDIT_LAUNCHD_LABEL
-#define	__AUDIT_LAUNCHD_LABEL		"org.trustedbsd.auditd"
+#define	__AUDIT_LAUNCHD_LABEL		"com.apple.auditd"
 #endif /* __AUDIT_LAUNCHD_LABEL */
 
 #define	MAX_MSG_SIZE	4096
@@ -100,7 +100,7 @@
 	if (debug)
 		opt = ASL_OPT_STDERR;
 
-	au_aslclient = asl_open("auditd", "org.trustedbsd.auditd", opt);
+	au_aslclient = asl_open("auditd", "com.apple.auditd", opt);
 	au_aslmsg = asl_new(ASL_TYPE_MSG); 
 
 #ifdef ASL_KEY_READ_UID

==== //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/bin/auditd/auditd_fbsd.c#2 (text) ====

@@ -26,7 +26,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $P4: //depot/projects/trustedbsd/openbsm/bin/auditd/auditd_fbsd.c#1 $
+ * $P4: //depot/projects/trustedbsd/openbsm/bin/auditd/auditd_fbsd.c#2 $
  */
 
 #include <sys/types.h>
@@ -35,9 +35,11 @@
 
 #include <errno.h>
 #include <fcntl.h>
+#include <stdarg.h>
 #include <signal.h>
+#include <string.h>
 #include <syslog.h>
-#include <stdarg.h>
+#include <unistd.h>
 
 #include <bsm/audit.h>
 #include <bsm/audit_uevents.h>

==== //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/bin/auditreduce/auditreduce.c#3 (text) ====

@@ -26,7 +26,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/bin/auditreduce/auditreduce.c#29 $
+ * $P4: //depot/projects/trustedbsd/openbsm/bin/auditreduce/auditreduce.c#31 $
  */
 
 /* 
@@ -41,6 +41,9 @@
  */ 
 
 #include <config/config.h>
+
+#define	_GNU_SOURCE		/* Required for strptime() on glibc2. */
+
 #ifdef HAVE_FULL_QUEUE_H
 #include <sys/queue.h>
 #else

==== //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/bsm/auditd_lib.h#2 (text) ====

@@ -26,7 +26,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/bsm/auditd_lib.h#2 $
+ * $P4: //depot/projects/trustedbsd/openbsm/bsm/auditd_lib.h#3 $
  */
 
 #ifndef _BSM_AUDITD_LIB_H_
@@ -57,7 +57,7 @@
  * Path of auditd plist file for launchd.
  */ 
 #define	AUDITD_PLIST_FILE 	\
-	    "/System/Library/LaunchDaemons/org.trustedbsd.auditd.plist"
+	    "/System/Library/LaunchDaemons/com.apple.auditd.plist"
 
 /*
  * Error return codes for auditd_lib functions.

==== //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/bsm/libbsm.h#3 (text) ====

@@ -26,7 +26,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/bsm/libbsm.h#40 $
+ * $P4: //depot/projects/trustedbsd/openbsm/bsm/libbsm.h#41 $
  */
 
 #ifndef _LIBBSM_H_
@@ -821,14 +821,22 @@
  */
 void			 au_print_xml_header(FILE *outfp);
 void			 au_print_xml_footer(FILE *outfp);
-__END_DECLS
 
 /*
- * Functions relating to BSM<->errno conversion.
+ * BSM library routines for converting between local and BSM constant spaces.
+ * (Note: some of these are replicated in audit_record.h for the benefit of
+ * the FreeBSD and Mac OS X kernels)
  */
-int			 au_bsm_to_errno(u_char bsm_error, int *errorp);
-u_char			 au_errno_to_bsm(int error);
-const char		*au_strerror(u_char bsm_error);
+int	 au_bsm_to_domain(u_short bsm_domain, int *local_domainp);
+int	 au_bsm_to_errno(u_char bsm_error, int *errorp);
+int	 au_bsm_to_socket_type(u_short bsm_socket_type,
+	    int *local_socket_typep);
+u_short	 au_domain_to_bsm(int local_domain);
+u_char	 au_errno_to_bsm(int local_errno);
+u_short	 au_socket_type_to_bsm(int local_socket_type);
+
+const char	 *au_strerror(u_char bsm_error);
+__END_DECLS
 
 /*
  * The remaining APIs are associated with Apple's BSM implementation, in

==== //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/configure#3 (text) ====

@@ -1,7 +1,7 @@
 #! /bin/sh
-# From configure.ac P4: //depot/projects/trustedbsd/openbsm/configure.ac#47 .
+# From configure.ac P4: //depot/projects/trustedbsd/openbsm/configure.ac#49 .
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for OpenBSM 1.1alpha4.
+# Generated by GNU Autoconf 2.61 for OpenBSM 1.1alpha5.
 #
 # Report bugs to <trustedbsd-audit at TrustesdBSD.org>.
 #
@@ -729,8 +729,8 @@
 # Identity of this package.
 PACKAGE_NAME='OpenBSM'
 PACKAGE_TARNAME='openbsm'
-PACKAGE_VERSION='1.1alpha4'
-PACKAGE_STRING='OpenBSM 1.1alpha4'
+PACKAGE_VERSION='1.1alpha5'
+PACKAGE_STRING='OpenBSM 1.1alpha5'
 PACKAGE_BUGREPORT='trustedbsd-audit at TrustesdBSD.org'
 
 ac_unique_file="bin/auditreduce/auditreduce.c"
@@ -1404,7 +1404,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures OpenBSM 1.1alpha4 to adapt to many kinds of systems.
+\`configure' configures OpenBSM 1.1alpha5 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1474,7 +1474,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of OpenBSM 1.1alpha4:";;
+     short | recursive ) echo "Configuration of OpenBSM 1.1alpha5:";;
    esac
   cat <<\_ACEOF
 
@@ -1580,7 +1580,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-OpenBSM configure 1.1alpha4
+OpenBSM configure 1.1alpha5
 generated by GNU Autoconf 2.61
 
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1594,7 +1594,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by OpenBSM $as_me 1.1alpha4, which was
+It was created by OpenBSM $as_me 1.1alpha5, which was
 generated by GNU Autoconf 2.61.  Invocation command line was
 
   $ $0 $@
@@ -19076,7 +19076,7 @@
 
 # Define the identity of the package.
  PACKAGE=OpenBSM
- VERSION=1.1alpha4
+ VERSION=1.1alpha5
 
 
 cat >>confdefs.h <<_ACEOF
@@ -23584,7 +23584,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by OpenBSM $as_me 1.1alpha4, which was
+This file was extended by OpenBSM $as_me 1.1alpha5, which was
 generated by GNU Autoconf 2.61.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -23637,7 +23637,7 @@
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF
 ac_cs_version="\\
-OpenBSM config.status 1.1alpha4
+OpenBSM config.status 1.1alpha5
 configured by $0, generated by GNU Autoconf 2.61,
   with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
 

==== //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/configure.ac#3 (text) ====

@@ -2,8 +2,8 @@
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ(2.59)
-AC_INIT([OpenBSM], [1.1alpha4], [trustedbsd-audit at TrustesdBSD.org],[openbsm])
-AC_REVISION([$P4: //depot/projects/trustedbsd/openbsm/configure.ac#48 $])
+AC_INIT([OpenBSM], [1.1alpha5], [trustedbsd-audit at TrustesdBSD.org],[openbsm])
+AC_REVISION([$P4: //depot/projects/trustedbsd/openbsm/configure.ac#49 $])
 AC_CONFIG_SRCDIR([bin/auditreduce/auditreduce.c])
 AC_CONFIG_AUX_DIR(config)
 AC_CONFIG_HEADER([config/config.h])

==== //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/libauditd/Makefile.am#2 (text) ====

@@ -1,5 +1,5 @@
 #
-# $P4: //depot/projects/trustedbsd/openbsm/libauditd/Makefile.am#1 $
+# $P4: //depot/projects/trustedbsd/openbsm/libauditd/Makefile.am#2 $
 #
 
 if USE_NATIVE_INCLUDES
@@ -13,5 +13,5 @@
 libauditd_la_SOURCES =	\
 	auditd_lib.c
 
-#man3_MANS =		\
-#	libauditd.3
+man3_MANS =		\
+	libauditd.3

==== //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/libauditd/Makefile.in#2 (text) ====

@@ -15,7 +15,7 @@
 @SET_MAKE@
 
 #
-# $P4: //depot/projects/trustedbsd/openbsm/libauditd/Makefile.in#1 $
+# $P4: //depot/projects/trustedbsd/openbsm/libauditd/Makefile.in#2 $
 #
 
 VPATH = @srcdir@
@@ -51,7 +51,7 @@
     *) f=$$p;; \
   esac;
 am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
-am__installdirs = "$(DESTDIR)$(libdir)"
+am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(man3dir)"
 libLTLIBRARIES_INSTALL = $(INSTALL)
 LTLIBRARIES = $(lib_LTLIBRARIES)
 libauditd_la_LIBADD =
@@ -71,6 +71,9 @@
 	$(LDFLAGS) -o $@
 SOURCES = $(libauditd_la_SOURCES)
 DIST_SOURCES = $(libauditd_la_SOURCES)
+man3dir = $(mandir)/man3
+NROFF = nroff
+MANS = $(man3_MANS)
 ETAGS = etags
 CTAGS = ctags
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -188,6 +191,9 @@
 libauditd_la_SOURCES = \
 	auditd_lib.c
 
+man3_MANS = \
+	libauditd.3
+
 all: all-am
 
 .SUFFIXES:
@@ -285,6 +291,51 @@
 
 clean-libtool:
 	-rm -rf .libs _libs
+install-man3: $(man3_MANS) $(man_MANS)
+	@$(NORMAL_INSTALL)
+	test -z "$(man3dir)" || $(MKDIR_P) "$(DESTDIR)$(man3dir)"
+	@list='$(man3_MANS) $(dist_man3_MANS) $(nodist_man3_MANS)'; \
+	l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
+	for i in $$l2; do \
+	  case "$$i" in \
+	    *.3*) list="$$list $$i" ;; \
+	  esac; \
+	done; \
+	for i in $$list; do \
+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
+	  else file=$$i; fi; \
+	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+	  case "$$ext" in \
+	    3*) ;; \
+	    *) ext='3' ;; \
+	  esac; \
+	  inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+	  inst=`echo $$inst | sed -e 's/^.*\///'`; \
+	  inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+	  echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \
+	  $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst"; \
+	done
+uninstall-man3:
+	@$(NORMAL_UNINSTALL)
+	@list='$(man3_MANS) $(dist_man3_MANS) $(nodist_man3_MANS)'; \
+	l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
+	for i in $$l2; do \
+	  case "$$i" in \
+	    *.3*) list="$$list $$i" ;; \
+	  esac; \
+	done; \
+	for i in $$list; do \
+	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+	  case "$$ext" in \
+	    3*) ;; \
+	    *) ext='3' ;; \
+	  esac; \
+	  inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+	  inst=`echo $$inst | sed -e 's/^.*\///'`; \
+	  inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+	  echo " rm -f '$(DESTDIR)$(man3dir)/$$inst'"; \
+	  rm -f "$(DESTDIR)$(man3dir)/$$inst"; \
+	done
 
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -362,9 +413,9 @@
 	done
 check-am: all-am
 check: check-am
-all-am: Makefile $(LTLIBRARIES)
+all-am: Makefile $(LTLIBRARIES) $(MANS)
 installdirs:
-	for dir in "$(DESTDIR)$(libdir)"; do \
+	for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(man3dir)"; do \
 	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
 	done
 install: install-am
@@ -412,7 +463,7 @@
 
 info-am:
 
-install-data-am:
+install-data-am: install-man
 
 install-dvi: install-dvi-am
 
@@ -422,7 +473,7 @@
 
 install-info: install-info-am
 
-install-man:
+install-man: install-man3
 
 install-pdf: install-pdf-am
 
@@ -448,7 +499,9 @@
 
 ps-am:
 
-uninstall-am: uninstall-libLTLIBRARIES
+uninstall-am: uninstall-libLTLIBRARIES uninstall-man
+
+uninstall-man: uninstall-man3
 
 .MAKE: install-am install-strip
 
@@ -459,16 +512,14 @@
 	install install-am install-data install-data-am install-dvi \
 	install-dvi-am install-exec install-exec-am install-html \
 	install-html-am install-info install-info-am \
-	install-libLTLIBRARIES install-man install-pdf install-pdf-am \
-	install-ps install-ps-am install-strip installcheck \
-	installcheck-am installdirs maintainer-clean \
+	install-libLTLIBRARIES install-man install-man3 install-pdf \
+	install-pdf-am install-ps install-ps-am install-strip \
+	installcheck installcheck-am installdirs maintainer-clean \
 	maintainer-clean-generic mostlyclean mostlyclean-compile \
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-	tags uninstall uninstall-am uninstall-libLTLIBRARIES
-
+	tags uninstall uninstall-am uninstall-libLTLIBRARIES \
+	uninstall-man uninstall-man3
 
-#man3_MANS =		\
-#	libauditd.3
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:

==== //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/libauditd/auditd_lib.c#2 (text) ====

@@ -26,7 +26,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/libauditd/auditd_lib.c#1 $
+ * $P4: //depot/projects/trustedbsd/openbsm/libauditd/auditd_lib.c#2 $
  */
 
 #include <sys/param.h>
@@ -823,7 +823,7 @@
 	 */
 	if (auditon(A_GETCOND, &cond, sizeof(cond)) < 0)
 		return (-1);
-	if (cond == AUC_DISABLED)
+	if (cond == AUC_NOAUDIT)
 		return (0);
 
 	/*

==== //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/libbsm/Makefile.am#3 (text) ====

@@ -1,5 +1,5 @@
 #
-# $P4: //depot/projects/trustedbsd/openbsm/libbsm/Makefile.am#7 $
+# $P4: //depot/projects/trustedbsd/openbsm/libbsm/Makefile.am#8 $
 #
 
 if USE_NATIVE_INCLUDES
@@ -14,11 +14,13 @@
 	bsm_audit.c	\
 	bsm_class.c	\
 	bsm_control.c	\
+	bsm_domain.c	\
 	bsm_errno.c	\
 	bsm_event.c	\
 	bsm_flags.c	\
 	bsm_io.c	\
 	bsm_mask.c	\
+	bsm_socket_type.c	\
 	bsm_token.c	\
 	bsm_user.c
 
@@ -31,12 +33,14 @@
 man3_MANS =		\
 	au_class.3	\
 	au_control.3	\
+	au_domain.3	\
 	au_errno.3	\
 	au_event.3	\
 	au_free_token.3	\
 	au_io.3		\
 	au_mask.3	\
 	au_open.3	\
+	au_socket_type.3	\
 	au_token.3	\
 	au_user.3	\
 	libbsm.3

==== //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/libbsm/Makefile.in#3 (text) ====

@@ -15,7 +15,7 @@
 @SET_MAKE@
 
 #
-# $P4: //depot/projects/trustedbsd/openbsm/libbsm/Makefile.in#12 $
+# $P4: //depot/projects/trustedbsd/openbsm/libbsm/Makefile.in#13 $
 #
 
 VPATH = @srcdir@
@@ -60,13 +60,15 @@
 LTLIBRARIES = $(lib_LTLIBRARIES)
 libbsm_la_LIBADD =
 am__libbsm_la_SOURCES_DIST = 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 bsm_notify.c bsm_wrappers.c
+	bsm_domain.c bsm_errno.c bsm_event.c bsm_flags.c bsm_io.c \
+	bsm_mask.c bsm_socket_type.c bsm_token.c bsm_user.c \
+	bsm_notify.c bsm_wrappers.c
 @HAVE_AUDIT_SYSCALLS_TRUE at 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_errno.lo bsm_event.lo bsm_flags.lo bsm_io.lo bsm_mask.lo \
-	bsm_token.lo bsm_user.lo $(am__objects_1)
+	bsm_domain.lo bsm_errno.lo bsm_event.lo bsm_flags.lo bsm_io.lo \
+	bsm_mask.lo bsm_socket_type.lo bsm_token.lo bsm_user.lo \
+	$(am__objects_1)
 libbsm_la_OBJECTS = $(am_libbsm_la_OBJECTS)
 DEFAULT_INCLUDES = -I. -I$(top_builddir)/config at am__isrc@
 depcomp = $(SHELL) $(top_srcdir)/config/depcomp
@@ -199,18 +201,20 @@
 @USE_NATIVE_INCLUDES_FALSE at INCLUDES = -I$(top_builddir) -I$(top_srcdir) -I$(top_srcdir)/sys
 @USE_NATIVE_INCLUDES_TRUE at INCLUDES = -I$(top_builddir) -I$(top_srcdir)
 lib_LTLIBRARIES = libbsm.la
-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)
+libbsm_la_SOURCES = bsm_audit.c bsm_class.c bsm_control.c bsm_domain.c \
+	bsm_errno.c bsm_event.c bsm_flags.c bsm_io.c bsm_mask.c \
+	bsm_socket_type.c bsm_token.c bsm_user.c $(am__append_1)
 man3_MANS = \
 	au_class.3	\
 	au_control.3	\
+	au_domain.3	\
 	au_errno.3	\
 	au_event.3	\
 	au_free_token.3	\
 	au_io.3		\
 	au_mask.3	\
 	au_open.3	\
+	au_socket_type.3	\
 	au_token.3	\
 	au_user.3	\
 	libbsm.3
@@ -287,12 +291,14 @@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bsm_audit.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bsm_class.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bsm_control.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bsm_domain.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bsm_errno.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bsm_event.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bsm_flags.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bsm_io.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bsm_mask.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bsm_notify.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bsm_socket_type.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bsm_token.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bsm_user.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bsm_wrappers.Plo at am__quote@

==== //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/libbsm/au_token.3#3 (text) ====

@@ -23,7 +23,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\" $P4: //depot/projects/trustedbsd/openbsm/libbsm/au_token.3#16 $
+.\" $P4: //depot/projects/trustedbsd/openbsm/libbsm/au_token.3#17 $
 .\"
 .Dd April 19, 2005
 .Dt AU_TOKEN 3
@@ -60,6 +60,7 @@
 .Nm au_to_sock_inet32 ,
 .Nm au_to_sock_inet128 ,
 .Nm au_to_sock_inet ,
+.Nm au_to_socket_ex ,
 .Nm au_to_subject32 ,
 .Nm au_to_subject64 ,
 .Nm au_to_subject ,
@@ -156,6 +157,8 @@
 .Ft "token_t *"
 .Fn au_to_sock_int "struct sockaddr_in *so"
 .Ft "token_t *"
+.Fn au_to_socket_ex "u_short so_domain" "u_short so_type" "struct sockaddr *sa_local" "struct sockaddr *sa_remote"
+.Ft "token_t *"
 .Fo au_to_subject32
 .Fa "au_id_t auid" "uid_t euid" "gid_t egid" "uid_t ruid"
 .Fa "gid_t rgid" "pid_t pid" "au_asid_t sid" "au_tid_t *tid"

==== //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/libbsm/bsm_audit.c#3 (text) ====

@@ -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_audit.c#34 $
+ * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_audit.c#35 $
  */
 
 #include <sys/types.h>
@@ -219,13 +219,16 @@
 static int
 au_assemble(au_record_t *rec, short event)
 {
+#ifdef HAVE_AUDIT_SYSCALLS
+	struct in6_addr *aptr;
+	struct auditinfo_addr aia;
+	struct timeval tm;
+	size_t hdrsize;
+#endif /* HAVE_AUDIT_SYSCALLS */
 	token_t *header, *tok, *trailer;
-	size_t tot_rec_size, hdrsize;
+	size_t tot_rec_size;
 	u_char *dptr;
-	struct in6_addr *aptr;
 	int error;
-	struct auditinfo_addr aia;
-	struct timeval tm;
 
 #ifdef HAVE_AUDIT_SYSCALLS
 	/*

==== //depot/projects/trustedbsd/capabilities/src/contrib/openbsm/libbsm/bsm_errno.c#2 (text) ====

@@ -26,7 +26,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_errno.c#12 $
+ * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_errno.c#16 $
  */
 
 #include <sys/types.h>
@@ -45,16 +45,25 @@
  * operating system.  These routines convert between BSM and local error
  * number spaces, subject to the above realities.  BSM error numbers are
  * stored in a single 8-bit character, so don't have a byte order.
+ *
+ * Don't include string definitions when this code is compiled into a kernel.
  */
-
-struct bsm_errors {
-	int		 be_bsm_error;
-	int		 be_os_error;
+struct bsm_errno {
+	int		 be_bsm_errno;
+	int		 be_local_errno;
+#if !defined(KERNEL) && !defined(_KERNEL)
 	const char	*be_strerror;
+#endif
 };
 
 #define	ERRNO_NO_LOCAL_MAPPING	-600
 
+#if !defined(KERNEL) && !defined(_KERNEL)
+#define	ES(x)	x
+#else
+#define	ES(x)
+#endif
+
 /*
  * Mapping table -- please maintain in numeric sorted order with respect to
  * the BSM constant.  Today we do a linear lookup, but could switch to a
@@ -70,523 +79,551 @@
  * support catalogues; these are only used if the OS doesn't have an error
  * string using strerror(3).
  */
-static const struct bsm_errors bsm_errors[] = {
-	{ BSM_ESUCCESS, 0, "Success" },
-	{ BSM_EPERM, EPERM, "Operation not permitted" },
-	{ BSM_ENOENT, ENOENT, "No such file or directory" },
-	{ BSM_ESRCH, ESRCH, "No such process" },
-	{ BSM_EINTR, EINTR, "Interrupted system call" },
-	{ BSM_EIO, EIO, "Input/output error" },
-	{ BSM_ENXIO, ENXIO, "Device not configured" },
-	{ BSM_E2BIG, E2BIG, "Argument list too long" },
-	{ BSM_ENOEXEC, ENOEXEC, "Exec format error" },
-	{ BSM_EBADF, EBADF, "BAd file descriptor" },
-	{ BSM_ECHILD, ECHILD, "No child processes" },
-	{ BSM_EAGAIN, EAGAIN, "Resource temporarily unavailable" },
-	{ BSM_ENOMEM, ENOMEM, "Cannot allocate memory" },
-	{ BSM_EACCES, EACCES, "Permission denied" },
-	{ BSM_EFAULT, EFAULT, "Bad address" },
-	{ BSM_ENOTBLK, ENOTBLK, "Block device required" },
-	{ BSM_EBUSY, EBUSY, "Device busy" },
-	{ BSM_EEXIST, EEXIST, "File exists" },
-	{ BSM_EXDEV, EXDEV, "Cross-device link" },
-	{ BSM_ENODEV, ENODEV, "Operation not supported by device" },
-	{ BSM_ENOTDIR, ENOTDIR, "Not a directory" },
-	{ BSM_EISDIR, EISDIR, "Is a directory" },
-	{ BSM_EINVAL, EINVAL, "Invalid argument" },
-	{ BSM_ENFILE, ENFILE, "Too many open files in system" },
-	{ BSM_EMFILE, EMFILE, "Too many open files" },
-	{ BSM_ENOTTY, ENOTTY, "Inappropriate ioctl for device" },
-	{ BSM_ETXTBSY, ETXTBSY, "Text file busy" },
-	{ BSM_EFBIG, EFBIG, "File too large" },
-	{ BSM_ENOSPC, ENOSPC, "No space left on device" },
-	{ BSM_ESPIPE, ESPIPE, "Illegal seek" },
-	{ BSM_EROFS, EROFS, "Read-only file system" },
-	{ BSM_EMLINK, EMLINK, "Too many links" },
-	{ BSM_EPIPE, EPIPE, "Broken pipe" },
-	{ BSM_EDOM, EDOM, "Numerical argument out of domain" },
-	{ BSM_ERANGE, ERANGE, "Result too large" },
-	{ BSM_ENOMSG, ENOMSG, "No message of desired type" },
-	{ BSM_EIDRM, EIDRM, "Identifier removed" },
-	{ BSM_ECHRNG,
+static const struct bsm_errno bsm_errnos[] = {
+	{ BSM_ERRNO_ESUCCESS, 0, ES("Success") },
+	{ BSM_ERRNO_EPERM, EPERM, ES("Operation not permitted") },
+	{ BSM_ERRNO_ENOENT, ENOENT, ES("No such file or directory") },
+	{ BSM_ERRNO_ESRCH, ESRCH, ES("No such process") },
+	{ BSM_ERRNO_EINTR, EINTR, ES("Interrupted system call") },
+	{ BSM_ERRNO_EIO, EIO, ES("Input/output error") },
+	{ BSM_ERRNO_ENXIO, ENXIO, ES("Device not configured") },
+	{ BSM_ERRNO_E2BIG, E2BIG, ES("Argument list too long") },
+	{ BSM_ERRNO_ENOEXEC, ENOEXEC, ES("Exec format error") },
+	{ BSM_ERRNO_EBADF, EBADF, ES("Bad file descriptor") },
+	{ BSM_ERRNO_ECHILD, ECHILD, ES("No child processes") },
+	{ BSM_ERRNO_EAGAIN, EAGAIN, ES("Resource temporarily unavailable") },
+	{ BSM_ERRNO_ENOMEM, ENOMEM, ES("Cannot allocate memory") },
+	{ BSM_ERRNO_EACCES, EACCES, ES("Permission denied") },
+	{ BSM_ERRNO_EFAULT, EFAULT, ES("Bad address") },
+	{ BSM_ERRNO_ENOTBLK, ENOTBLK, ES("Block device required") },
+	{ BSM_ERRNO_EBUSY, EBUSY, ES("Device busy") },
+	{ BSM_ERRNO_EEXIST, EEXIST, ES("File exists") },
+	{ BSM_ERRNO_EXDEV, EXDEV, ES("Cross-device link") },
+	{ BSM_ERRNO_ENODEV, ENODEV, ES("Operation not supported by device") },
+	{ BSM_ERRNO_ENOTDIR, ENOTDIR, ES("Not a directory") },
+	{ BSM_ERRNO_EISDIR, EISDIR, ES("Is a directory") },
+	{ BSM_ERRNO_EINVAL, EINVAL, ES("Invalid argument") },
+	{ BSM_ERRNO_ENFILE, ENFILE, ES("Too many open files in system") },
+	{ BSM_ERRNO_EMFILE, EMFILE, ES("Too many open files") },
+	{ BSM_ERRNO_ENOTTY, ENOTTY, ES("Inappropriate ioctl for device") },
+	{ BSM_ERRNO_ETXTBSY, ETXTBSY, ES("Text file busy") },
+	{ BSM_ERRNO_EFBIG, EFBIG, ES("File too large") },
+	{ BSM_ERRNO_ENOSPC, ENOSPC, ES("No space left on device") },
+	{ BSM_ERRNO_ESPIPE, ESPIPE, ES("Illegal seek") },
+	{ BSM_ERRNO_EROFS, EROFS, ES("Read-only file system") },
+	{ BSM_ERRNO_EMLINK, EMLINK, ES("Too many links") },
+	{ BSM_ERRNO_EPIPE, EPIPE, ES("Broken pipe") },
+	{ BSM_ERRNO_EDOM, EDOM, ES("Numerical argument out of domain") },
+	{ BSM_ERRNO_ERANGE, ERANGE, ES("Result too large") },
+	{ BSM_ERRNO_ENOMSG, ENOMSG, ES("No message of desired type") },
+	{ BSM_ERRNO_EIDRM, EIDRM, ES("Identifier removed") },
+	{ BSM_ERRNO_ECHRNG,
 #ifdef ECHRNG
 	ECHRNG,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	"Channel number out of range" },
-	{ BSM_EL2NSYNC,
+	ES("Channel number out of range") },
+	{ BSM_ERRNO_EL2NSYNC,
 #ifdef EL2NSYNC
 	EL2NSYNC,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	"Level 2 not synchronized" },
-	{ BSM_EL3HLT,
+	ES("Level 2 not synchronized") },
+	{ BSM_ERRNO_EL3HLT,
 #ifdef EL3HLT
 	EL3HLT,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	"Level 3 halted" },
-	{ BSM_EL3RST,
+	ES("Level 3 halted") },
+	{ BSM_ERRNO_EL3RST,
 #ifdef EL3RST
 	EL3RST,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	"Level 3 reset" },
-	{ BSM_ELNRNG,
+	ES("Level 3 reset") },
+	{ BSM_ERRNO_ELNRNG,
 #ifdef ELNRNG
 	ELNRNG,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	"Link number out of range" },
-	{ BSM_EUNATCH,
+	ES("Link number out of range") },
+	{ BSM_ERRNO_EUNATCH,
 #ifdef EUNATCH
 	EUNATCH,
 #else
 	ERRNO_NO_LOCAL_MAPPING,

>>> TRUNCATED FOR MAIL (1000 lines) <<<


More information about the p4-projects mailing list