From: Taesoo Kim <tsgatesv@gmail.com>
To: ericvh@gmail.com, rminnich@sandia.gov, lucho@ionkov.net,
v9fs-developer@lists.sourceforge.net,
linux-kernel@vger.kernel.org
Cc: taesoo@gatech.edu, changwoo@gatech.edu, sanidhya@gatech.edu,
blee@gatech.edu, csong84@gatech.edu,
Taesoo Kim <tsgatesv@gmail.com>
Subject: [PATCH 1/1] 9p: correctly check empty xattr key
Date: Fri, 20 Mar 2015 00:01:56 -0400 [thread overview]
Message-ID: <1426824116-22920-1-git-send-email-tsgatesv@gmail.com> (raw)
When xattr name (key) is empty (""), correctly return -EINVAL
error. Not sure how previous xattr_set_acl() performs with
any xattr key for get/set().
Signed-off-by: Taesoo Kim <tsgatesv@gmail.com>
---
fs/9p/acl.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/9p/acl.c b/fs/9p/acl.c
index 8482f2d..295bf25 100644
--- a/fs/9p/acl.c
+++ b/fs/9p/acl.c
@@ -237,7 +237,7 @@ static int v9fs_xattr_get_acl(struct dentry *dentry, const char *name,
struct posix_acl *acl;
int error;
- if (strcmp(name, "") != 0)
+ if (strcmp(name, "") == 0)
return -EINVAL;
v9ses = v9fs_dentry2v9ses(dentry);
@@ -287,7 +287,7 @@ static int v9fs_xattr_set_acl(struct dentry *dentry, const char *name,
struct v9fs_session_info *v9ses;
struct inode *inode = dentry->d_inode;
- if (strcmp(name, "") != 0)
+ if (strcmp(name, "") == 0)
return -EINVAL;
v9ses = v9fs_dentry2v9ses(dentry);
--
2.3.3
next reply other threads:[~2015-03-20 4:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-20 4:01 Taesoo Kim [this message]
2015-03-23 14:54 ` Aneesh Kumar K.V
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1426824116-22920-1-git-send-email-tsgatesv@gmail.com \
--to=tsgatesv@gmail.com \
--cc=blee@gatech.edu \
--cc=changwoo@gatech.edu \
--cc=csong84@gatech.edu \
--cc=ericvh@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lucho@ionkov.net \
--cc=rminnich@sandia.gov \
--cc=sanidhya@gatech.edu \
--cc=taesoo@gatech.edu \
--cc=v9fs-developer@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome