Re: Using get_cwd inside a module.

From: Michael Welles
Date: Sat Nov 22 2003 - 12:24:15 EST


For changedfiles, using cut n' paste sys_getcwd, we've
managed to get "good enough" functionality. When a
user runs "touch foo" in /tmp/watch, when we intercept
the openw, we manage to resolve "foo" to
"/tmp/watch/foo". We still break on things like
"touch ../../foo", since we resolve that to
"/tmp/watch/../../foo" -- but that's pretty fixable
with a little effort.

NFS mounted filesystems still get us, since we rely on
intercepting the system calls and putting a wrapper
around them. I've looked into doing so, but I didn't
see a way of doing so in a module -- and we haven't
wanted to demand that users patch and rebuild a
kernel.


--- Christoph Hellwig <hch@xxxxxxxxxxxxx> wrote:

>
> Well, reporting a single path component relative to
> the parent directory
> is doable, there's just no way to have a canonical
> absolute or
> multi-component pathname.
>


__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/