PERFORCE change 181970 for review

Efstratios Karatzas gpf at FreeBSD.org
Fri Aug 6 18:11:39 UTC 2010


http://p4web.freebsd.org/@@181970?ac=10

Change 181970 by gpf at gpf_desktop on 2010/08/06 18:10:43

	- extended the 'bsm_errnos' array to include error codes & messages specific 
	to NFS RPCs.
	- now, libbsm is able to print those messages via au_strerror(3)
	instead of using strerror(3) which will fail anyway.
	- I've documented my changes to au_strerror(3) & praudit(1) in the relative 
	man pages.
	- fixed minor bug I introduced to praudit.
	
	Tested and everything seems to be working fine.

Affected files ...

.. //depot/projects/soc2010/gpf_audit/freebsd/src/contrib/openbsm/bin/praudit/praudit.1#2 edit
.. //depot/projects/soc2010/gpf_audit/freebsd/src/contrib/openbsm/bin/praudit/praudit.c#5 edit
.. //depot/projects/soc2010/gpf_audit/freebsd/src/contrib/openbsm/bsm/libbsm.h#3 edit
.. //depot/projects/soc2010/gpf_audit/freebsd/src/contrib/openbsm/libbsm/au_errno.3#2 edit
.. //depot/projects/soc2010/gpf_audit/freebsd/src/contrib/openbsm/libbsm/bsm_errno.c#2 edit
.. //depot/projects/soc2010/gpf_audit/freebsd/src/contrib/openbsm/libbsm/bsm_io.c#3 edit
.. //depot/projects/soc2010/gpf_audit/freebsd/src/contrib/openbsm/sys/bsm/audit_errno.h#2 edit
.. //depot/projects/soc2010/gpf_audit/freebsd/src/contrib/openbsm/sys/bsm/audit_record.h#2 edit
.. //depot/projects/soc2010/gpf_audit/freebsd/src/sys/bsm/audit_errno.h#2 edit
.. //depot/projects/soc2010/gpf_audit/freebsd/src/sys/bsm/audit_record.h#2 edit
.. //depot/projects/soc2010/gpf_audit/freebsd/src/sys/security/audit/audit_bsm.c#20 edit
.. //depot/projects/soc2010/gpf_audit/freebsd/src/sys/security/audit/audit_bsm_errno.c#2 edit
.. //depot/projects/soc2010/gpf_audit/freebsd/src/sys/security/audit/audit_bsm_token.c#2 edit

Differences ...

==== //depot/projects/soc2010/gpf_audit/freebsd/src/contrib/openbsm/bin/praudit/praudit.1#2 (text) ====

@@ -77,6 +77,9 @@
 record and event type are displayed.
 This option is exclusive from
 .Fl r .
+.It Fl c
+Don't map user credentials to the local base system and print them in raw, 
+numeric form instead. This option is useful when auditing NFS RPCs.
 .It Fl x
 Print audit records in the XML output format.
 .El

==== //depot/projects/soc2010/gpf_audit/freebsd/src/contrib/openbsm/bin/praudit/praudit.c#5 (text) ====

@@ -120,7 +120,7 @@
 	int i;
 	FILE *fp;
 
-	while ((ch = getopt(argc, argv, "d:lprsx")) != -1) {
+	while ((ch = getopt(argc, argv, "d:lprcsx")) != -1) {
 		switch(ch) {
 		case 'c':
 			rawcred = 1;

==== //depot/projects/soc2010/gpf_audit/freebsd/src/contrib/openbsm/bsm/libbsm.h#3 (text) ====

@@ -503,16 +503,16 @@
 } au_proc64ex_t;
 
 /*
- * error status            1 byte
+ * error status            4 byte
  * return value            4 bytes/8 bytes (32-bit/64-bit value)
  */
 typedef struct {
-	u_char		status;
+	u_int32_t	status;
 	u_int32_t	ret;
 } au_ret32_t;
 
 typedef struct {
-	u_char		err;
+	u_int32_t	err;
 	u_int64_t	val;
 } au_ret64_t;
 
@@ -836,16 +836,16 @@
  * the FreeBSD and Mac OS X kernels)
  */
 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_errno(int bsm_error, int *errorp);
 int	 au_bsm_to_fcntl_cmd(u_short bsm_fcntl_cmd, int *local_fcntl_cmdp);
 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);
+int	 au_errno_to_bsm(int local_errno);
 u_short	 au_fcntl_cmd_to_bsm(int local_fcntl_command); 
 u_short	 au_socket_type_to_bsm(int local_socket_type);
 
