* [PATCH] f2fs: avoid duplicated permission check for "trusted." xattrs
@ 2018-07-19 0:23 Hyunchul Lee
2018-07-19 1:55 ` Chao Yu
0 siblings, 1 reply; 3+ messages in thread
From: Hyunchul Lee @ 2018-07-19 0:23 UTC (permalink / raw)
To: Jaegeuk Kim, Chao Yu
Cc: linux-f2fs-devel, linux-kernel, kernel-team, Hyunchul Lee
From: Hyunchul Lee <cheol.lee@lge.com>
Because xattr_permission already checks CAP_SYS_ADMIN
capability, we don't need to check it.
Signed-off-by: Hyunchul Lee <cheol.lee@lge.com>
---
fs/f2fs/xattr.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/fs/f2fs/xattr.c b/fs/f2fs/xattr.c
index 708271871f94..4b34244dcc69 100644
--- a/fs/f2fs/xattr.c
+++ b/fs/f2fs/xattr.c
@@ -37,9 +37,6 @@ static int f2fs_xattr_generic_get(const struct xattr_handler *handler,
return -EOPNOTSUPP;
break;
case F2FS_XATTR_INDEX_TRUSTED:
- if (!capable(CAP_SYS_ADMIN))
- return -EPERM;
- break;
case F2FS_XATTR_INDEX_SECURITY:
break;
default:
@@ -62,9 +59,6 @@ static int f2fs_xattr_generic_set(const struct xattr_handler *handler,
return -EOPNOTSUPP;
break;
case F2FS_XATTR_INDEX_TRUSTED:
- if (!capable(CAP_SYS_ADMIN))
- return -EPERM;
- break;
case F2FS_XATTR_INDEX_SECURITY:
break;
default:
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] f2fs: avoid duplicated permission check for "trusted." xattrs
2018-07-19 0:23 [PATCH] f2fs: avoid duplicated permission check for "trusted." xattrs Hyunchul Lee
@ 2018-07-19 1:55 ` Chao Yu
0 siblings, 0 replies; 3+ messages in thread
From: Chao Yu @ 2018-07-19 1:55 UTC (permalink / raw)
To: Hyunchul Lee, Jaegeuk Kim
Cc: linux-f2fs-devel, linux-kernel, kernel-team, Hyunchul Lee
On 2018/7/19 8:23, Hyunchul Lee wrote:
> From: Hyunchul Lee <cheol.lee@lge.com>
>
> Because xattr_permission already checks CAP_SYS_ADMIN
> capability, we don't need to check it.
>
> Signed-off-by: Hyunchul Lee <cheol.lee@lge.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Thanks,
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] f2fs: avoid duplicated permission check for "trusted." xattrs
@ 2018-07-19 1:55 ` Chao Yu
0 siblings, 0 replies; 3+ messages in thread
From: Chao Yu @ 2018-07-19 1:55 UTC (permalink / raw)
To: Hyunchul Lee, Jaegeuk Kim
Cc: kernel-team, Hyunchul Lee, linux-kernel, linux-f2fs-devel
On 2018/7/19 8:23, Hyunchul Lee wrote:
> From: Hyunchul Lee <cheol.lee@lge.com>
>
> Because xattr_permission already checks CAP_SYS_ADMIN
> capability, we don't need to check it.
>
> Signed-off-by: Hyunchul Lee <cheol.lee@lge.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Thanks,
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-07-19 1:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-19 0:23 [PATCH] f2fs: avoid duplicated permission check for "trusted." xattrs Hyunchul Lee
2018-07-19 1:55 ` Chao Yu
2018-07-19 1:55 ` Chao Yu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.