From owner-svn-src-all@FreeBSD.ORG Wed Oct 7 20:20:52 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 77F93106568F; Wed, 7 Oct 2009 20:20:52 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4D9C88FC12; Wed, 7 Oct 2009 20:20:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n97KKqTL098340; Wed, 7 Oct 2009 20:20:52 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n97KKqPx098336; Wed, 7 Oct 2009 20:20:52 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200910072020.n97KKqPx098336@svn.freebsd.org> From: Robert Watson Date: Wed, 7 Oct 2009 20:20:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r197841 - in head: lib/libc/gen lib/libc/sys sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Oct 2009 20:20:52 -0000 Author: rwatson Date: Wed Oct 7 20:20:51 2009 New Revision: 197841 URL: http://svn.freebsd.org/changeset/base/197841 Log: 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. MFC after: 1 month Sponsored by: Google Modified: head/lib/libc/gen/errlst.c head/lib/libc/sys/intro.2 head/sys/sys/errno.h Modified: head/lib/libc/gen/errlst.c ============================================================================== --- head/lib/libc/gen/errlst.c Wed Oct 7 19:50:14 2009 (r197840) +++ head/lib/libc/gen/errlst.c Wed Oct 7 20:20:51 2009 (r197841) @@ -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: head/lib/libc/sys/intro.2 ============================================================================== --- head/lib/libc/sys/intro.2 Wed Oct 7 19:50:14 2009 (r197840) +++ head/lib/libc/sys/intro.2 Wed Oct 7 20:20:51 2009 (r197841) @@ -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: head/sys/sys/errno.h ============================================================================== --- head/sys/sys/errno.h Wed Oct 7 19:50:14 2009 (r197840) +++ head/sys/sys/errno.h Wed Oct 7 20:20:51 2009 (r197841) @@ -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