Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Jun 2004 19:25:40 +0400
From:      "Kentucky Mandeloid Mo." <ky@df.ru>
To:        freebsd-hackers@freebsd.org
Subject:   kern___getcwd() returns ENOTDIR
Message-ID:  <200406271925.40073.ky@df.ru>

next in thread | raw e-mail | index | archive | help
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? 



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