[Pvfs2-cvs] commit by pcarns in pvfs2-1/src/server: prelude.sm

CVS commit program cvs at parl.clemson.edu
Mon May 11 17:44:58 EDT 2009


Update of /projects/cvsroot/pvfs2-1/src/server
In directory parlweb1:/tmp/cvs-serv12358/src/server

Modified Files:
	prelude.sm 
Log Message:
fix problem in secondary group permission check for setattr; that specific
case had a hand coded test that did not go to secondary groups.  Fixes a
problem reported by David Metheny


Index: prelude.sm
===================================================================
RCS file: /projects/cvsroot/pvfs2-1/src/server/prelude.sm,v
diff -p -u -r1.75 -r1.76
--- prelude.sm	20 Nov 2008 01:17:11 -0000	1.75
+++ prelude.sm	11 May 2009 21:44:58 -0000	1.76
@@ -461,26 +461,9 @@ static PINT_sm_action prelude_perm_check
 	    }
             else /* setattr, seteattr, seteattr_list */
             {
-                /*
-                  NOTE: on other file systems, setattr doesn't
-                  seem to require read permissions by the user, group
-                  OR other, so long as the user or group matches (or
-                  is root)
-                */
-                if (((s_op->attr.mask & PVFS_ATTR_COMMON_UID) &&
-                     ((s_op->attr.owner == 0) ||
-                      (s_op->attr.owner == translated_uid))) ||
-                    (((s_op->attr.mask & PVFS_ATTR_COMMON_GID) &&
-                      ((s_op->attr.group == 0) ||
-                       (s_op->attr.group == translated_gid)))) ||
-                    (translated_uid == 0))
-                {
-                    js_p->error_code = 0;
-                }
-                else
-                {
-                    js_p->error_code = -PVFS_EACCES;
-                }
+                js_p->error_code = PINT_check_mode(
+                    &(s_op->attr), translated_uid,
+                    translated_gid, PINT_ACCESS_WRITABLE);
             }
             break;
         case PINT_SERVER_CHECK_NONE:



More information about the Pvfs2-cvs mailing list