From owner-freebsd-hackers Wed Nov 13 15:43:48 2002 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 A34E637B401 for ; Wed, 13 Nov 2002 15:43:45 -0800 (PST) Received: from milla.ask33.net (milla.ask33.net [217.197.166.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2D38D43E42 for ; Wed, 13 Nov 2002 15:43:42 -0800 (PST) (envelope-from nick@milla.ask33.net) Received: by milla.ask33.net (Postfix, from userid 1001) id 6BF673ABD49; Thu, 14 Nov 2002 00:49:06 +0100 (CET) Date: Thu, 14 Nov 2002 00:49:05 +0100 From: Pawel Jakub Dawidek To: Terry Lambert Cc: freebsd-hackers@freebsd.org Subject: Re: Shared files within a jail Message-ID: <20021113234904.GM590@garage.freebsd.pl> References: <20021113030847.69266.qmail@web12801.mail.yahoo.com> <20021113112325.GK590@garage.freebsd.pl> <3DD2E016.7862490@mindspring.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="OQhbRXNHSL5w/5po" Content-Disposition: inline In-Reply-To: <3DD2E016.7862490@mindspring.com> X-PGP-Key-URL: http://garage.freebsd.pl/jules.asc X-OS: FreeBSD 4.6-STABLE i386 User-Agent: Mutt/1.5.1i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --OQhbRXNHSL5w/5po Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Nov 13, 2002 at 03:28:22PM -0800, Terry Lambert wrote: +> Don't worry about it. It's only a problem for mmap'ed files +> which are also read/written. Sheesh. I have found one little bug in nullfs. I've send it some time ago to hackers@, but without any respond. Here it is, maybe someone could check it: -----[ start mail ]----- I have found something like this, but I'm not sure of this is a bug in nullfs: # cd # mkdir dir1 # mkdir dir1/dir2 # mkdir dir3 # mount_null dir1 dir3 Now simple proram "test": -----[ start ]----- #include #include #include #include #include #include int main(int argc, char *argv[]) { char buf[MAXPATHLEN]; /* I just want to be sure that I'm calling syscall directly. */ if (syscall(SYS___getcwd, buf, sizeof buf) !=3D 0) { fprintf(stderr, "%s: %s\n", argv[0], strerror(errno)); exit(1); } printf("out: [%s]\n", buf); exit(0); } -----[ end ]----- And now: # cd ~/dir3/dir1 # /path/to/test /path/to/test: Not a directory Problem is here (line 571 in /sys/kern/vfs_cache.c): if (vp->v_dd->v_id !=3D vp->v_ddid) { numcwdfail1++; free(buf, M_TEMP); return (ENOTDIR); } If "dir3" is for example NFS mount-point there are no problems. Any ideas? -----[ end mail ]----- --=20 Pawel Jakub Dawidek UNIX Systems Administrator http://garage.freebsd.pl Am I Evil? Yes, I Am. --OQhbRXNHSL5w/5po Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD) iQCVAwUBPdLk8D/PhmMH/Mf1AQF9agP/Q7c5W2GnXX1cd9+neMOCiJL6A2j7jILn TiyyOMpKRX3Ybwfykq+MlgsDzoYIg6t4+StDANj2vysYK9Z7EqMf5rfXKr6Q6nVH wTlFc3tisWmx8q+rU+BvtX3jmPioTVM+XtsFIu4pxjIgDDCaVXtZd0hByl0yA88I j66e7/vjw0U= =GzW4 -----END PGP SIGNATURE----- --OQhbRXNHSL5w/5po-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message