-const char	 *au_strerror(u_char bsm_error);
+const char	 *au_strerror(int bsm_error);
 __END_DECLS
 
 /*

==== //depot/projects/soc2010/gpf_audit/freebsd/src/contrib/openbsm/libbsm/au_errno.3#2 (text) ====

@@ -77,7 +77,11 @@
 function converts a BSM error value to a string, generally by converting first to a
 local error number and using the local
 .Xr strerror 3
-function, but will also work for errors that are not locally defined.
+function, but will also work for errors that are not locally defined. It will also 
+work for BSM errors limited to specific kernel modules that cannot be serviced 
+by
+.Xr strerror 3 ,
+such as NFSv4 error values.
 .Sh RETURN VALULES
 On success,
 .Fn au_bsm_to_errno

==== //depot/projects/soc2010/gpf_audit/freebsd/src/contrib/openbsm/libbsm/bsm_errno.c#2 (text) ====

@@ -31,6 +31,8 @@
 
 #include <sys/types.h>
 
+#include <fs/nfs/nfsproto.h>
+
 #include <config/config.h>
 
 #include <bsm/audit_errno.h>
@@ -43,17 +45,17 @@
  * Different operating systems use different numeric constants for different
  * error numbers, and sometimes error numbers don't exist in more than one
  * 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.
+ * number spaces, subject to the above realities.
  *
  * Don't include string definitions when this code is compiled into a kernel.
  */
 struct bsm_errno {
 	int		 be_bsm_errno;
 	int		 be_local_errno;
+	char		 be_use_strerror;
 #if !defined(KERNEL) && !defined(_KERNEL)
 	const char	*be_strerror;
-#endif
+#endif	
 };
 
 #define	ERRNO_NO_LOCAL_MAPPING	-600
@@ -80,610 +82,953 @@
  * string using strerror(3).
  */
 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_ESUCCESS, 0, 1, ES("Success") },
+	{ BSM_ERRNO_EPERM, EPERM, 1, ES("Operation not permitted") },
+	{ BSM_ERRNO_ENOENT, ENOENT, 1, ES("No such file or directory") },
+	{ BSM_ERRNO_ESRCH, ESRCH, 1, ES("No such process") },
+	{ BSM_ERRNO_EINTR, EINTR, 1, ES("Interrupted system call") },
+	{ BSM_ERRNO_EIO, EIO, 1, ES("Input/output error") },
+	{ BSM_ERRNO_ENXIO, ENXIO, 1, ES("Device not configured") },
+	{ BSM_ERRNO_E2BIG, E2BIG, 1, ES("Argument list too long") },
+	{ BSM_ERRNO_ENOEXEC, ENOEXEC, 1, ES("Exec format error") },
+	{ BSM_ERRNO_EBADF, EBADF, 1, ES("Bad file descriptor") },
+	{ BSM_ERRNO_ECHILD, ECHILD, 1, ES("No child processes") },
+	{ BSM_ERRNO_EAGAIN, EAGAIN, 1, ES("Resource temporarily unavailable") },
+	{ BSM_ERRNO_ENOMEM, ENOMEM, 1, ES("Cannot allocate memory") },
+	{ BSM_ERRNO_EACCES, EACCES, 1, ES("Permission denied") },
+	{ BSM_ERRNO_EFAULT, EFAULT, 1, ES("Bad address") },
+	{ BSM_ERRNO_ENOTBLK, ENOTBLK, 1, ES("Block device required") },
+	{ BSM_ERRNO_EBUSY, EBUSY, 1, ES("Device busy") },
+	{ BSM_ERRNO_EEXIST, EEXIST, 1, ES("File exists") },
+	{ BSM_ERRNO_EXDEV, EXDEV, 1, ES("Cross-device link") },
+	{ BSM_ERRNO_ENODEV, ENODEV, 1, ES("Operation not supported by device") },
+	{ BSM_ERRNO_ENOTDIR, ENOTDIR, 1, ES("Not a directory") },
+	{ BSM_ERRNO_EISDIR, EISDIR, 1, ES("Is a directory") },
+	{ BSM_ERRNO_EINVAL, EINVAL, 1, ES("Invalid argument") },
+	{ BSM_ERRNO_ENFILE, ENFILE, 1, ES("Too many open files in system") },
+	{ BSM_ERRNO_EMFILE, EMFILE, 1, ES("Too many open files") },
+	{ BSM_ERRNO_ENOTTY, ENOTTY, 1, ES("Inappropriate ioctl for device") },
+	{ BSM_ERRNO_ETXTBSY, ETXTBSY, 1, ES("Text file busy") },
+	{ BSM_ERRNO_EFBIG, EFBIG, 1, ES("File too large") },
+	{ BSM_ERRNO_ENOSPC, ENOSPC, 1, ES("No space left on device") },
+	{ BSM_ERRNO_ESPIPE, ESPIPE, 1, ES("Illegal seek") },
+	{ BSM_ERRNO_EROFS, EROFS, 1, ES("Read-only file system") },
+	{ BSM_ERRNO_EMLINK, EMLINK, 1, ES("Too many links") },
+	{ BSM_ERRNO_EPIPE, EPIPE, 1, ES("Broken pipe") },
+	{ BSM_ERRNO_EDOM, EDOM, 1, ES("Numerical argument out of domain") },
+	{ BSM_ERRNO_ERANGE, ERANGE, 1, ES("Result too large") },
+	{ BSM_ERRNO_ENOMSG, ENOMSG, 1, ES("No message of desired type") },
+	{ BSM_ERRNO_EIDRM, EIDRM, 1, ES("Identifier removed") },
 	{ BSM_ERRNO_ECHRNG,
 #ifdef ECHRNG
 	ECHRNG,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("Channel number out of range") },
