Hi Eric,
On Fri, May 09, 2003 at 12:00:02AM -0700, Ecartis wrote:
>
> In This Issue:
> accessing the ACL of a file inside XFS kernel.
>
>
> From: "Eric Chen" <echen@xxxxxxxxxxx>
> Subject: accessing the ACL of a file inside XFS kernel.
> Date: Thu, 8 May 2003 17:15:19 -0700
>
>
> Hi,
>
> I am looking into the XFS kernel code, and in the function
>
> STATIC int
> linvfs_unlink(
> struct inode *dir,
> struct dentry *dentry)
>
> in fs/xfs/linux/xfs_iops.c, I want to be able to get the ACL for that file.
>
> I looked into the function xfs_acl_vget(vp, data, size, _ACL_TYPE_ACCESS),
> however, it returns an int, while I want an ACL.
xfs_acl_vget is used for getting the posix acl EA and not for the XFS acl.
>
> I also looked into the function xfs_acl_get_attr(vp, acl, _ACL_TYPE_ACCESS,
> 0, &err),
> but I get an error: undefined reference to 'xfs_acl_get_attr' when I try to
> compile.
The func is static to xfs_acl.c .
>
> I am wondering how I can get the acl with just the inode *dir and dentry
> *dentry. I want to eventually be able to look at the
> acl->acl_entry[i].ae_perm so I can check the ACL permissions of that file.
>
> ~Eric
>
How about using:
_ACL_GET_ACCESS(pv,pa) for the XFS access ACL
(which ends up calling xfs_acl_vtoacl()).
This function will get the xfs_acl given the vnode.
Nathan,
any reason why we have
extern int xfs_acl_get(struct vnode *, xfs_acl_t *, xfs_acl_t *);
extern int xfs_acl_set(struct vnode *, xfs_acl_t *, xfs_acl_t *);
in xfs_acl.h ?
--Tim
|