summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>1997-03-25 05:08:28 +0000
committerPeter Wemm <peter@FreeBSD.org>1997-03-25 05:08:28 +0000
commit289c56e81e6bc07368ecc23f0e5b6d8a7edfd654 (patch)
tree690a5d6a072d5cfec81e3eb5edfd18d17e652185
parentff26e1340f6021c99e9a729d3c592acd00857a7a (diff)
Notes
-rw-r--r--sys/nfs/nfs_serv.c11
-rw-r--r--sys/nfsserver/nfs_serv.c11
2 files changed, 14 insertions, 8 deletions
diff --git a/sys/nfs/nfs_serv.c b/sys/nfs/nfs_serv.c
index 1f77e7b32808..9109442b73f2 100644
--- a/sys/nfs/nfs_serv.c
+++ b/sys/nfs/nfs_serv.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_serv.c 8.3 (Berkeley) 1/12/94
- * $Id$
+ * $Id: nfs_serv.c,v 1.37 1997/02/22 09:42:38 peter Exp $
*/
/*
@@ -1711,9 +1711,10 @@ nfsrv_remove(nfsd, slp, procp, mrq)
}
if (!error) {
vp = nd.ni_vp;
- if (vp->v_type == VDIR &&
- (error = suser(cred, (u_short *)0)))
+ if (vp->v_type == VDIR) {
+ error = EPERM; /* POSIX */
goto out;
+ }
/*
* The root of a mounted filesystem cannot be deleted.
*/
@@ -1997,8 +1998,10 @@ nfsrv_link(nfsd, slp, procp, mrq)
nfsm_srvwcc_data(dirfor_ret, &dirfor, diraft_ret, &diraft);
return (0);
}
- if (vp->v_type == VDIR && (error = suser(cred, (u_short *)0)))
+ if (vp->v_type == VDIR) {
+ error = EPERM; /* POSIX */
goto out1;
+ }
nd.ni_cnd.cn_cred = cred;
nd.ni_cnd.cn_nameiop = CREATE;
nd.ni_cnd.cn_flags = LOCKPARENT;
diff --git a/sys/nfsserver/nfs_serv.c b/sys/nfsserver/nfs_serv.c
index 1f77e7b32808..9109442b73f2 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$
+ * $Id: nfs_serv.c,v 1.37 1997/02/22 09:42:38 peter Exp $
*/
/*
@@ -1711,9 +1711,10 @@ nfsrv_remove(nfsd, slp, procp, mrq)
}
if (!error) {
vp = nd.ni_vp;
- if (vp->v_type == VDIR &&
- (error = suser(cred, (u_short *)0)))
+ if (vp->v_type == VDIR) {
+ error = EPERM; /* POSIX */
goto out;
+ }
/*
* The root of a mounted filesystem cannot be deleted.
*/
@@ -1997,8 +1998,10 @@ nfsrv_link(nfsd, slp, procp, mrq)
nfsm_srvwcc_data(dirfor_ret, &dirfor, diraft_ret, &diraft);
return (0);
}
- if (vp->v_type == VDIR && (error = suser(cred, (u_short *)0)))
+ if (vp->v_type == VDIR) {
+ error = EPERM; /* POSIX */
goto out1;
+ }
nd.ni_cnd.cn_cred = cred;
nd.ni_cnd.cn_nameiop = CREATE;
nd.ni_cnd.cn_flags = LOCKPARENT;