+	1, ES("Channel number out of range") },
 	{ BSM_ERRNO_EL2NSYNC,
 #ifdef EL2NSYNC
 	EL2NSYNC,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("Level 2 not synchronized") },
+	1, ES("Level 2 not synchronized") },
 	{ BSM_ERRNO_EL3HLT,
 #ifdef EL3HLT
 	EL3HLT,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("Level 3 halted") },
+	1, ES("Level 3 halted") },
 	{ BSM_ERRNO_EL3RST,
 #ifdef EL3RST
 	EL3RST,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("Level 3 reset") },
+	1, ES("Level 3 reset") },
 	{ BSM_ERRNO_ELNRNG,
 #ifdef ELNRNG
 	ELNRNG,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("Link number out of range") },
+	1, ES("Link number out of range") },
 	{ BSM_ERRNO_EUNATCH,
 #ifdef EUNATCH
 	EUNATCH,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("Protocol driver not attached") },
+	1, ES("Protocol driver not attached") },
 	{ BSM_ERRNO_ENOCSI,
 #ifdef ENOCSI
 	ENOCSI,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("No CSI structure available") },
+	1, ES("No CSI structure available") },
 	{ BSM_ERRNO_EL2HLT,
 #ifdef EL2HLT
 	EL2HLT,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("Level 2 halted") },
-	{ BSM_ERRNO_EDEADLK, EDEADLK, ES("Resource deadlock avoided") },
-	{ BSM_ERRNO_ENOLCK, ENOLCK, ES("No locks available") },
-	{ BSM_ERRNO_ECANCELED, ECANCELED, ES("Operation canceled") },
-	{ BSM_ERRNO_ENOTSUP, ENOTSUP, ES("Operation not supported") },
-	{ BSM_ERRNO_EDQUOT, EDQUOT, ES("Disc quota exceeded") },
+	1, ES("Level 2 halted") },
+	{ BSM_ERRNO_EDEADLK, EDEADLK, 1, ES("Resource deadlock avoided") },
+	{ BSM_ERRNO_ENOLCK, ENOLCK, 1, ES("No locks available") },
+	{ BSM_ERRNO_ECANCELED, ECANCELED, 1, ES("Operation canceled") },
+	{ BSM_ERRNO_ENOTSUP, ENOTSUP, 1, ES("Operation not supported") },
+	{ BSM_ERRNO_EDQUOT, EDQUOT, 1, ES("Disc quota exceeded") },
 	{ BSM_ERRNO_EBADE,
 #ifdef EBADE
 	EBADE,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("Invalid exchange") },
+	1, ES("Invalid exchange") },
 	{ BSM_ERRNO_EBADR,
 #ifdef EBADR
 	EBADR,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("Invalid request descriptor") },
+	1, ES("Invalid request descriptor") },
 	{ BSM_ERRNO_EXFULL,
 #ifdef EXFULL
 	EXFULL,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("Exchange full") },
+	1, ES("Exchange full") },
 	{ BSM_ERRNO_ENOANO,
 #ifdef ENOANO
 	ENOANO,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("No anode") },
+	1, ES("No anode") },
 	{ BSM_ERRNO_EBADRQC,
 #ifdef EBADRQC
 	EBADRQC,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("Invalid request descriptor") },
+	1, ES("Invalid request descriptor") },
 	{ BSM_ERRNO_EBADSLT,
 #ifdef EBADSLT
 	EBADSLT,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("Invalid slot") },
+	1, ES("Invalid slot") },
 	{ BSM_ERRNO_EDEADLOCK,
 #ifdef EDEADLOCK
 	EDEADLOCK,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("Resource deadlock avoided") },
