1 // SPDX-License-Identifier: GPL-2.0-only 1 // SPDX-License-Identifier: GPL-2.0-only 2 /* 2 /* 3 * Copyright (C) 2011 IBM Corporation 3 * Copyright (C) 2011 IBM Corporation 4 * 4 * 5 * Author: 5 * Author: 6 * Mimi Zohar <zohar@us.ibm.com> 6 * Mimi Zohar <zohar@us.ibm.com> 7 */ 7 */ 8 8 9 #include <linux/xattr.h> 9 #include <linux/xattr.h> 10 #include <linux/evm.h> 10 #include <linux/evm.h> 11 11 12 int posix_xattr_acl(const char *xattr) 12 int posix_xattr_acl(const char *xattr) 13 { 13 { 14 int xattr_len = strlen(xattr); 14 int xattr_len = strlen(xattr); 15 15 16 if ((strlen(XATTR_NAME_POSIX_ACL_ACCES 16 if ((strlen(XATTR_NAME_POSIX_ACL_ACCESS) == xattr_len) 17 && (strncmp(XATTR_NAME_POSIX_ACL_ 17 && (strncmp(XATTR_NAME_POSIX_ACL_ACCESS, xattr, xattr_len) == 0)) 18 return 1; 18 return 1; 19 if ((strlen(XATTR_NAME_POSIX_ACL_DEFAU 19 if ((strlen(XATTR_NAME_POSIX_ACL_DEFAULT) == xattr_len) 20 && (strncmp(XATTR_NAME_POSIX_ACL_ 20 && (strncmp(XATTR_NAME_POSIX_ACL_DEFAULT, xattr, xattr_len) == 0)) 21 return 1; 21 return 1; 22 return 0; 22 return 0; 23 } 23 } 24 24
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.