Messages in this thread | | | Date | Sat, 22 Nov 2003 09:22:53 -0800 (PST) | From | Michael Welles <> | Subject | Re: Using get_cwd inside a module. |
| |
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@infradead.org> 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |