]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
kclient: only allow user.* xattrs for now
authorSage Weil <sage@newdream.net>
Thu, 22 May 2008 04:47:16 +0000 (21:47 -0700)
committerSage Weil <sage@newdream.net>
Thu, 22 May 2008 04:47:16 +0000 (21:47 -0700)
src/kernel/inode.c

index befb8ba0d1c5b44270f6e88b044c990947708d9e..a19aeb3bad8551b21ce40c1de90d1dbcf94029fa 100644 (file)
@@ -1971,6 +1971,10 @@ int ceph_setxattr(struct dentry *dentry, const char *name,
        struct page **pages = 0;
        void *kaddr;
 
+       /* only support user.* xattrs, for now */
+       if (strncmp(name, "user.", 5) != 0)
+               return -EOPNOTSUPP;
+
        /* copy value into some pages */
        nr_pages = calc_pages_for(0, size);
        if (nr_pages) {
@@ -2032,6 +2036,10 @@ int ceph_removexattr(struct dentry *dentry, const char *name)
        int pathlen;
        int err;
 
+       /* only support user.* xattrs, for now */
+       if (strncmp(name, "user.", 5) != 0)
+               return -EOPNOTSUPP;
+
        path = ceph_build_dentry_path(dentry, &pathlen);
        if (IS_ERR(path))
                return PTR_ERR(path);