Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0-only
0002 /*
0003  * Copyright (C) 2011 IBM Corporation
0004  *
0005  * Author:
0006  * Mimi Zohar <zohar@us.ibm.com>
0007  */
0008 
0009 #include <linux/xattr.h>
0010 #include <linux/evm.h>
0011 
0012 int posix_xattr_acl(const char *xattr)
0013 {
0014     int xattr_len = strlen(xattr);
0015 
0016     if ((strlen(XATTR_NAME_POSIX_ACL_ACCESS) == xattr_len)
0017          && (strncmp(XATTR_NAME_POSIX_ACL_ACCESS, xattr, xattr_len) == 0))
0018         return 1;
0019     if ((strlen(XATTR_NAME_POSIX_ACL_DEFAULT) == xattr_len)
0020          && (strncmp(XATTR_NAME_POSIX_ACL_DEFAULT, xattr, xattr_len) == 0))
0021         return 1;
0022     return 0;
0023 }