From owner-freebsd-stable Wed May 12 2:19:16 1999 Delivered-To: freebsd-stable@freebsd.org Received: from david.siemens.de (david.siemens.de [192.35.17.14]) by hub.freebsd.org (Postfix) with ESMTP id 4AA1115315 for ; Wed, 12 May 1999 02:19:11 -0700 (PDT) (envelope-from andre.albsmeier@mchp.siemens.de) X-Envelope-Sender-Is: andre.albsmeier@mchp.siemens.de (at relayer david.siemens.de) Received: from mail1.siemens.de (mail1.siemens.de [139.23.33.14]) by david.siemens.de (8.9.3/8.9.3) with ESMTP id LAA11709 for ; Wed, 12 May 1999 11:19:10 +0200 (MET DST) Received: from curry.mchp.siemens.de (curry.mchp.siemens.de [146.180.31.23]) by mail1.siemens.de (8.9.3/8.9.3) with ESMTP id LAA07438 for ; Wed, 12 May 1999 11:19:10 +0200 (MET DST) Received: (from daemon@localhost) by curry.mchp.siemens.de (8.9.3/8.9.3) id LAA14915 for ; Wed, 12 May 1999 11:19:10 +0200 (CEST) Date: Wed, 12 May 1999 11:19:08 +0200 From: Andre Albsmeier To: "Sergey Ayukov (mailing lists)" Cc: freebsd-stable@FreeBSD.ORG Subject: Re: NFS question.. Message-ID: <19990512111908.A58262@internal> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.4i In-Reply-To: ; from Sergey Ayukov (mailing lists) on Sun, May 09, 1999 at 10:30:30PM +0400 Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sun, 09-May-1999 at 22:30:30 +0400, Sergey Ayukov (mailing lists) wrote: > On Sun, 9 May 1999, John Baldwin wrote: > > > >> Looks like you already have /var or a subdirectory under it in another > > >> exports > > >> line that contains a host from 195.208.220 > > > > > > No. Here's /etc/exports which causes the above error: > > > > > ># > > ># This file contains a list of all directories exported to other computers. > > ># It is used by rpc.nfsd and rpc.mountd. > > > > > > /vol1/ftp/pub/.1 -ro -network 195.208.220 -mask 255.255.255.0 > > > /vol1/ftp/pub/.2 -ro -network 195.208.220 -mask 255.255.255.0 > > > > > > /var/spool/pcnfs -alldirs -network 195.208.220 > > -mask 255.255.255.0 > > > /var/spool/pcnfs -alldirs -network 158.250.29 > > -mask 255.255.255.0 > > > > > > /vol1/ftp/pub/.1 -ro -network 158.250.29 -mask 255.255.255.0 > > > /vol1/ftp/pub/.2 -ro -network 158.250.29 -mask 255.255.255.0 > > > > > > /vol1 lab > > > /vol1/ftp/pub/.1 lab > > > /vol1/ftp/pub/.2 lab > > > /home -alldirs lab > > > /tmp1 lab > > > > Does it still give an error if you take the "-alldirs" option out of the > > /var/spool/pcnfs lines? > > Surprisingly, no. This looks quite interesting. The reason I was putting > -alldirs flag is in stupid pcnfs printing which mounts directories like > /var/spool/pcnfs/machine-name. The solution I have settled on is rather > ugly but seems to work: > > /var/spool/pcnfs/fine \ > /var/spool/pcnfs/fine2 \ > /var/spool/pcnfs/lyambda \ > /var/spool/pcnfs/solar \ > /var/spool/pcnfs/universe \ > /var/spool/pcnfs/silden \ > /var/spool/pcnfs/rillanon > /var/spool/pcnfs/practic \ > /var/spool/pcnfs/prof \ > /var/spool/pcnfs/spiral \ > lab friends > > (lab and friends are netgroups; this BSD feature I quite like). At least > one problem with NFS seems to go away... Thank you very much, John! OK, a lot of people will tell me now that this is terribly bad/insecure/ hacked/false/... (pick what you want), but this is what I do: /var/spool/pcnfs -network 192.168.1.0 and the following patch to mountd.c (compile with -DANDRE, of course): *** mountd.c.ORI Wed May 12 09:08:11 1999 --- mountd.c Wed May 12 11:13:31 1999 *************** *** 1230,1236 **** --- 1230,1240 ---- int cmp; if (dp) { + #ifdef ANDRE + cmp = strncmp(dp->dp_dirp, dirpath, strlen(dp->dp_dirp)); + #else cmp = strcmp(dp->dp_dirp, dirpath); + #endif if (cmp > 0) return (dirp_search(dp->dp_left, dirpath)); else if (cmp < 0) This implies -alldirs for every line in /etc/exports and this even if it isn't the root of a filesystem. It worked well for years now here... -Andre To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message