From: Matthew Wilcox Subject: Re: kernel space realpath() Date: Sun, 23 Mar 2003 20:03:53 +0000 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <20030323200353.GG31008@parcelfarce.linux.theplanet.co.uk> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org Return-path: To: "Ramy M. Hassan" Content-Disposition: inline In-Reply-To: List-Id: linux-fsdevel.vger.kernel.org On Sun, Mar 23, 2003 at 07:49:18PM +0200, Ramy M. Hassan wrote: > I am new to kernel development. I am developing now a kernel module to > create log of all file operations under a certain specified directory. I > intercept the system calls that may do modifications to this directory > contents and create the logfile. My problem is that a system call like > sys_unlink takes a path that could be relative, and could contain ".." or > ".". It might also contain components that are symlinks to other > directories. So I want to get the real path of that file given its relative > path name. > Is there anyway to do that ? Isn't this exactly what the LSM project does? See http://lsm.immunix.org/ -- "It's not Hollywood. War is real, war is primarily not about defeat or victory, it is about death. I've seen thousands and thousands of dead bodies. Do you think I want to have an academic debate on this subject?" -- Robert Fisk