svn commit: r200511 - in stable/8: lib/libc/gen lib/libc/sys sys/sys

Robert Watson rwatson at FreeBSD.org
Mon Dec 14 05:13:44 PST 2009


Author: rwatson
Date: Mon Dec 14 13:13:43 2009
New Revision: 200511
URL: http://svn.freebsd.org/changeset/base/200511

Log:
  Merge r197841 from head to stable/8:
  
    Add a new errno, ENOTCAPABLE, to be returned when a process requests an
    operation on a file descriptor that is not authorized by the descriptor's
    capability flags.
  
    Sponsored by:	Google

Modified:
  stable/8/lib/libc/gen/errlst.c
  stable/8/lib/libc/sys/intro.2
  stable/8/sys/sys/errno.h
Directory Properties:
  stable/8/lib/libc/   (props changed)
  stable/8/lib/libc/stdtime/   (props changed)
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/lib/libc/gen/errlst.c
==============================================================================
--- stable/8/lib/libc/gen/errlst.c	Mon Dec 14 12:23:46 2009	(r200510)
+++ stable/8/lib/libc/gen/errlst.c	Mon Dec 14 13:13:43 2009	(r200511)
@@ -150,5 +150,6 @@ const char *const sys_errlist[] = {
 	"Multihop attempted",			/* 90 - EMULTIHOP */
 	"Link has been severed",		/* 91 - ENOLINK */
 	"Protocol error",			/* 92 - EPROTO */
+	"Capabilities insufficient",		/* 93 - ENOTCAPABLE */
 };
 const int sys_nerr = sizeof(sys_errlist) / sizeof(sys_errlist[0]);

Modified: stable/8/lib/libc/sys/intro.2
==============================================================================
--- stable/8/lib/libc/sys/intro.2	Mon Dec 14 12:23:46 2009	(r200510)
+++ stable/8/lib/libc/sys/intro.2	Mon Dec 14 13:13:43 2009	(r200511)
@@ -456,6 +456,9 @@ The specified extended attribute does no
 .It Er 88 EDOOFUS Em "Programming error" .
 A function or API is being abused in a way which could only be detected
 at run-time.
+.It Er 93 ENOTCAPABLE Em "Capabilities insufficient" .
+An operation on a capability file descriptor requires greater privilege than
+the capability allows.
 .El
 .Sh DEFINITIONS
 .Bl -tag -width Ds

Modified: stable/8/sys/sys/errno.h
==============================================================================
--- stable/8/sys/sys/errno.h	Mon Dec 14 12:23:46 2009	(r200510)
+++ stable/8/sys/sys/errno.h	Mon Dec 14 13:13:43 2009	(r200511)
@@ -174,7 +174,11 @@ __END_DECLS
 #define	EPROTO		92		/* Protocol error */
 
 #ifndef _POSIX_SOURCE
-#define	ELAST		92		/* Must be equal largest errno */
+#define	ENOTCAPABLE	93		/* Capabilities insufficient */
+#endif /* _POSIX_SOURCE */
+
+#ifndef _POSIX_SOURCE
+#define	ELAST		93		/* Must be equal largest errno */
 #endif /* _POSIX_SOURCE */
 
 #ifdef _KERNEL


More information about the svn-src-stable mailing list