Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1230111 > unrolled thread
| Started by | Andreas Gruenbacher <agruenba@redhat.com> |
|---|---|
| First post | 2015-09-22 14:30 +0200 |
| Last post | 2015-10-04 08:30 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH v2 3/7] jffs2: Add missing capability check for listing trusted xattrs Andreas Gruenbacher <agruenba@redhat.com> - 2015-09-22 14:30 +0200
Re: [PATCH v2 3/7] jffs2: Add missing capability check for listing trusted xattrs Christoph Hellwig <hch@infradead.org> - 2015-10-04 08:30 +0200
| From | Andreas Gruenbacher <agruenba@redhat.com> |
|---|---|
| Date | 2015-09-22 14:30 +0200 |
| Subject | [PATCH v2 3/7] jffs2: Add missing capability check for listing trusted xattrs |
| Message-ID | <qbuRP-5fA-1@gated-at.bofh.it> |
The vfs checks if a task has the appropriate access for get and set
operations, but it cannot do that for the list operation; the file system
must check for that itself.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
---
fs/jffs2/xattr_trusted.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/fs/jffs2/xattr_trusted.c b/fs/jffs2/xattr_trusted.c
index ceaf9c6..bbd20c1 100644
--- a/fs/jffs2/xattr_trusted.c
+++ b/fs/jffs2/xattr_trusted.c
@@ -39,6 +39,9 @@ static size_t jffs2_trusted_listxattr(struct dentry *dentry, char *list,
{
size_t retlen = XATTR_TRUSTED_PREFIX_LEN + name_len + 1;
+ if (!capable(CAP_SYS_ADMIN))
+ return 0;
+
if (list && retlen<=list_size) {
strcpy(list, XATTR_TRUSTED_PREFIX);
strcpy(list + XATTR_TRUSTED_PREFIX_LEN, name);
--
2.4.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Christoph Hellwig <hch@infradead.org> |
|---|---|
| Date | 2015-10-04 08:30 +0200 |
| Subject | Re: [PATCH v2 3/7] jffs2: Add missing capability check for listing trusted xattrs |
| Message-ID | <qfKY1-FS-3@gated-at.bofh.it> |
| In reply to | #1230111 |
Looks good, Reviewed-by: Christoph Hellwig <hch@lst.de> -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web