Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Jun 2009 18:08:54 GMT
From:      Aditya Sarawgi <truncs@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 164192 for review
Message-ID:  <200906121808.n5CI8sIm012848@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=164192

Change 164192 by truncs@aditya on 2009/06/12 18:07:58

	This block should be outside access check as suggested by stas@

Affected files ...

.. //depot/projects/soc2009/soc_ext2fs/src/sys/gnu/fs/ext2fs/ext2_vnops.c#9 edit

Differences ...

==== //depot/projects/soc2009/soc_ext2fs/src/sys/gnu/fs/ext2fs/ext2_vnops.c#9 (text+ko) ====

@@ -379,6 +379,11 @@
 	struct ucred *cred = ap->a_cred;
 	struct thread *td = curthread;
 	int error;
+	/*
+	 * Deny setting of UF flags
+	 */
+	if(vap->va_flags & UF_SETTABLE)
+		return (EOPNOTSUPP);
 
 	/*
 	 * Check for unsettable attributes.
@@ -392,11 +397,7 @@
 	if (vap->va_flags != VNOVAL) {
 		if (vp->v_mount->mnt_flag & MNT_RDONLY)
 			return (EROFS);
-		/* 
-		 * Deny setting of UF_* flags
-		 */ 
-		if(vap->va_flags & UF_SETTABLE)
-			return (EOPNOTSUPP);
+	
 		/*
 		 * Callers may only modify the file flags on objects they
 		 * have VADMIN rights for.



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