+	1, ES("Resource deadlock avoided") },
 	{ BSM_ERRNO_EBFONT,
 #ifdef EBFONT
 	EBFONT,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("Bad font file format") },
+	1, ES("Bad font file format") },
 	{ BSM_ERRNO_EOWNERDEAD,
 #ifdef EOWNERDEAD
 	EOWNERDEAD,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("Process died with the lock") },
+	1, ES("Process died with the lock") },
 	{ BSM_ERRNO_ENOTRECOVERABLE,
 #ifdef ENOTRECOVERABLE
 	ENOTRECOVERABLE,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("Lock is not recoverable") },
+	1, ES("Lock is not recoverable") },
 	{ BSM_ERRNO_ENOSTR,
 #ifdef ENOSTR
 	ENOSTR,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("Device not a stream") },
+	1, ES("Device not a stream") },
 	{ BSM_ERRNO_ENONET,
 #ifdef ENONET
 	ENONET,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("Machine is not on the network") },
+	1, ES("Machine is not on the network") },
 	{ BSM_ERRNO_ENOPKG,
 #ifdef ENOPKG
 	ENOPKG,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("Package not installed") },
+	1, ES("Package not installed") },
 	{ BSM_ERRNO_EREMOTE, EREMOTE,
-	    ES("Too many levels of remote in path") },
+	    1, ES("Too many levels of remote in path") },
 	{ BSM_ERRNO_ENOLINK,
 #ifdef ENOLINK
 	ENOLINK,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("Link has been severed") },
+	1, ES("Link has been severed") },
 	{ BSM_ERRNO_EADV,
 #ifdef EADV
 	EADV,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("Advertise error") },
+	1, ES("Advertise error") },
 	{ BSM_ERRNO_ESRMNT,
 #ifdef ESRMNT
 	ESRMNT,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("srmount error") },
+	1, ES("srmount error") },
 	{ BSM_ERRNO_ECOMM,
 #ifdef ECOMM
 	ECOMM,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("Communication error on send") },
+	1, ES("Communication error on send") },
 	{ BSM_ERRNO_EPROTO,
 #ifdef EPROTO
 	EPROTO,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("Protocol error") },
+	1, ES("Protocol error") },
 	{ BSM_ERRNO_ELOCKUNMAPPED,
 #ifdef ELOCKUNMAPPED
 	ELOCKUNMAPPED,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("Locked lock was unmapped") },
+	1, ES("Locked lock was unmapped") },
 	{ BSM_ERRNO_ENOTACTIVE,
 #ifdef ENOTACTIVE
 	ENOTACTIVE,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("Facility is not active") },
+	1, ES("Facility is not active") },
 	{ BSM_ERRNO_EMULTIHOP,
 #ifdef EMULTIHOP
 	EMULTIHOP,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("Multihop attempted") },
+	1, ES("Multihop attempted") },
 	{ BSM_ERRNO_EBADMSG,
 #ifdef EBADMSG
 	EBADMSG,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("Bad message") },
-	{ BSM_ERRNO_ENAMETOOLONG, ENAMETOOLONG, ES("File name too long") },
+	1, ES("Bad message") },
+	{ BSM_ERRNO_ENAMETOOLONG, ENAMETOOLONG, 1, ES("File name too long") },
 	{ BSM_ERRNO_EOVERFLOW, EOVERFLOW,
-	    ES("Value too large to be stored in data type") },
+	    1, ES("Value too large to be stored in data type") },
 	{ BSM_ERRNO_ENOTUNIQ,
 #ifdef ENOTUNIQ
 	ENOTUNIQ,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("Given log name not unique") },
+	1, ES("Given log name not unique") },
 	{ BSM_ERRNO_EBADFD,
 #ifdef EBADFD
 	EBADFD,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("Given f.d. invalid for this operation") },
+	1, ES("Given f.d. invalid for this operation") },
 	{ BSM_ERRNO_EREMCHG,
 #ifdef EREMCHG
 	EREMCHG,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("Remote address changed") },
+	1, ES("Remote address changed") },
 	{ BSM_ERRNO_ELIBACC,
 #ifdef ELIBACC
 	ELIBACC,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("Can't access a needed shared lib") },
+	1, ES("Can't access a needed shared lib") },
 	{ BSM_ERRNO_ELIBBAD,
 #ifdef ELIBBAD
 	ELIBBAD,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("Accessing a corrupted shared lib") },
+	1, ES("Accessing a corrupted shared lib") },
 	{ BSM_ERRNO_ELIBSCN,
 #ifdef ELIBSCN
 	ELIBSCN,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES(".lib section in a.out corrupted") },
