acl.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*-------------------------------------------------------------------------*
  2. * File: fs/jffs2/acl.h
  3. * POSIX ACL support on JFFS2 FileSystem
  4. *
  5. * Implemented by KaiGai Kohei <kaigai@ak.jp.nec.com>
  6. * Copyright (C) 2006 NEC Corporation
  7. *
  8. * For licensing information, see the file 'LICENCE' in the jffs2 directory.
  9. *-------------------------------------------------------------------------*/
  10. typedef struct {
  11. jint16_t e_tag;
  12. jint16_t e_perm;
  13. jint32_t e_id;
  14. } jffs2_acl_entry;
  15. typedef struct {
  16. jint16_t e_tag;
  17. jint16_t e_perm;
  18. } jffs2_acl_entry_short;
  19. typedef struct {
  20. jint32_t a_version;
  21. } jffs2_acl_header;
  22. #ifdef __KERNEL__
  23. #ifdef CONFIG_JFFS2_FS_POSIX_ACL
  24. #define JFFS2_ACL_NOT_CACHED ((void *)-1)
  25. extern int jffs2_permission(struct inode *, int, struct nameidata *);
  26. extern int jffs2_acl_chmod(struct inode *);
  27. extern int jffs2_init_acl(struct inode *, struct inode *);
  28. extern void jffs2_clear_acl(struct inode *);
  29. extern struct xattr_handler jffs2_acl_access_xattr_handler;
  30. extern struct xattr_handler jffs2_acl_default_xattr_handler;
  31. #else
  32. #define jffs2_permission NULL
  33. #define jffs2_acl_chmod(inode) (0)
  34. #define jffs2_init_acl(inode,dir) (0)
  35. #define jffs2_clear_acl(inode)
  36. #endif /* CONFIG_JFFS2_FS_POSIX_ACL */
  37. #endif /* __KERNEL__ */