From owner-freebsd-bugs Sun Jun 15 04:00:02 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id EAA05828 for bugs-outgoing; Sun, 15 Jun 1997 04:00:02 -0700 (PDT) Received: (from gnats@localhost) by hub.freebsd.org (8.8.5/8.8.5) id EAA05820; Sun, 15 Jun 1997 04:00:01 -0700 (PDT) Date: Sun, 15 Jun 1997 04:00:01 -0700 (PDT) Message-Id: <199706151100.EAA05820@hub.freebsd.org> To: freebsd-bugs Cc: From: Doug Rabson Subject: Re: kern/3838: fifos on nfs-mounted fs no longer permitted Reply-To: Doug Rabson Sender: owner-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk The following reply was made to PR kern/3838; it has been noted by GNATS. From: Doug Rabson To: Bruce Evans Cc: admin@citylink.dinoex.sub.org, FreeBSD-gnats-submit@freebsd.org, dfr@freebsd.org Subject: Re: kern/3838: fifos on nfs-mounted fs no longer permitted Date: Sun, 15 Jun 1997 11:57:50 +0100 (BST) On Wed, 11 Jun 1997, Bruce Evans wrote: > >mkfifo on a nfs-mounted filesystem will reply: "operation not permitted". > >This didn't happen with release 2.1.0. (No, the fs isn't mounted with > >nodev!) > > This was broken in the initial v3 import (rev.1.16), which is essentially > the same as Lite2. There are several bugs: > > 1. In the v2 case, nfsrv_create() lost some special handling for fifos. > suser() is always called, although mkfifo doesn't require special > privileges. > 2. In the v3 case, the new nfsrv_mknod() never had enough special handling > for fifos. suser() is always called, except for sockets. > 3. In the v3 case, after suser() fails, the error code is eventually > thrown away. nfsrv_mknod() returns 0, and mkfifo() returns the bogus > errno EIO. > > Bruce > > Untested fixes for (1)-(2): > > ! if (vap->va_type == VFIFO && > ! (error = suser(cred, (u_short *)0))) { I think this should be: if (vap->va_type != VFIFO && (error = suser(cred, (u_short *)0))) { Apart from that, your fixes seem to work fine. Oh. I just noticed that your fixes have already been committed. Sorry for not giving feedback earlier; I have been extremely busy on other stuff for the last few days. -- Doug Rabson Mail: dfr@nlsystems.com Nonlinear Systems Ltd. Phone: +44 181 951 1891 Fax: +44 181 381 1039