linux/include/linux/posix_acl_xattr.h

/* SPDX-License-Identifier: GPL-2.0 */
/*
  File: linux/posix_acl_xattr.h

  Extended attribute system call representation of Access Control Lists.

  Copyright (C) 2000 by Andreas Gruenbacher <[email protected]>
  Copyright (C) 2002 SGI - Silicon Graphics, Inc <[email protected]>
 */
#ifndef _POSIX_ACL_XATTR_H
#define _POSIX_ACL_XATTR_H

#include <uapi/linux/xattr.h>
#include <uapi/linux/posix_acl_xattr.h>
#include <linux/posix_acl.h>

static inline size_t
posix_acl_xattr_size(int count)
{}

static inline int
posix_acl_xattr_count(size_t size)
{}

#ifdef CONFIG_FS_POSIX_ACL
struct posix_acl *posix_acl_from_xattr(struct user_namespace *user_ns,
				       const void *value, size_t size);
#else
static inline struct posix_acl *
posix_acl_from_xattr(struct user_namespace *user_ns, const void *value,
		     size_t size)
{
	return ERR_PTR(-EOPNOTSUPP);
}
#endif

int posix_acl_to_xattr(struct user_namespace *user_ns,
		       const struct posix_acl *acl, void *buffer, size_t size);
static inline const char *posix_acl_xattr_name(int type)
{}

static inline int posix_acl_type(const char *name)
{}

/* These are legacy handlers. Don't use them for new code. */
extern const struct xattr_handler nop_posix_acl_access;
extern const struct xattr_handler nop_posix_acl_default;

#endif	/* _POSIX_ACL_XATTR_H */