提交 ac0e7737 编写于 作者: C Christoph Hellwig 提交者: Jan Kara

quota: drop permission checks from xfs_fs_set_xstate/xfs_fs_set_xquota

We already do these checks in the generic code.
Signed-off-by: NChristoph Hellwig <hch@lst.de>
Signed-off-by: NJan Kara <jack@suse.cz>
上级 5582c76f
...@@ -68,8 +68,6 @@ xfs_fs_set_xstate( ...@@ -68,8 +68,6 @@ xfs_fs_set_xstate(
return -EROFS; return -EROFS;
if (op != Q_XQUOTARM && !XFS_IS_QUOTA_RUNNING(mp)) if (op != Q_XQUOTARM && !XFS_IS_QUOTA_RUNNING(mp))
return -ENOSYS; return -ENOSYS;
if (!capable(CAP_SYS_ADMIN))
return -EPERM;
if (uflags & XFS_QUOTA_UDQ_ACCT) if (uflags & XFS_QUOTA_UDQ_ACCT)
flags |= XFS_UQUOTA_ACCT; flags |= XFS_UQUOTA_ACCT;
...@@ -130,8 +128,6 @@ xfs_fs_set_xquota( ...@@ -130,8 +128,6 @@ xfs_fs_set_xquota(
return -ENOSYS; return -ENOSYS;
if (!XFS_IS_QUOTA_ON(mp)) if (!XFS_IS_QUOTA_ON(mp))
return -ESRCH; return -ESRCH;
if (!capable(CAP_SYS_ADMIN))
return -EPERM;
return -xfs_qm_scall_setqlim(mp, id, xfs_quota_type(type), fdq); return -xfs_qm_scall_setqlim(mp, id, xfs_quota_type(type), fdq);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册