[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Dazuko-devel] Symlink reporting

From: John Ogness
Subject: Re: [Dazuko-devel] Symlink reporting
Date: Thu, 20 Jan 2005 16:02:39 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913

Sami Tikka wrote:
I would propose that dazuko would always report the symlink access to the daemon. The daemon can see that the file is a symlink and readlink() to find out the real file.


Dazuko currently gets the accessed filename. If the file is a link it _also_ gets the real filename. These filenames are stored in a linked list called "aliases". If any of the aliases are included in the IncludePath, the file access is reported using that name. If both names are in the IncludePath, the real filename will be displayed. This is because new names are added to the front of the alias-list and the first matched name is returned.

I agree that Dazuko should return the link and not the real name. This can be very easily fixed by adding new names to the end of the alias-list instead of to the beginning.

On Linux 2.6 I guess the way to go is to set up an inode_follow_link callback and report the symlink access from there. Unfortunately, when the inode_permission callback is called, there is no way to know if inode_follow_link was called previously. This means that on Linux 2.6 the dazuko driver would report file accesses thru symlink twice: first the access to the symlink and then the access to the real file.

As I mentioned before, this code is already implemented in Dazuko (for example, look at the xp_fill_file_struct() function in dazuko_linux.c). As long as registered applications are doing the readlink() calls, there will be no second event generated.

We already have an implementation of this. Should I post the patch or does someone feel there is another, better way to implement this?

I believe there is very little that must be changed (just reverse the order that the alias-list is built). But I would still be interested in seeing your patch. There may be some cool tricks there that I would like to use. ;)

John Ogness

Dazuko Maintainer

reply via email to

[Prev in Thread] Current Thread [Next in Thread]