From owner-p4-projects@FreeBSD.ORG Sat Dec 19 10:46:38 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7C61F1065679; Sat, 19 Dec 2009 10:46:38 +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 411481065670 for ; Sat, 19 Dec 2009 10:46:38 +0000 (UTC) (envelope-from trasz@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 15E0B8FC14 for ; Sat, 19 Dec 2009 10:46:38 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id nBJAkbTc066485 for ; Sat, 19 Dec 2009 10:46:37 GMT (envelope-from trasz@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id nBJAkbQN066483 for perforce@freebsd.org; Sat, 19 Dec 2009 10:46:37 GMT (envelope-from trasz@freebsd.org) Date: Sat, 19 Dec 2009 10:46:37 GMT Message-Id: <200912191046.nBJAkbQN066483@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to trasz@freebsd.org using -f From: Edward Tomasz Napierala To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 171951 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Dec 2009 10:46:38 -0000 http://p4web.freebsd.org/chv.cgi?CH=171951 Change 171951 by trasz@trasz_victim on 2009/12/19 10:45:51 Add change somehow missed when moving permission check from kern/vfs_acl.c into VOP_GETACL(). Affected files ... .. //depot/projects/soc2008/trasz_nfs4acl/sys/ufs/ufs/ufs_vnops.c#35 edit Differences ... ==== //depot/projects/soc2008/trasz_nfs4acl/sys/ufs/ufs/ufs_vnops.c#35 (text+ko) ==== @@ -308,8 +308,8 @@ { struct vnode *vp = ap->a_vp; struct inode *ip = VTOI(vp); + accmode_t accmode = ap->a_accmode; int error; - accmode_t accmode = ap->a_accmode; #ifdef QUOTA int relocked; #endif @@ -385,7 +385,10 @@ type = ACL_TYPE_ACCESS; acl = acl_alloc(M_WAITOK); - error = VOP_GETACL(vp, type, acl, ap->a_cred, ap->a_td); + if (type == ACL_TYPE_NFS4) + error = ufs_getacl_nfs4_internal(vp, acl, ap->a_td); + else + error = VOP_GETACL(vp, type, acl, ap->a_cred, ap->a_td); switch (error) { case 0: if (type == ACL_TYPE_NFS4) { @@ -690,22 +693,19 @@ struct acl *aclp; aclp = acl_alloc(M_WAITOK); - - error = VOP_GETACL(vp, ACL_TYPE_NFS4, aclp, cred, td); + error = ufs_getacl_nfs4_internal(vp, aclp, td); /* - * We cannot get EOPNOTSUPP here, as the filesystem claims - * to support ACLs. + * We don't have to handle EOPNOTSUPP here, as the filesystem claims + * it supports ACLs. */ if (error) goto out; acl_nfs4_sync_acl_from_mode(aclp, mode, file_owner_id); - - error = VOP_SETACL(vp, ACL_TYPE_NFS4, aclp, cred, td); + error = ufs_setacl_nfs4_internal(vp, aclp, td); out: acl_free(aclp); - return (error); } #endif /* UFS_ACL */ @@ -1480,17 +1480,14 @@ parent_aclp = acl_alloc(M_WAITOK); child_aclp = acl_alloc(M_WAITOK | M_ZERO); - error = VOP_GETACL(dvp, ACL_TYPE_NFS4, parent_aclp, cred, td); + error = ufs_getacl_nfs4_internal(dvp, parent_aclp, td); if (error) goto out; - acl_nfs4_compute_inherited_acl(parent_aclp, child_aclp, child_mode, VTOI(tvp)->i_uid, tvp->v_type == VDIR); - - error = VOP_SETACL(tvp, ACL_TYPE_NFS4, child_aclp, cred, td); + error = ufs_setacl_nfs4_internal(tvp, child_aclp, td); if (error) goto out; - out: acl_free(parent_aclp); acl_free(child_aclp);