From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 28 07:32:04 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 960CF16A4CE; Mon, 28 Jun 2004 07:32:04 +0000 (GMT) Received: from darkness.comp.waw.pl (darkness.comp.waw.pl [195.117.238.236]) by mx1.FreeBSD.org (Postfix) with ESMTP id 44E1A43D1D; Mon, 28 Jun 2004 07:32:04 +0000 (GMT) (envelope-from pjd@darkness.comp.waw.pl) Received: by darkness.comp.waw.pl (Postfix, from userid 1009) id 256B7ACAFB; Mon, 28 Jun 2004 09:32:02 +0200 (CEST) Date: Mon, 28 Jun 2004 09:32:02 +0200 From: Pawel Jakub Dawidek To: freebsd-hackers@FreeBSD.ORG Message-ID: <20040628073202.GR12007@darkness.comp.waw.pl> References: <200406271925.40073.ky@df.ru> <20040627181220.GA10962@VARK.homeunix.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="lXBubL3wS507qnlw" Content-Disposition: inline In-Reply-To: <20040627181220.GA10962@VARK.homeunix.com> User-Agent: Mutt/1.4.2i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 5.2.1-RC2 i386 Subject: Re: kern___getcwd() returns ENOTDIR X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2004 07:32:04 -0000 --lXBubL3wS507qnlw Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 sysca= ll. +> > I'm getting it with a path passed to syscall and if path is not starti= ng=20 +> > 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=20 +> > is not a reliable way to get file names. +> > So is there any other way get cwd of a proccess?=20 +>=20 +> 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? --=20 Pawel Jakub Dawidek http://www.FreeBSD.org pjd@FreeBSD.org http://garage.freebsd.pl FreeBSD committer Am I Evil? Yes, I Am! --lXBubL3wS507qnlw Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFA38lyForvXbEpPzQRAhi1AJ4zLWEB0VxUlLElmauSUgF8mnZdVQCbBKt3 v6lTqWnNYVO2k2816PfhU9s= =l2yJ -----END PGP SIGNATURE----- --lXBubL3wS507qnlw--