PERFORCE change 164192 for review
Aditya Sarawgi
truncs at FreeBSD.org
Fri Jun 12 18:08:56 UTC 2009
http://perforce.freebsd.org/chv.cgi?CH=164192
Change 164192 by truncs at 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.
More information about the p4-projects
mailing list