Lines 2201-2206
static const struct xattr_handler *shmem_xattr_handlers[] = {
Link Here
|
2201 |
static int shmem_xattr_validate(const char *name) |
2201 |
static int shmem_xattr_validate(const char *name) |
2202 |
{ |
2202 |
{ |
2203 |
struct { const char *prefix; size_t len; } arr[] = { |
2203 |
struct { const char *prefix; size_t len; } arr[] = { |
|
|
2204 |
{ XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN}, |
2204 |
{ XATTR_SECURITY_PREFIX, XATTR_SECURITY_PREFIX_LEN }, |
2205 |
{ XATTR_SECURITY_PREFIX, XATTR_SECURITY_PREFIX_LEN }, |
2205 |
{ XATTR_TRUSTED_PREFIX, XATTR_TRUSTED_PREFIX_LEN } |
2206 |
{ XATTR_TRUSTED_PREFIX, XATTR_TRUSTED_PREFIX_LEN } |
2206 |
}; |
2207 |
}; |
Lines 2256-2261
static int shmem_setxattr(struct dentry *dentry, const char *name,
Link Here
|
2256 |
if (err) |
2257 |
if (err) |
2257 |
return err; |
2258 |
return err; |
2258 |
|
2259 |
|
|
|
2260 |
if (!strncmp(name, XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN)) { |
2261 |
if (strcmp(name, XATTR_NAME_PAX_FLAGS)) |
2262 |
return -EOPNOTSUPP; |
2263 |
if (size > 8) |
2264 |
return -EINVAL; |
2265 |
} |
2259 |
return simple_xattr_set(&info->xattrs, name, value, size, flags); |
2266 |
return simple_xattr_set(&info->xattrs, name, value, size, flags); |
2260 |
} |
2267 |
} |
2261 |
|
2268 |
|