2006-05-12 23:18:27 -07:00
|
|
|
/*
|
|
|
|
* JFFS2 -- Journalling Flash File System, Version 2.
|
2006-05-12 23:09:47 -07:00
|
|
|
*
|
2007-04-25 06:16:47 -07:00
|
|
|
* Copyright © 2006 NEC Corporation
|
2006-05-12 23:09:47 -07:00
|
|
|
*
|
2006-05-12 23:18:27 -07:00
|
|
|
* Created by KaiGai Kohei <kaigai@ak.jp.nec.com>
|
|
|
|
*
|
|
|
|
* For licensing information, see the file 'LICENCE' in this directory.
|
|
|
|
*
|
|
|
|
*/
|
2007-04-25 06:16:47 -07:00
|
|
|
|
2012-02-15 16:56:45 -07:00
|
|
|
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
|
|
|
|
2006-05-12 23:09:47 -07:00
|
|
|
#include <linux/kernel.h>
|
|
|
|
#include <linux/slab.h>
|
|
|
|
#include <linux/fs.h>
|
2006-10-18 10:55:46 -07:00
|
|
|
#include <linux/sched.h>
|
2006-05-12 23:09:47 -07:00
|
|
|
#include <linux/time.h>
|
|
|
|
#include <linux/crc32.h>
|
|
|
|
#include <linux/jffs2.h>
|
|
|
|
#include <linux/xattr.h>
|
|
|
|
#include <linux/posix_acl_xattr.h>
|
|
|
|
#include <linux/mtd/mtd.h>
|
|
|
|
#include "nodelist.h"
|
|
|
|
|
|
|
|
static size_t jffs2_acl_size(int count)
|
|
|
|
{
|
|
|
|
if (count <= 4) {
|
2006-05-12 23:13:27 -07:00
|
|
|
return sizeof(struct jffs2_acl_header)
|
|
|
|
+ count * sizeof(struct jffs2_acl_entry_short);
|
2006-05-12 23:09:47 -07:00
|
|
|
} else {
|
2006-05-12 23:13:27 -07:00
|
|
|
return sizeof(struct jffs2_acl_header)
|
|
|
|
+ 4 * sizeof(struct jffs2_acl_entry_short)
|
|
|
|
+ (count - 4) * sizeof(struct jffs2_acl_entry);
|
2006-05-12 23:09:47 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static int jffs2_acl_count(size_t size)
|
|
|
|
{
|
|
|
|
size_t s;
|
|
|
|
|
2006-05-12 23:13:27 -07:00
|
|
|
size -= sizeof(struct jffs2_acl_header);
|
2009-03-04 13:01:41 -07:00
|
|
|
if (size < 4 * sizeof(struct jffs2_acl_entry_short)) {
|
2006-05-12 23:13:27 -07:00
|
|
|
if (size % sizeof(struct jffs2_acl_entry_short))
|
2006-05-12 23:09:47 -07:00
|
|
|
return -1;
|
2006-05-12 23:13:27 -07:00
|
|
|
return size / sizeof(struct jffs2_acl_entry_short);
|
2006-05-12 23:09:47 -07:00
|
|
|
} else {
|
2009-03-04 13:01:41 -07:00
|
|
|
s = size - 4 * sizeof(struct jffs2_acl_entry_short);
|
2006-05-12 23:13:27 -07:00
|
|
|
if (s % sizeof(struct jffs2_acl_entry))
|
2006-05-12 23:09:47 -07:00
|
|
|
return -1;
|
2006-05-12 23:13:27 -07:00
|
|
|
return s / sizeof(struct jffs2_acl_entry) + 4;
|
2006-05-12 23:09:47 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2006-05-12 23:20:24 -07:00
|
|
|
static struct posix_acl *jffs2_acl_from_medium(void *value, size_t size)
|
2006-05-12 23:09:47 -07:00
|
|
|
{
|
2006-05-12 23:20:24 -07:00
|
|
|
void *end = value + size;
|
|
|
|
struct jffs2_acl_header *header = value;
|
|
|
|
struct jffs2_acl_entry *entry;
|
2006-05-12 23:09:47 -07:00
|
|
|
struct posix_acl *acl;
|
|
|
|
uint32_t ver;
|
|
|
|
int i, count;
|
|
|
|
|
|
|
|
if (!value)
|
|
|
|
return NULL;
|
2006-05-12 23:13:27 -07:00
|
|
|
if (size < sizeof(struct jffs2_acl_header))
|
2006-05-12 23:09:47 -07:00
|
|
|
return ERR_PTR(-EINVAL);
|
2006-05-12 23:20:24 -07:00
|
|
|
ver = je32_to_cpu(header->a_version);
|
2006-05-12 23:09:47 -07:00
|
|
|
if (ver != JFFS2_ACL_VERSION) {
|
|
|
|
JFFS2_WARNING("Invalid ACL version. (=%u)\n", ver);
|
|
|
|
return ERR_PTR(-EINVAL);
|
|
|
|
}
|
|
|
|
|
2006-05-12 23:20:24 -07:00
|
|
|
value += sizeof(struct jffs2_acl_header);
|
2006-05-12 23:09:47 -07:00
|
|
|
count = jffs2_acl_count(size);
|
|
|
|
if (count < 0)
|
|
|
|
return ERR_PTR(-EINVAL);
|
|
|
|
if (count == 0)
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
acl = posix_acl_alloc(count, GFP_KERNEL);
|
|
|
|
if (!acl)
|
|
|
|
return ERR_PTR(-ENOMEM);
|
|
|
|
|
|
|
|
for (i=0; i < count; i++) {
|
2006-05-12 23:20:24 -07:00
|
|
|
entry = value;
|
|
|
|
if (value + sizeof(struct jffs2_acl_entry_short) > end)
|
2006-05-12 23:09:47 -07:00
|
|
|
goto fail;
|
|
|
|
acl->a_entries[i].e_tag = je16_to_cpu(entry->e_tag);
|
|
|
|
acl->a_entries[i].e_perm = je16_to_cpu(entry->e_perm);
|
|
|
|
switch (acl->a_entries[i].e_tag) {
|
|
|
|
case ACL_USER_OBJ:
|
|
|
|
case ACL_GROUP_OBJ:
|
|
|
|
case ACL_MASK:
|
|
|
|
case ACL_OTHER:
|
2006-05-12 23:20:24 -07:00
|
|
|
value += sizeof(struct jffs2_acl_entry_short);
|
2006-05-12 23:09:47 -07:00
|
|
|
acl->a_entries[i].e_id = ACL_UNDEFINED_ID;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case ACL_USER:
|
|
|
|
case ACL_GROUP:
|
2006-05-12 23:20:24 -07:00
|
|
|
value += sizeof(struct jffs2_acl_entry);
|
|
|
|
if (value > end)
|
2006-05-12 23:09:47 -07:00
|
|
|
goto fail;
|
|
|
|
acl->a_entries[i].e_id = je32_to_cpu(entry->e_id);
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
goto fail;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (value != end)
|
|
|
|
goto fail;
|
|
|
|
return acl;
|
|
|
|
fail:
|
|
|
|
posix_acl_release(acl);
|
|
|
|
return ERR_PTR(-EINVAL);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void *jffs2_acl_to_medium(const struct posix_acl *acl, size_t *size)
|
|
|
|
{
|
2006-05-12 23:20:24 -07:00
|
|
|
struct jffs2_acl_header *header;
|
|
|
|
struct jffs2_acl_entry *entry;
|
|
|
|
void *e;
|
2006-05-12 23:09:47 -07:00
|
|
|
size_t i;
|
|
|
|
|
|
|
|
*size = jffs2_acl_size(acl->a_count);
|
2006-05-12 23:20:24 -07:00
|
|
|
header = kmalloc(sizeof(*header) + acl->a_count * sizeof(*entry), GFP_KERNEL);
|
|
|
|
if (!header)
|
2006-05-12 23:09:47 -07:00
|
|
|
return ERR_PTR(-ENOMEM);
|
2006-05-12 23:20:24 -07:00
|
|
|
header->a_version = cpu_to_je32(JFFS2_ACL_VERSION);
|
|
|
|
e = header + 1;
|
2006-05-12 23:09:47 -07:00
|
|
|
for (i=0; i < acl->a_count; i++) {
|
2006-05-12 23:20:24 -07:00
|
|
|
entry = e;
|
2006-05-12 23:09:47 -07:00
|
|
|
entry->e_tag = cpu_to_je16(acl->a_entries[i].e_tag);
|
|
|
|
entry->e_perm = cpu_to_je16(acl->a_entries[i].e_perm);
|
|
|
|
switch(acl->a_entries[i].e_tag) {
|
|
|
|
case ACL_USER:
|
|
|
|
case ACL_GROUP:
|
|
|
|
entry->e_id = cpu_to_je32(acl->a_entries[i].e_id);
|
2006-05-12 23:13:27 -07:00
|
|
|
e += sizeof(struct jffs2_acl_entry);
|
2006-05-12 23:09:47 -07:00
|
|
|
break;
|
|
|
|
|
|
|
|
case ACL_USER_OBJ:
|
|
|
|
case ACL_GROUP_OBJ:
|
|
|
|
case ACL_MASK:
|
|
|
|
case ACL_OTHER:
|
2006-05-12 23:13:27 -07:00
|
|
|
e += sizeof(struct jffs2_acl_entry_short);
|
2006-05-12 23:09:47 -07:00
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
goto fail;
|
|
|
|
}
|
|
|
|
}
|
2006-05-12 23:20:24 -07:00
|
|
|
return header;
|
2006-05-12 23:09:47 -07:00
|
|
|
fail:
|
2006-05-12 23:20:24 -07:00
|
|
|
kfree(header);
|
2006-05-12 23:09:47 -07:00
|
|
|
return ERR_PTR(-EINVAL);
|
|
|
|
}
|
|
|
|
|
2011-07-23 08:37:31 -07:00
|
|
|
struct posix_acl *jffs2_get_acl(struct inode *inode, int type)
|
2006-05-12 23:09:47 -07:00
|
|
|
{
|
|
|
|
struct posix_acl *acl;
|
|
|
|
char *value = NULL;
|
|
|
|
int rc, xprefix;
|
|
|
|
|
2009-06-09 09:11:54 -07:00
|
|
|
acl = get_cached_acl(inode, type);
|
|
|
|
if (acl != ACL_NOT_CACHED)
|
|
|
|
return acl;
|
|
|
|
|
2006-05-12 23:09:47 -07:00
|
|
|
switch (type) {
|
|
|
|
case ACL_TYPE_ACCESS:
|
|
|
|
xprefix = JFFS2_XPREFIX_ACL_ACCESS;
|
|
|
|
break;
|
|
|
|
case ACL_TYPE_DEFAULT:
|
|
|
|
xprefix = JFFS2_XPREFIX_ACL_DEFAULT;
|
|
|
|
break;
|
|
|
|
default:
|
2009-06-09 09:11:54 -07:00
|
|
|
BUG();
|
2006-05-12 23:09:47 -07:00
|
|
|
}
|
|
|
|
rc = do_jffs2_getxattr(inode, xprefix, "", NULL, 0);
|
|
|
|
if (rc > 0) {
|
|
|
|
value = kmalloc(rc, GFP_KERNEL);
|
|
|
|
if (!value)
|
|
|
|
return ERR_PTR(-ENOMEM);
|
|
|
|
rc = do_jffs2_getxattr(inode, xprefix, "", value, rc);
|
|
|
|
}
|
|
|
|
if (rc > 0) {
|
|
|
|
acl = jffs2_acl_from_medium(value, rc);
|
|
|
|
} else if (rc == -ENODATA || rc == -ENOSYS) {
|
|
|
|
acl = NULL;
|
|
|
|
} else {
|
|
|
|
acl = ERR_PTR(rc);
|
|
|
|
}
|
|
|
|
if (value)
|
|
|
|
kfree(value);
|
2009-06-09 09:11:54 -07:00
|
|
|
if (!IS_ERR(acl))
|
|
|
|
set_cached_acl(inode, type, acl);
|
2006-05-12 23:09:47 -07:00
|
|
|
return acl;
|
|
|
|
}
|
|
|
|
|
2007-09-13 23:16:35 -07:00
|
|
|
static int __jffs2_set_acl(struct inode *inode, int xprefix, struct posix_acl *acl)
|
|
|
|
{
|
|
|
|
char *value = NULL;
|
|
|
|
size_t size = 0;
|
|
|
|
int rc;
|
|
|
|
|
|
|
|
if (acl) {
|
|
|
|
value = jffs2_acl_to_medium(acl, &size);
|
|
|
|
if (IS_ERR(value))
|
|
|
|
return PTR_ERR(value);
|
|
|
|
}
|
|
|
|
rc = do_jffs2_setxattr(inode, xprefix, "", value, size, 0);
|
|
|
|
if (!value && rc == -ENODATA)
|
|
|
|
rc = 0;
|
|
|
|
kfree(value);
|
|
|
|
|
|
|
|
return rc;
|
|
|
|
}
|
|
|
|
|
2006-05-12 23:09:47 -07:00
|
|
|
static int jffs2_set_acl(struct inode *inode, int type, struct posix_acl *acl)
|
|
|
|
{
|
|
|
|
int rc, xprefix;
|
|
|
|
|
|
|
|
if (S_ISLNK(inode->i_mode))
|
|
|
|
return -EOPNOTSUPP;
|
|
|
|
|
|
|
|
switch (type) {
|
|
|
|
case ACL_TYPE_ACCESS:
|
|
|
|
xprefix = JFFS2_XPREFIX_ACL_ACCESS;
|
|
|
|
if (acl) {
|
2011-07-23 15:56:36 -07:00
|
|
|
umode_t mode = inode->i_mode;
|
2006-05-12 23:09:47 -07:00
|
|
|
rc = posix_acl_equiv_mode(acl, &mode);
|
|
|
|
if (rc < 0)
|
|
|
|
return rc;
|
|
|
|
if (inode->i_mode != mode) {
|
2007-08-22 04:39:19 -07:00
|
|
|
struct iattr attr;
|
|
|
|
|
2010-06-04 08:07:55 -07:00
|
|
|
attr.ia_valid = ATTR_MODE | ATTR_CTIME;
|
2007-08-22 04:39:19 -07:00
|
|
|
attr.ia_mode = mode;
|
2010-06-04 08:07:55 -07:00
|
|
|
attr.ia_ctime = CURRENT_TIME_SEC;
|
2007-08-22 04:39:19 -07:00
|
|
|
rc = jffs2_do_setattr(inode, &attr);
|
|
|
|
if (rc < 0)
|
|
|
|
return rc;
|
2006-05-12 23:09:47 -07:00
|
|
|
}
|
|
|
|
if (rc == 0)
|
|
|
|
acl = NULL;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case ACL_TYPE_DEFAULT:
|
|
|
|
xprefix = JFFS2_XPREFIX_ACL_DEFAULT;
|
|
|
|
if (!S_ISDIR(inode->i_mode))
|
|
|
|
return acl ? -EACCES : 0;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
return -EINVAL;
|
|
|
|
}
|
2007-09-13 23:16:35 -07:00
|
|
|
rc = __jffs2_set_acl(inode, xprefix, acl);
|
2009-06-09 09:11:54 -07:00
|
|
|
if (!rc)
|
|
|
|
set_cached_acl(inode, type, acl);
|
2006-05-12 23:09:47 -07:00
|
|
|
return rc;
|
|
|
|
}
|
|
|
|
|
2011-07-23 15:37:50 -07:00
|
|
|
int jffs2_init_acl_pre(struct inode *dir_i, struct inode *inode, umode_t *i_mode)
|
2006-05-12 23:09:47 -07:00
|
|
|
{
|
2011-07-23 00:10:32 -07:00
|
|
|
struct posix_acl *acl;
|
2007-09-13 23:16:35 -07:00
|
|
|
int rc;
|
2006-05-12 23:09:47 -07:00
|
|
|
|
2009-06-24 13:58:48 -07:00
|
|
|
cache_no_acl(inode);
|
2007-09-13 23:16:35 -07:00
|
|
|
|
|
|
|
if (S_ISLNK(*i_mode))
|
|
|
|
return 0; /* Symlink always has no-ACL */
|
|
|
|
|
|
|
|
acl = jffs2_get_acl(dir_i, ACL_TYPE_DEFAULT);
|
|
|
|
if (IS_ERR(acl))
|
|
|
|
return PTR_ERR(acl);
|
|
|
|
|
|
|
|
if (!acl) {
|
2009-03-29 16:08:22 -07:00
|
|
|
*i_mode &= ~current_umask();
|
2007-09-13 23:16:35 -07:00
|
|
|
} else {
|
|
|
|
if (S_ISDIR(*i_mode))
|
2009-06-09 09:11:54 -07:00
|
|
|
set_cached_acl(inode, ACL_TYPE_DEFAULT, acl);
|
2007-08-22 04:39:19 -07:00
|
|
|
|
2011-07-23 00:10:32 -07:00
|
|
|
rc = posix_acl_create(&acl, GFP_KERNEL, i_mode);
|
|
|
|
if (rc < 0)
|
2007-09-13 23:16:35 -07:00
|
|
|
return rc;
|
|
|
|
if (rc > 0)
|
2011-07-23 00:10:32 -07:00
|
|
|
set_cached_acl(inode, ACL_TYPE_ACCESS, acl);
|
2007-09-13 23:16:35 -07:00
|
|
|
|
2011-07-23 00:10:32 -07:00
|
|
|
posix_acl_release(acl);
|
2006-05-12 23:09:47 -07:00
|
|
|
}
|
2007-09-13 23:16:35 -07:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
int jffs2_init_acl_post(struct inode *inode)
|
|
|
|
{
|
|
|
|
int rc;
|
|
|
|
|
2009-06-08 16:55:12 -07:00
|
|
|
if (inode->i_default_acl) {
|
|
|
|
rc = __jffs2_set_acl(inode, JFFS2_XPREFIX_ACL_DEFAULT, inode->i_default_acl);
|
2007-09-13 23:16:35 -07:00
|
|
|
if (rc)
|
|
|
|
return rc;
|
|
|
|
}
|
|
|
|
|
2009-06-08 16:55:12 -07:00
|
|
|
if (inode->i_acl) {
|
|
|
|
rc = __jffs2_set_acl(inode, JFFS2_XPREFIX_ACL_ACCESS, inode->i_acl);
|
2007-09-13 23:16:35 -07:00
|
|
|
if (rc)
|
|
|
|
return rc;
|
|
|
|
}
|
|
|
|
|
2007-10-27 07:36:44 -07:00
|
|
|
return 0;
|
2006-05-12 23:09:47 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
int jffs2_acl_chmod(struct inode *inode)
|
|
|
|
{
|
2011-07-22 21:18:02 -07:00
|
|
|
struct posix_acl *acl;
|
2006-05-12 23:09:47 -07:00
|
|
|
int rc;
|
|
|
|
|
|
|
|
if (S_ISLNK(inode->i_mode))
|
|
|
|
return -EOPNOTSUPP;
|
|
|
|
acl = jffs2_get_acl(inode, ACL_TYPE_ACCESS);
|
|
|
|
if (IS_ERR(acl) || !acl)
|
|
|
|
return PTR_ERR(acl);
|
2011-07-22 21:18:02 -07:00
|
|
|
rc = posix_acl_chmod(&acl, GFP_KERNEL, inode->i_mode);
|
|
|
|
if (rc)
|
|
|
|
return rc;
|
|
|
|
rc = jffs2_set_acl(inode, ACL_TYPE_ACCESS, acl);
|
2006-05-12 23:09:47 -07:00
|
|
|
posix_acl_release(acl);
|
|
|
|
return rc;
|
|
|
|
}
|
|
|
|
|
2009-11-13 02:52:56 -07:00
|
|
|
static size_t jffs2_acl_access_listxattr(struct dentry *dentry, char *list,
|
|
|
|
size_t list_size, const char *name, size_t name_len, int type)
|
2006-05-12 23:09:47 -07:00
|
|
|
{
|
|
|
|
const int retlen = sizeof(POSIX_ACL_XATTR_ACCESS);
|
|
|
|
|
|
|
|
if (list && retlen <= list_size)
|
|
|
|
strcpy(list, POSIX_ACL_XATTR_ACCESS);
|
|
|
|
return retlen;
|
|
|
|
}
|
|
|
|
|
2009-11-13 02:52:56 -07:00
|
|
|
static size_t jffs2_acl_default_listxattr(struct dentry *dentry, char *list,
|
|
|
|
size_t list_size, const char *name, size_t name_len, int type)
|
2006-05-12 23:09:47 -07:00
|
|
|
{
|
|
|
|
const int retlen = sizeof(POSIX_ACL_XATTR_DEFAULT);
|
|
|
|
|
|
|
|
if (list && retlen <= list_size)
|
|
|
|
strcpy(list, POSIX_ACL_XATTR_DEFAULT);
|
|
|
|
return retlen;
|
|
|
|
}
|
|
|
|
|
2009-11-13 02:52:56 -07:00
|
|
|
static int jffs2_acl_getxattr(struct dentry *dentry, const char *name,
|
|
|
|
void *buffer, size_t size, int type)
|
2006-05-12 23:09:47 -07:00
|
|
|
{
|
|
|
|
struct posix_acl *acl;
|
|
|
|
int rc;
|
|
|
|
|
2009-11-13 02:52:56 -07:00
|
|
|
if (name[0] != '\0')
|
|
|
|
return -EINVAL;
|
|
|
|
|
|
|
|
acl = jffs2_get_acl(dentry->d_inode, type);
|
2006-05-12 23:09:47 -07:00
|
|
|
if (IS_ERR(acl))
|
|
|
|
return PTR_ERR(acl);
|
|
|
|
if (!acl)
|
|
|
|
return -ENODATA;
|
2012-09-10 20:17:44 -07:00
|
|
|
rc = posix_acl_to_xattr(&init_user_ns, acl, buffer, size);
|
2006-05-12 23:09:47 -07:00
|
|
|
posix_acl_release(acl);
|
|
|
|
|
|
|
|
return rc;
|
|
|
|
}
|
|
|
|
|
2009-11-13 02:52:56 -07:00
|
|
|
static int jffs2_acl_setxattr(struct dentry *dentry, const char *name,
|
|
|
|
const void *value, size_t size, int flags, int type)
|
2006-05-12 23:09:47 -07:00
|
|
|
{
|
|
|
|
struct posix_acl *acl;
|
|
|
|
int rc;
|
|
|
|
|
2009-11-13 02:52:56 -07:00
|
|
|
if (name[0] != '\0')
|
|
|
|
return -EINVAL;
|
2011-03-23 16:43:26 -07:00
|
|
|
if (!inode_owner_or_capable(dentry->d_inode))
|
2006-05-12 23:09:47 -07:00
|
|
|
return -EPERM;
|
|
|
|
|
|
|
|
if (value) {
|
2012-09-10 20:17:44 -07:00
|
|
|
acl = posix_acl_from_xattr(&init_user_ns, value, size);
|
2006-05-12 23:09:47 -07:00
|
|
|
if (IS_ERR(acl))
|
|
|
|
return PTR_ERR(acl);
|
|
|
|
if (acl) {
|
|
|
|
rc = posix_acl_valid(acl);
|
|
|
|
if (rc)
|
|
|
|
goto out;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
acl = NULL;
|
|
|
|
}
|
2009-11-13 02:52:56 -07:00
|
|
|
rc = jffs2_set_acl(dentry->d_inode, type, acl);
|
2006-05-12 23:09:47 -07:00
|
|
|
out:
|
|
|
|
posix_acl_release(acl);
|
|
|
|
return rc;
|
|
|
|
}
|
|
|
|
|
2010-05-13 17:53:21 -07:00
|
|
|
const struct xattr_handler jffs2_acl_access_xattr_handler = {
|
2006-05-12 23:09:47 -07:00
|
|
|
.prefix = POSIX_ACL_XATTR_ACCESS,
|
2009-11-13 02:52:56 -07:00
|
|
|
.flags = ACL_TYPE_DEFAULT,
|
2006-05-12 23:09:47 -07:00
|
|
|
.list = jffs2_acl_access_listxattr,
|
2009-11-13 02:52:56 -07:00
|
|
|
.get = jffs2_acl_getxattr,
|
|
|
|
.set = jffs2_acl_setxattr,
|
2006-05-12 23:09:47 -07:00
|
|
|
};
|
|
|
|
|
2010-05-13 17:53:21 -07:00
|
|
|
const struct xattr_handler jffs2_acl_default_xattr_handler = {
|
2006-05-12 23:09:47 -07:00
|
|
|
.prefix = POSIX_ACL_XATTR_DEFAULT,
|
2009-11-13 02:52:56 -07:00
|
|
|
.flags = ACL_TYPE_DEFAULT,
|
2006-05-12 23:09:47 -07:00
|
|
|
.list = jffs2_acl_default_listxattr,
|
2009-11-13 02:52:56 -07:00
|
|
|
.get = jffs2_acl_getxattr,
|
|
|
|
.set = jffs2_acl_setxattr,
|
2006-05-12 23:09:47 -07:00
|
|
|
};
|