+	1, ES(".lib section in a.out corrupted") },
 	{ BSM_ERRNO_ELIBMAX,
 #ifdef ELIBMAX
 	ELIBMAX,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("Attempting to link in too many libs") },
+	1, ES("Attempting to link in too many libs") },
 	{ BSM_ERRNO_ELIBEXEC,
 #ifdef ELIBEXEC
 	ELIBEXEC,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("Attempting to exec a shared library") },
-	{ BSM_ERRNO_EILSEQ, EILSEQ, ES("Illegal byte sequence") },
-	{ BSM_ERRNO_ENOSYS, ENOSYS, ES("Function not implemented") },
-	{ BSM_ERRNO_ELOOP, ELOOP, ES("Too many levels of symbolic links") },
+	1, ES("Attempting to exec a shared library") },
+	{ BSM_ERRNO_EILSEQ, EILSEQ, 1, ES("Illegal byte sequence") },
+	{ BSM_ERRNO_ENOSYS, ENOSYS, 1, ES("Function not implemented") },
+	{ BSM_ERRNO_ELOOP, ELOOP, 1, ES("Too many levels of symbolic links") },
 	{ BSM_ERRNO_ERESTART,
 #ifdef ERESTART
 	ERESTART,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("Restart syscall") },
+	1, ES("Restart syscall") },
 	{ BSM_ERRNO_ESTRPIPE,
 #ifdef ESTRPIPE
 	ESTRPIPE,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("If pipe/FIFO, don't sleep in stream head") },
