From 261d55f2225fec05267e5ee62e3c11518562b24f Mon Sep 17 00:00:00 2001 From: des Date: Tue, 18 Oct 2011 07:31:49 +0000 Subject: Trace attempts to open a portal device. Ceterum censeo portalfs esse delendam. --- sys/fs/portalfs/portal_vnops.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'sys/fs') diff --git a/sys/fs/portalfs/portal_vnops.c b/sys/fs/portalfs/portal_vnops.c index 7cd5267..f9ef08a 100644 --- a/sys/fs/portalfs/portal_vnops.c +++ b/sys/fs/portalfs/portal_vnops.c @@ -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 /* -- cgit v1.1