Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Oct 2011 07:31:49 +0000 (UTC)
From:      Dag-Erling Smorgrav <des@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r226497 - head/sys/fs/portalfs
Message-ID:  <201110180731.p9I7Vnfg061830@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: des
Date: Tue Oct 18 07:31:49 2011
New Revision: 226497
URL: http://svn.freebsd.org/changeset/base/226497

Log:
  Trace attempts to open a portal device.
  
  Ceterum censeo portalfs esse delendam.

Modified:
  head/sys/fs/portalfs/portal_vnops.c

Modified: head/sys/fs/portalfs/portal_vnops.c
==============================================================================
--- head/sys/fs/portalfs/portal_vnops.c	Tue Oct 18 07:29:21 2011	(r226496)
+++ head/sys/fs/portalfs/portal_vnops.c	Tue Oct 18 07:31:49 2011	(r226497)
@@ -240,8 +240,13 @@ portal_open(ap)
 	 * This may require access to a global namespace (e.g. an IP address);
 	 * disallow it entirely, as we do open(2).
 	 */
-	if (IN_CAPABILITY_MODE(td))
+	if (IN_CAPABILITY_MODE(td)) {
+#ifdef KTRACE
+		if (KTRPOINT(td, KTR_CAPFAIL))
+			ktrcapfail(CAPFAIL_SYSCALL, 0, 0);
+#endif
 		return (ECAPMODE);
+	}
 #endif
 
 	/*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201110180731.p9I7Vnfg061830>