aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/ocfs2/ioctl.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/ocfs2/ioctl.c b/fs/ocfs2/ioctl.c
index 7003d5820d79..5177fba5162b 100644
--- a/fs/ocfs2/ioctl.c
+++ b/fs/ocfs2/ioctl.c
@@ -144,12 +144,18 @@ int ocfs2_ioctl(struct inode * inode, struct file * filp,
144 144
145 return ocfs2_change_file_space(filp, cmd, &sr); 145 return ocfs2_change_file_space(filp, cmd, &sr);
146 case OCFS2_IOC_GROUP_EXTEND: 146 case OCFS2_IOC_GROUP_EXTEND:
147 if (!capable(CAP_SYS_RESOURCE))
148 return -EPERM;
149
147 if (get_user(new_clusters, (int __user *)arg)) 150 if (get_user(new_clusters, (int __user *)arg))
148 return -EFAULT; 151 return -EFAULT;
149 152
150 return ocfs2_group_extend(inode, new_clusters); 153 return ocfs2_group_extend(inode, new_clusters);
151 case OCFS2_IOC_GROUP_ADD: 154 case OCFS2_IOC_GROUP_ADD:
152 case OCFS2_IOC_GROUP_ADD64: 155 case OCFS2_IOC_GROUP_ADD64:
156 if (!capable(CAP_SYS_RESOURCE))
157 return -EPERM;
158
153 if (copy_from_user(&input, (int __user *) arg, sizeof(input))) 159 if (copy_from_user(&input, (int __user *) arg, sizeof(input)))
154 return -EFAULT; 160 return -EFAULT;
155 161