From: Jan Hudec <bulb@ucw.cz>
To: "Ramy M. Hassan" <ramy@gawab.com>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: kernel space realpath()
Date: Mon, 24 Mar 2003 07:34:37 +0100 [thread overview]
Message-ID: <20030324063437.GD8167@vagabond> (raw)
In-Reply-To: <CCECILLGFFAMGKMMDOHPMEDOCBAA.ramy@gawab.com>
On Sun, Mar 23, 2003 at 07:49:18PM +0200, Ramy M. Hassan wrote:
> Hi,
> 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 ?
You should take a look at some syscall, that returns path. Like
sys_getcwd. It call d_path (resp. __d_path, because it already has all
the locks).
-------------------------------------------------------------------------------
Jan 'Bulb' Hudec <bulb@ucw.cz>
next prev parent reply other threads:[~2003-03-24 6:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-23 17:49 kernel space realpath() Ramy M. Hassan
2003-03-23 20:03 ` Matthew Wilcox
2003-03-24 21:06 ` Chris Wright
2003-03-24 6:34 ` Jan Hudec [this message]
2003-03-24 7:26 ` Nir Tzachar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030324063437.GD8167@vagabond \
--to=bulb@ucw.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=ramy@gawab.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).