2019-06-01 16:08:55 +08:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-only
|
2011-08-19 06:07:44 +08:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2011 IBM Corporation
|
|
|
|
*
|
|
|
|
* Author:
|
|
|
|
* Mimi Zohar <zohar@us.ibm.com>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <linux/xattr.h>
|
2013-10-10 14:56:13 +08:00
|
|
|
#include <linux/evm.h>
|
2011-08-19 06:07:44 +08:00
|
|
|
|
2013-10-10 14:56:13 +08:00
|
|
|
int posix_xattr_acl(const char *xattr)
|
2011-08-19 06:07:44 +08:00
|
|
|
{
|
|
|
|
int xattr_len = strlen(xattr);
|
|
|
|
|
|
|
|
if ((strlen(XATTR_NAME_POSIX_ACL_ACCESS) == xattr_len)
|
|
|
|
&& (strncmp(XATTR_NAME_POSIX_ACL_ACCESS, xattr, xattr_len) == 0))
|
|
|
|
return 1;
|
|
|
|
if ((strlen(XATTR_NAME_POSIX_ACL_DEFAULT) == xattr_len)
|
|
|
|
&& (strncmp(XATTR_NAME_POSIX_ACL_DEFAULT, xattr, xattr_len) == 0))
|
|
|
|
return 1;
|
|
|
|
return 0;
|
|
|
|
}
|