kern___getcwd() returns ENOTDIR
Pawel Jakub Dawidek
pjd at FreeBSD.org
Mon Jun 28 00:32:04 PDT 2004
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?
--
Pawel Jakub Dawidek http://www.FreeBSD.org
pjd at FreeBSD.org http://garage.freebsd.pl
FreeBSD committer Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20040628/cc599f74/attachment.bin
More information about the freebsd-hackers
mailing list