xref: /kernel/linux/linux-5.10/security/integrity/evm/evm_posix_acl.c
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /kernel/linux/linux-5.10/security/integrity/evm/
18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-only
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * Copyright (C) 2011 IBM Corporation
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci * Author:
68c2ecf20Sopenharmony_ci * Mimi Zohar <zohar@us.ibm.com>
78c2ecf20Sopenharmony_ci */
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ci#include <linux/xattr.h>
108c2ecf20Sopenharmony_ci#include <linux/evm.h>
118c2ecf20Sopenharmony_ci
128c2ecf20Sopenharmony_ciint posix_xattr_acl(const char *xattr)
138c2ecf20Sopenharmony_ci{
148c2ecf20Sopenharmony_ci	int xattr_len = strlen(xattr);
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_ci	if ((strlen(XATTR_NAME_POSIX_ACL_ACCESS) == xattr_len)
178c2ecf20Sopenharmony_ci	     && (strncmp(XATTR_NAME_POSIX_ACL_ACCESS, xattr, xattr_len) == 0))
188c2ecf20Sopenharmony_ci		return 1;
198c2ecf20Sopenharmony_ci	if ((strlen(XATTR_NAME_POSIX_ACL_DEFAULT) == xattr_len)
208c2ecf20Sopenharmony_ci	     && (strncmp(XATTR_NAME_POSIX_ACL_DEFAULT, xattr, xattr_len) == 0))
218c2ecf20Sopenharmony_ci		return 1;
228c2ecf20Sopenharmony_ci	return 0;
238c2ecf20Sopenharmony_ci}
24

Indexes created Thu Nov 07 10:32:03 CST 2024