blob: 46408b9e62e876e4f711a5231ab0584aa5c7c1fd [file] [log] [blame]
Mimi Zoharbf6d0f52011-08-18 18:07:44 -04001/*
2 * Copyright (C) 2011 IBM Corporation
3 *
4 * Author:
5 * Mimi Zohar <zohar@us.ibm.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, version 2 of the License.
10 */
11
12#include <linux/module.h>
13#include <linux/xattr.h>
Dmitry Kasatkin089bc8e2013-10-10 15:56:13 +090014#include <linux/evm.h>
Mimi Zoharbf6d0f52011-08-18 18:07:44 -040015
Dmitry Kasatkin089bc8e2013-10-10 15:56:13 +090016int posix_xattr_acl(const char *xattr)
Mimi Zoharbf6d0f52011-08-18 18:07:44 -040017{
18 int xattr_len = strlen(xattr);
19
20 if ((strlen(XATTR_NAME_POSIX_ACL_ACCESS) == xattr_len)
21 && (strncmp(XATTR_NAME_POSIX_ACL_ACCESS, xattr, xattr_len) == 0))
22 return 1;
23 if ((strlen(XATTR_NAME_POSIX_ACL_DEFAULT) == xattr_len)
24 && (strncmp(XATTR_NAME_POSIX_ACL_DEFAULT, xattr, xattr_len) == 0))
25 return 1;
26 return 0;
27}