[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] cluster/gfs-kernel/src/gfs eaops.c



CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	rohara sourceware org	2007-12-04 19:30:27

Modified files:
	gfs-kernel/src/gfs: eaops.c 

Log message:
	BZ 323111
	Remove permission() checks from xattrs ops.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs-kernel/src/gfs/eaops.c.diff?cvsroot=cluster&r1=1.6&r2=1.7

--- cluster/gfs-kernel/src/gfs/eaops.c	2006/07/17 21:38:13	1.6
+++ cluster/gfs-kernel/src/gfs/eaops.c	2007/12/04 19:30:27	1.7
@@ -71,13 +71,6 @@
 static int
 user_eo_get(struct gfs_inode *ip, struct gfs_ea_request *er)
 {
-	{
-		struct inode *inode = ip->i_vnode;
-		int error = permission(inode, MAY_READ, NULL);
-		if (error)
-			return error;
-	}
-
 	return gfs_ea_get_i(ip, er);
 }
 
@@ -92,17 +85,6 @@
 static int
 user_eo_set(struct gfs_inode *ip, struct gfs_ea_request *er)
 {
-	{
-		struct inode *inode = ip->i_vnode;
-		if (S_ISREG(inode->i_mode) ||
-		    (S_ISDIR(inode->i_mode) && !(inode->i_mode & S_ISVTX))) {
-			int error = permission(inode, MAY_WRITE, NULL);
-			if (error)
-				return error;
-		} else
-			return -EPERM;
-	}
-
 	return gfs_ea_set_i(ip, er);
 }
 
@@ -117,17 +99,6 @@
 static int
 user_eo_remove(struct gfs_inode *ip, struct gfs_ea_request *er)
 {
-	{
-		struct inode *inode = ip->i_vnode;
-		if (S_ISREG(inode->i_mode) ||
-		    (S_ISDIR(inode->i_mode) && !(inode->i_mode & S_ISVTX))) {
-			int error = permission(inode, MAY_WRITE, NULL);
-			if (error)
-				return error;
-		} else
-			return -EPERM;
-	}
-
 	return gfs_ea_remove_i(ip, er);
 }
 
@@ -238,11 +209,6 @@
 static int
 security_eo_get(struct gfs_inode *ip, struct gfs_ea_request *er)
 {
-	struct inode *inode = ip->i_vnode;
-	int error = permission(inode, MAY_READ, NULL);
-	if (error)
-		return error;
-
 	return gfs_ea_get_i(ip, er);
 }
 
@@ -257,11 +223,6 @@
 static int
 security_eo_set(struct gfs_inode *ip, struct gfs_ea_request *er)
 {
-	struct inode *inode = ip->i_vnode;
-	int error = permission(inode, MAY_WRITE, NULL);
-	if (error)
-		return error;
-
 	return gfs_ea_set_i(ip, er);
 }
 
@@ -276,11 +237,6 @@
 static int
 security_eo_remove(struct gfs_inode *ip, struct gfs_ea_request *er)
 {
-	struct inode *inode = ip->i_vnode;
-	int error = permission(inode, MAY_WRITE, NULL);
-	if (error)
-		return error;
-
 	return gfs_ea_remove_i(ip, er);
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]