diff options
author | bde <bde@FreeBSD.org> | 1997-06-14 11:19:35 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1997-06-14 11:19:35 +0000 |
commit | 672c312961c80c4c12b4f69af0587114c6a774e3 (patch) | |
tree | 200a1eec5ea918a7fdc0a79c0ba88924504c5473 /sys/nfsserver | |
parent | f9302eec855855bfcfe0335e219be7cd02b5da21 (diff) | |
download | FreeBSD-src-672c312961c80c4c12b4f69af0587114c6a774e3.zip FreeBSD-src-672c312961c80c4c12b4f69af0587114c6a774e3.tar.gz |
Don't require superuser privileges for creating fifos. The v2 case was
broken when support for v3 was introduced in rev.1.16. The v3 case has
always been broken in FreeBSD.
Should be in 2.2.
PR: 3838
Diffstat (limited to 'sys/nfsserver')
-rw-r--r-- | sys/nfsserver/nfs_serv.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/nfsserver/nfs_serv.c b/sys/nfsserver/nfs_serv.c index 1f2827a..f393986 100644 --- a/sys/nfsserver/nfs_serv.c +++ b/sys/nfsserver/nfs_serv.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_serv.c 8.3 (Berkeley) 1/12/94 - * $Id: nfs_serv.c,v 1.42 1997/05/10 16:59:36 dfr Exp $ + * $Id: nfs_serv.c,v 1.43 1997/06/03 13:56:54 dfr Exp $ */ /* @@ -1427,7 +1427,8 @@ nfsrv_create(nfsd, slp, procp, mrq) vap->va_type == VFIFO) { if (vap->va_type == VCHR && rdev == 0xffffffff) vap->va_type = VFIFO; - if (error = suser(cred, (u_short *)0)) { + if (vap->va_type != VFIFO && + (error = suser(cred, (u_short *)0))) { vrele(nd.ni_startdir); free(nd.ni_cnd.cn_pnbuf, M_NAMEI); VOP_ABORTOP(nd.ni_dvp, &nd.ni_cnd); @@ -1621,7 +1622,7 @@ nfsrv_mknod(nfsd, slp, procp, mrq) if (!error) FREE(nd.ni_cnd.cn_pnbuf, M_NAMEI); } else { - if (error = suser(cred, (u_short *)0)) { + if (vtyp != VFIFO && (error = suser(cred, (u_short *)0))) { vrele(nd.ni_startdir); free((caddr_t)nd.ni_cnd.cn_pnbuf, M_NAMEI); VOP_ABORTOP(nd.ni_dvp, &nd.ni_cnd); |