Re: NFS question

H.J. Lu (hjl@lucon.org)
Wed, 30 Sep 1998 08:25:19 -0700 (PDT)


>
> > Thanks for your bug report. Here is a patch. It is for Linux 2.1.123.
> I was a bit worried, because patch said about line offsets in vfs.c - probably
>
> I've applied patches in wrong order? (I've got clean 2.1.122 -> applied
> patch.123 - applied all patches from knfsd - applied your last patch)

It is ok. I am working on a new knfsd.

>
> > I think it should work for recent kernels also. Please let me know
> > if it fixes all the ro,root_squash bugs you have. If not, please
> > tell me how to recreate the bug. I am planning to make a new knfsd
> > soon.
>
> Thank you for the fix. Now the files couldn't be read. But the kernel prints
> messages about permission failure to the console when such a file is
> accessed (probably it was made intentionally, because code in nfsfh.c is
> ifdef'ed by NFSD_PARANOYA).

That is a kernel log. You can turn it off by undefining
NFSD_PARANOYA.

>
> But I guess some flame about this change could arise. From now on the files
> with mode 711 couldn't be executed on remote machine. We checked FreeBSD
> behaviour under similar circumstances - it allows execution of 711 files,
> but it also allows such a files to be read :(

That is what root_squash is supposed to do. You want to
treat root as nobody, don't you? I would say that is
a FreeBSD bug. You can get that behavior with no_root_squash.

>
> BTW, I have another note abouk knfsd. While playing with compiling various
> kernels and turning the machine on/off many times, I've noticed strange
> messages (probably from kexportfs, or, more exactly from kernel while
> executing kexportfs) about 'invalid argument'. I've noticed also, that such

That is normal. It is from "kexportfs -r". When you restart the
NFS server, you don't want to affect the client if possible, do
you? That is what "kexportfs -r" is trying to do. You can ignore
it.

> a messages appear only if the file /var/lib/nfs/rmtab exists and is not empty.
> Client machines are running 2.0.30; but I think they're not guilty - if
> they are down correctly, rmtab file becomes empty. When I shut my box down,
> rmtab does not get clear, but after reboot aforementioned problems appear.
> Moreover, some records may appear in rmtab twice while being _exactly_ equal.
> Is it possible to detect if remote nfs mount is still active and then
> leave only such records in rmtab file?

You need to show me how to duplicate it. I will fix it if
I can see it.

Thanks.

-- 
H.J. Lu (hjl@gnu.org)

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/