From owner-p4-projects@FreeBSD.ORG Thu Aug 21 15:18:29 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D75971065674; Thu, 21 Aug 2008 15:18:28 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B497106567F for ; Thu, 21 Aug 2008 15:18:28 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 876118FC0A for ; Thu, 21 Aug 2008 15:18:28 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.2/8.14.2) with ESMTP id m7LFISLC047615 for ; Thu, 21 Aug 2008 15:18:28 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.2/8.14.1/Submit) id m7LFISDo047612 for perforce@freebsd.org; Thu, 21 Aug 2008 15:18:28 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Thu, 21 Aug 2008 15:18:28 GMT Message-Id: <200808211518.m7LFISDo047612@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Cc: Subject: PERFORCE change 148006 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2008 15:18:29 -0000 http://perforce.freebsd.org/chv.cgi?CH=148006 Change 148006 by rwatson@rwatson_freebsd_capabilities on 2008/08/21 15:18:20 Check capabilities for ZFS file descriptor ioctls. Affected files ... .. //depot/projects/trustedbsd/capabilities/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c#2 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c#2 (text+ko) ==== @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -1468,7 +1469,8 @@ strchr(zc->zc_value, '@') == NULL) return (EINVAL); - error = fget_read(td, zc->zc_cookie, &fp); + /* XXXRW: Is this the right capability? */ + error = fget_read(td, zc->zc_cookie, CAP_READ | CAP_SEEK, &fp); if (error) return (error); @@ -1515,7 +1517,8 @@ } fd = zc->zc_cookie; - error = fget_write(td, fd, &fp); + /* XXXRW: Is this the right capability? */ + error = fget_write(td, fd, CAP_WRITE | CAP_SEEK, &fp); if (error) { dmu_objset_close(tosnap); if (fromsnap)