xfs
[Top] [All Lists]

Re: what the hell is acl_t

To: ankur mattoo <coolpal53@xxxxxxxxx>, acl-devel@xxxxxxxxxxx
Subject: Re: what the hell is acl_t
From: Nathan Scott <nathans@xxxxxxx>
Date: Wed, 24 Mar 2004 10:02:35 +1100
In-reply-to: <20040323081428.7924.qmail@web41415.mail.yahoo.com>
References: <20040323081428.7924.qmail@web41415.mail.yahoo.com>
Sender: linux-xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.3i
On Tue, Mar 23, 2004 at 12:14:28AM -0800, ankur mattoo wrote:
> hi 
> im currently working on stakable file system wrapfs.

Since these are ACL questions, not XFS questions, I've sent
this reply to a more appropriate forum.

> 1.>Well im writing a kernel code in which im supposed
> to receive ioctl argument from the user space which is
> supposed to be of the type acl_t. I mean:

You should probably step back a stage, and explain why the
xattr interfaces are unsuitable and ioctl is chosen, etc,
so that people can see where you're coming from.

> <<user code>>
> 
> acl_t the_acl;
> ioctl(File_Desc,FIST_IOCTL_SET_SEC_DESC,the_acl)
> 
> now the kernel code doesn't seem to recognize acl_t
> and reports an error. Im compiling the kernel code
> with -lacl
> flag and there is complete acl and xattr support in
> the kernel.[linux-2.4.23 with ea patch]
> what can i do bout it.
> 
> 2.>In the kernel code i wanna set the acls of a file
> using setxattr.Consider i have a inode object
> ankinode;
> 
> what name:value pair should i write corresponding to
> an acl_t perm;
> 
> I mean i have the variable perm and i gotta run
> setxattr. How can i do that???
> Any help!!!
> thanks
> ankur

The user/kernel interface (correct me, Andreas, its been awhile ;)
uses posix_acl_xattr_header/posix_acl_xattr_entry structs for all
communication; the acl_t is for libacl/application communication
only, and doesn't cross the syscall boundary.  I guess you could
look closely at where libacl talks to the kernel to get a better
idea of how it all fits together.

HTH.

cheers.

-- 
Nathan


<Prev in Thread] Current Thread [Next in Thread>