summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/fs/nfs/nfs_commonport.c2
-rw-r--r--sys/fs/nfs/nfs_commonsubs.c14
2 files changed, 12 insertions, 4 deletions
diff --git a/sys/fs/nfs/nfs_commonport.c b/sys/fs/nfs/nfs_commonport.c
index 2f91567..2853854 100644
--- a/sys/fs/nfs/nfs_commonport.c
+++ b/sys/fs/nfs/nfs_commonport.c
@@ -549,7 +549,7 @@ nfs_supportsnfsv4acls(struct vnode *vp)
if (nfsrv_useacl == 0)
return (0);
- error = VOP_PATHCONF(vp, _PC_ACL_NFS4, &retval);
+ error = nfsvno_pathconf(vp, _PC_ACL_NFS4, &retval, NULL, NULL);
if (error == 0 && retval != 0)
return (1);
return (0);
diff --git a/sys/fs/nfs/nfs_commonsubs.c b/sys/fs/nfs/nfs_commonsubs.c
index 2e9eabc0..ff5ea59 100644
--- a/sys/fs/nfs/nfs_commonsubs.c
+++ b/sys/fs/nfs/nfs_commonsubs.c
@@ -774,6 +774,7 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp,
struct dqblk dqb;
uid_t savuid;
#endif
+ register_t chownres;
if (compare) {
retnotsup = 0;
@@ -1106,8 +1107,12 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp,
NFSM_DISSECT(tl, u_int32_t *, NFSX_UNSIGNED);
if (compare) {
if (!(*retcmpp)) {
- if (*tl != newnfs_true)
- *retcmpp = NFSERR_NOTSAME;
+ error = nfsvno_pathconf(vp,
+ _PC_CHOWN_RESTRICTED, &chownres,
+ nd->nd_cred, p);
+ if (*tl != (chownres != 0 ?
+ newnfs_true : newnfs_false))
+ *retcmpp = NFSERR_NOTSAME;
}
} else if (pc != NULL) {
pc->pc_chownrestricted =
@@ -1951,6 +1956,7 @@ nfsv4_fillattr(struct nfsrv_descript *nd, struct mount *mp, vnode_t vp,
struct dqblk dqb;
uid_t savuid;
#endif
+ register_t chownres;
/*
* First, set the bits that can be filled and get fsinfo.
@@ -2130,7 +2136,9 @@ nfsv4_fillattr(struct nfsrv_descript *nd, struct mount *mp, vnode_t vp,
break;
case NFSATTRBIT_CHOWNRESTRICTED:
NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED);
- *tl = newnfs_true;
+ error = nfsvno_pathconf(vp, _PC_CHOWN_RESTRICTED,
+ &chownres, nd->nd_cred, p);
+ *tl = (chownres ? newnfs_true : newnfs_false);
retnum += NFSX_UNSIGNED;
break;
case NFSATTRBIT_FILEHANDLE:
OpenPOWER on IntegriCloud