-	{ BSM_ERRNO_ENOTEMPTY, ENOTEMPTY, ES("Directory not empty") },
-	{ BSM_ERRNO_EUSERS, EUSERS, ES("Too many users") },
+	1, ES("If pipe/FIFO, don't sleep in stream head") },
+	{ BSM_ERRNO_ENOTEMPTY, ENOTEMPTY, 1, ES("Directory not empty") },
+	{ BSM_ERRNO_EUSERS, EUSERS, 1, ES("Too many users") },
 	{ BSM_ERRNO_ENOTSOCK, ENOTSOCK,
-	    ES("Socket operation on non-socket") },
+	    1, ES("Socket operation on non-socket") },
 	{ BSM_ERRNO_EDESTADDRREQ, EDESTADDRREQ,
-	    ES("Destination address required") },
-	{ BSM_ERRNO_EMSGSIZE, EMSGSIZE, ES("Message too long") },
+	    1, ES("Destination address required") },
+	{ BSM_ERRNO_EMSGSIZE, EMSGSIZE, 1, ES("Message too long") },
 	{ BSM_ERRNO_EPROTOTYPE, EPROTOTYPE,
-	    ES("Protocol wrong type for socket") },
-	{ BSM_ERRNO_ENOPROTOOPT, ENOPROTOOPT, ES("Protocol not available") },
+	    1, ES("Protocol wrong type for socket") },
+	{ BSM_ERRNO_ENOPROTOOPT, ENOPROTOOPT, 1, ES("Protocol not available") },
 	{ BSM_ERRNO_EPROTONOSUPPORT, EPROTONOSUPPORT,
-	    ES("Protocol not supported") },
+	    1, ES("Protocol not supported") },
 	{ BSM_ERRNO_ESOCKTNOSUPPORT, ESOCKTNOSUPPORT,
-	    ES("Socket type not supported") },
-	{ BSM_ERRNO_EOPNOTSUPP, EOPNOTSUPP, ES("Operation not supported") },
+	    1, ES("Socket type not supported") },
+	{ BSM_ERRNO_EOPNOTSUPP, EOPNOTSUPP, 1, ES("Operation not supported") },
 	{ BSM_ERRNO_EPFNOSUPPORT, EPFNOSUPPORT,
-	    ES("Protocol family not supported") },
+	    1, ES("Protocol family not supported") },
 	{ BSM_ERRNO_EAFNOSUPPORT, EAFNOSUPPORT,
-	    ES("Address family not supported by protocol family") },
-	{ BSM_ERRNO_EADDRINUSE, EADDRINUSE, ES("Address already in use") },
+	    1, ES("Address family not supported by protocol family") },
+	{ BSM_ERRNO_EADDRINUSE, EADDRINUSE, 1, ES("Address already in use") },
 	{ BSM_ERRNO_EADDRNOTAVAIL, EADDRNOTAVAIL,
-	    ES("Can't assign requested address") },
-	{ BSM_ERRNO_ENETDOWN, ENETDOWN, ES("Network is down") },
+	    1, ES("Can't assign requested address") },
+	{ BSM_ERRNO_ENETDOWN, ENETDOWN, 1, ES("Network is down") },
 	{ BSM_ERRNO_ENETRESET, ENETRESET,
-	    ES("Network dropped connection on reset") },
+	    1, ES("Network dropped connection on reset") },
 	{ BSM_ERRNO_ECONNABORTED, ECONNABORTED,
-	    ES("Software caused connection abort") },
-	{ BSM_ERRNO_ECONNRESET, ECONNRESET, ES("Connection reset by peer") },
-	{ BSM_ERRNO_ENOBUFS, ENOBUFS, ES("No buffer space available") },
-	{ BSM_ERRNO_EISCONN, EISCONN, ES("Socket is already connected") },
-	{ BSM_ERRNO_ENOTCONN, ENOTCONN, ES("Socket is not connected") },
+	    1, ES("Software caused connection abort") },
+	{ BSM_ERRNO_ECONNRESET, ECONNRESET, 1, ES("Connection reset by peer") },
+	{ BSM_ERRNO_ENOBUFS, ENOBUFS, 1, ES("No buffer space available") },
+	{ BSM_ERRNO_EISCONN, EISCONN, 1, ES("Socket is already connected") },
+	{ BSM_ERRNO_ENOTCONN, ENOTCONN, 1, ES("Socket is not connected") },
 	{ BSM_ERRNO_ESHUTDOWN, ESHUTDOWN,
-	    ES("Can't send after socket shutdown") },
+	    1, ES("Can't send after socket shutdown") },
 	{ BSM_ERRNO_ETOOMANYREFS, ETOOMANYREFS,
-	    ES("Too many references: can't splice") },
-	{ BSM_ERRNO_ETIMEDOUT, ETIMEDOUT, ES("Operation timed out") },
-	{ BSM_ERRNO_ECONNREFUSED, ECONNREFUSED, ES("Connection refused") },
-	{ BSM_ERRNO_EHOSTDOWN, EHOSTDOWN, ES("Host is down") },
-	{ BSM_ERRNO_EHOSTUNREACH, EHOSTUNREACH, ES("No route to host") },
-	{ BSM_ERRNO_EALREADY, EALREADY, ES("Operation already in progress") },
+	    1, ES("Too many references: can't splice") },
+	{ BSM_ERRNO_ETIMEDOUT, ETIMEDOUT, 1, ES("Operation timed out") },
+	{ BSM_ERRNO_ECONNREFUSED, ECONNREFUSED, 1, ES("Connection refused") },
+	{ BSM_ERRNO_EHOSTDOWN, EHOSTDOWN, 1, ES("Host is down") },
+	{ BSM_ERRNO_EHOSTUNREACH, EHOSTUNREACH, 1, ES("No route to host") },
+	{ BSM_ERRNO_EALREADY, EALREADY, 1, ES("Operation already in progress") },
 	{ BSM_ERRNO_EINPROGRESS, EINPROGRESS,
-	    ES("Operation now in progress") },
-	{ BSM_ERRNO_ESTALE, ESTALE, ES("Stale NFS file handle") },
+	    1, ES("Operation now in progress") },
+	{ BSM_ERRNO_ESTALE, ESTALE, 1, ES("Stale NFS file handle") },
 	{ BSM_ERRNO_EPROCLIM,
 #ifdef EPROCLIM
 	EPROCLIM,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("Too many processes") },
+	1, ES("Too many processes") },
 	{ BSM_ERRNO_EBADRPC,
 #ifdef EBADRPC
 	EBADRPC,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("RPC struct is bad") },
+	1, ES("RPC struct is bad") },
 	{ BSM_ERRNO_ERPCMISMATCH,
 #ifdef ERPCMISMATCH
 	ERPCMISMATCH,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("RPC version wrong") },
+	1, ES("RPC version wrong") },
 	{ BSM_ERRNO_EPROGUNAVAIL,
 #ifdef EPROGUNAVAIL
 	EPROGUNAVAIL,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("RPC prog. not avail") },
+	1, ES("RPC prog. not avail") },
 	{ BSM_ERRNO_EPROGMISMATCH,
 #ifdef EPROGMISMATCH
 	EPROGMISMATCH,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("RPC version wrong") },
+	1, ES("RPC version wrong") },
 	{ BSM_ERRNO_EPROCUNAVAIL,
 #ifdef EPROCUNAVAIL
 	EPROCUNAVAIL,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("Bad procedure for program") },
+	1, ES("Bad procedure for program") },
 	{ BSM_ERRNO_EFTYPE,
 #ifdef EFTYPE
 	EFTYPE,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("Inappropriate file type or format") },
