This patch is not a bug fix. I doubt that anyone wants this behavior, but I am sharing the patch just in case. It causes PVFS to _not_ report an error if a user attempts to set unsupported sticky or setuid bits on a file or directory. It is mainly helpful if you have a 3rd party application that insists on setting those bits and you don't want PVFS to complain about it.

-Phil
Index: pvfs2_src/src/kernel/linux-2.6/pvfs2-utils.c
===================================================================
--- pvfs2_src/src/kernel/linux-2.6/pvfs2-utils.c	(revision 2658)
+++ pvfs2_src/src/kernel/linux-2.6/pvfs2-utils.c	(revision 2659)
@@ -383,17 +383,25 @@
             }
             else
             {
+/* just return success if user requests sticky bit */
+                tmp_mode -= S_ISVTX;
+#if 0
                 gossip_debug(GOSSIP_UTILS_DEBUG, "User attempted to set sticky bit"
                         "on non-root directory; returning EINVAL.\n");
                 return(-EINVAL);
+#endif
             }
         }
 
         if (tmp_mode & (S_ISUID))
         {
+/* just return success if user requests setuid bit */
+            tmp_mode -= S_ISUID;
+#if 0
             gossip_debug(GOSSIP_UTILS_DEBUG, "Attempting to set setuid bit "
                     "(not supported); returning EINVAL.\n");
             return(-EINVAL);
+#endif
         }
 
         convert_attribute_mode_to_pvfs_sys_attr(
_______________________________________________
Pvfs2-developers mailing list
[email protected]
http://www.beowulf-underground.org/mailman/listinfo/pvfs2-developers

Reply via email to