Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Jun 2004 01:26:56 -0700
From:      David Schultz <das@FreeBSD.ORG>
To:        Pawel Jakub Dawidek <pjd@FreeBSD.ORG>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: kern___getcwd() returns ENOTDIR
Message-ID:  <20040628082656.GA15867@VARK.homeunix.com>
In-Reply-To: <20040628073202.GR12007@darkness.comp.waw.pl>
References:  <200406271925.40073.ky@df.ru> <20040627181220.GA10962@VARK.homeunix.com> <20040628073202.GR12007@darkness.comp.waw.pl>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Jun 28, 2004, Pawel Jakub Dawidek wrote:
> On Sun, Jun 27, 2004 at 11:12:20AM -0700, David Schultz wrote:
> +> On Sun, Jun 27, 2004, Kentucky Mandeloid Mo. wrote:
> +> > I'm writng a smal kernel module that catches file access syscalls.
> +> > At every syscall I need a full name of file is being passed to a syscall.
> +> > I'm getting it with a path passed to syscall and if path is not starting 
> +> > with / I get current working directory of process using kern___getcwd().
> +> > In every syscall all works just fine except rmdir & unlink.
> +> > Sometimes in unlink and everytime in rmdir it returns "not a directory" error.
> +> > I know already that kern___getcwd() works through vnode cache and this method 
> +> > is not a reliable way to get file names.
> +> > So is there any other way get cwd of a proccess? 
> +> 
> +> linux_getcwd() works in more cases than kern___getcwd(), but it
> +> has other problems.
> 
> What problems does it have? Could you provide more details?
> Was it discusses when patch for changing kern___getcwd() with
> linux_getcwd() was introduced?

It was discussed when phk merged it into kern___getcwd() last
year, and on at least one other occasion.  However, I can't seem
to find the relevant thread in the mail archives.  Perhaps phk or
dwmalone remember.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040628082656.GA15867>