+	1, ES("Inappropriate file type or format") },
 	{ BSM_ERRNO_EAUTH,
 #ifdef EAUTH
 	EAUTH,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("Authenticateion error") },
+	1, ES("Authenticateion error") },
 	{ BSM_ERRNO_ENEEDAUTH,
 #ifdef ENEEDAUTH
 	ENEEDAUTH,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("Need authenticator") },
+	1, ES("Need authenticator") },
 	{ BSM_ERRNO_ENOATTR,
 #ifdef ENOATTR
 	ENOATTR,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("Attribute not found") },
+	1, ES("Attribute not found") },
 	{ BSM_ERRNO_EDOOFUS,
 #ifdef EDOOFUS
 	EDOOFUS,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("Programming error") },
+	1, ES("Programming error") },
 	{ BSM_ERRNO_EJUSTRETURN,
 #ifdef EJUSTRETURN
 	EJUSTRETURN,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("Just return") },
+	1, ES("Just return") },
 	{ BSM_ERRNO_ENOIOCTL,
 #ifdef ENOIOCTL
 	ENOIOCTL,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("ioctl not handled by this layer") },
+	1, ES("ioctl not handled by this layer") },
 	{ BSM_ERRNO_EDIRIOCTL,
 #ifdef EDIRIOCTL
 	EDIRIOCTL,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("do direct ioctl in GEOM") },
+	1, ES("do direct ioctl in GEOM") },
 	{ BSM_ERRNO_EPWROFF,
 #ifdef EPWROFF
 	EPWROFF,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("Device power is off") },
+	1, ES("Device power is off") },
 	{ BSM_ERRNO_EDEVERR,
 #ifdef EDEVERR
 	EDEVERR,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("Device error") },
+	1, ES("Device error") },
 	{ BSM_ERRNO_EBADEXEC,
 #ifdef EBADEXEC
 	EBADEXEC,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("Bad executable") },
+	1, ES("Bad executable") },
 	{ BSM_ERRNO_EBADARCH,
 #ifdef EBADARCH
 	EBADARCH,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("Bad CPU type in executable") },
+	1, ES("Bad CPU type in executable") },
 	{ BSM_ERRNO_ESHLIBVERS,
 #ifdef ESHLIBVERS
 	ESHLIBVERS,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("Shared library version mismatch") },
+	1, ES("Shared library version mismatch") },
 	{ BSM_ERRNO_EBADMACHO,
 #ifdef EBADMACHO
 	EBADMACHO,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("Malformed Macho file") },
+	1, ES("Malformed Macho file") },
 	{ BSM_ERRNO_EPOLICY,
 #ifdef EPOLICY
 	EPOLICY,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("Operation failed by policy") },
+	1, ES("Operation failed by policy") },
 	{ BSM_ERRNO_EDOTDOT,
 #ifdef EDOTDOT
 	EDOTDOT,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("RFS specific error") },
+	1, ES("RFS specific error") },
 	{ BSM_ERRNO_EUCLEAN,
 #ifdef EUCLEAN
 	EUCLEAN,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("Structure needs cleaning") },
+	1, ES("Structure needs cleaning") },
 	{ BSM_ERRNO_ENOTNAM,
 #ifdef ENOTNAM
 	ENOTNAM,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("Not a XENIX named type file") },
+	1, ES("Not a XENIX named type file") },
 	{ BSM_ERRNO_ENAVAIL,
 #ifdef ENAVAIL
 	ENAVAIL,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("No XENIX semaphores available") },
+	1, ES("No XENIX semaphores available") },
 	{ BSM_ERRNO_EISNAM,
 #ifdef EISNAM
 	EISNAM,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("Is a named type file") },
+	1, ES("Is a named type file") },
 	{ BSM_ERRNO_EREMOTEIO,
 #ifdef EREMOTEIO
 	EREMOTEIO,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("Remote I/O error") },
+	1, ES("Remote I/O error") },
 	{ BSM_ERRNO_ENOMEDIUM,
 #ifdef ENOMEDIUM
 	ENOMEDIUM,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("No medium found") },
+	1, ES("No medium found") },
 	{ BSM_ERRNO_EMEDIUMTYPE,
 #ifdef EMEDIUMTYPE
 	EMEDIUMTYPE,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("Wrong medium type") },
+	1, ES("Wrong medium type") },
 	{ BSM_ERRNO_ENOKEY,
 #ifdef ENOKEY
 	ENOKEY,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("Required key not available") },
+	1, ES("Required key not available") },
 	{ BSM_ERRNO_EKEYEXPIRED,
 #ifdef EKEEXPIRED
 	EKEYEXPIRED,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("Key has expired") },
+	1, ES("Key has expired") },
 	{ BSM_ERRNO_EKEYREVOKED,
 #ifdef EKEYREVOKED
 	EKEYREVOKED,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("Key has been revoked") },
+	1, ES("Key has been revoked") },
 	{ BSM_ERRNO_EKEYREJECTED,
 #ifdef EKEREJECTED
 	EKEYREJECTED,
 #else
 	ERRNO_NO_LOCAL_MAPPING,
 #endif
-	ES("Key was rejected by service") },
+	1, ES("Key was rejected by service") },
+	{ BSM_NFS_ERRNO_WFLUSH,
+#ifdef NFSERR_WFLUSH
+	NFSERR_WFLUSH,
+#else
+	ERRNO_NO_LOCAL_MAPPING,
+#endif
+	0, ES("The server's write cache used in the WRITECACHE call got flushed to disk") },
+	{ BSM_NFS_ERRNO_BADHANDLE,
+#ifdef NFSERR_BADHANDLE
+	NFSERR_BADHANDLE,
+#else
+	ERRNO_NO_LOCAL_MAPPING,
+#endif
+	0, ES("Illegal NFS filehandle") },
+	{ BSM_NFS_ERRNO_NOT_SYNC,
+#ifdef NFSERR_NOT_SYNC
+	NFSERR_NOT_SYNC,
+#else
+	ERRNO_NO_LOCAL_MAPPING,
+#endif
+	0, ES("Update synchronization mismatch detected during a SETATTR operation") },
+	{ BSM_NFS_ERRNO_BAD_COOKIE,
+#ifdef NFSERR_BAD_COOKIE
+	NFSERR_BAD_COOKIE,
+#else
+	ERRNO_NO_LOCAL_MAPPING,
+#endif
+	0, ES("READDIR cookie is stale") },
+	{ BSM_NFS_ERRNO_NOTSUPP,
+#ifdef NFSERR_NOTSUPP
+	NFSERR_NOTSUPP,
+#else
+	ERRNO_NO_LOCAL_MAPPING,
+#endif
+	0, ES("Operation is not supported") },
+	{ BSM_NFS_ERRNO_TOOSMALL,
+#ifdef NFSERR_TOOSMALL
+	NFSERR_TOOSMALL,
+#else
+	ERRNO_NO_LOCAL_MAPPING,
+#endif
+	0, ES("Response to READDIR request exceeds the already set size limit") },
+	{ BSM_NFS_ERRNO_SERVERFAULT,
+#ifdef NFSERR_SERVERFAULT
+	NFSERR_SERVERFAULT,
+#else
+	ERRNO_NO_LOCAL_MAPPING,
+#endif
+	0, ES("Server side error that does not map to a protocol error value") },
+	{ BSM_NFS_ERRNO_BADTYPE,
+#ifdef NFSERR_BADTYPE
+	NFSERR_BADTYPE,
+#else
+	ERRNO_NO_LOCAL_MAPPING,
+#endif
+	0, ES("Server does not support creation of this type of object") },
+	{ BSM_NFS_ERRNO_DELAY,
+#ifdef NFSERR_DELAY
+	NFSERR_DELAY,
+#else
+	ERRNO_NO_LOCAL_MAPPING,
+#endif
+	0, ES("Operation was not completed in a timely fashion") },
+	{ BSM_NFS_ERRNO_SAME,
+#ifdef NFSERR_SAME
+	NFSERR_SAME,
+#else
+	ERRNO_NO_LOCAL_MAPPING,
+#endif
+	0, ES("The attributes compared were the same as in client's request") },
+	{ BSM_NFS_ERRNO_DENIED,
+#ifdef NFSERR_DENIED
+	NFSERR_DENIED,
+#else
+	ERRNO_NO_LOCAL_MAPPING,
+#endif
+	0, ES("An attempt to lock a file was denied") },
+	{ BSM_NFS_ERRNO_EXPIRED,
+#ifdef NFSERR_EXPIRED
+	NFSERR_EXPIRED,
+#else
+	ERRNO_NO_LOCAL_MAPPING,
+#endif
+	0, ES("Expired lease for the current operation") },
+	{ BSM_NFS_ERRNO_LOCKED,
+#ifdef NFSERR_LOCKED
+	NFSERR_LOCKED,
+#else
+	ERRNO_NO_LOCAL_MAPPING,
+#endif
+	0, ES("READ or WRITE operation attempted on a locked file") },
+	{ BSM_NFS_ERRNO_GRACE,
+#ifdef NFSERR_GRACE
+	NFSERR_GRACE,
+#else

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


More information about the p4-projects mailing list