summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/fs/nfs/nfs_auth.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/uts/common/fs/nfs/nfs_auth.c')
-rw-r--r--usr/src/uts/common/fs/nfs/nfs_auth.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/usr/src/uts/common/fs/nfs/nfs_auth.c b/usr/src/uts/common/fs/nfs/nfs_auth.c
index f34b4c15bc..ac8fbe75cc 100644
--- a/usr/src/uts/common/fs/nfs/nfs_auth.c
+++ b/usr/src/uts/common/fs/nfs/nfs_auth.c
@@ -23,8 +23,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <sys/param.h>
#include <sys/errno.h>
#include <sys/vfs.h>
@@ -99,8 +97,8 @@ nfsauth_init(void)
* Allocate nfsauth cache handle
*/
exi_cache_handle = kmem_cache_create("exi_cache_handle",
- sizeof (struct auth_cache), 0, NULL, NULL,
- exi_cache_reclaim, NULL, NULL, 0);
+ sizeof (struct auth_cache), 0, NULL, NULL,
+ exi_cache_reclaim, NULL, NULL, 0);
}
/*
@@ -177,9 +175,8 @@ nfsauth4_access(struct exportinfo *exi, vnode_t *vp, struct svc_req *req)
* Allow ro permission with LIMITED view if there is a
* sub-dir exported under vp.
*/
- if (has_visible(exi, vp)) {
+ if (has_visible(exi, vp))
return (NFSAUTH_LIMITED);
- }
}
return (access);
@@ -517,7 +514,7 @@ nfsauth4_secinfo_access(struct exportinfo *exi, struct svc_req *req,
/*
* Optimize if there are no lists
*/
- if ((perm & M_ROOT) == 0) {
+ if ((perm & (M_ROOT|M_NONE)) == 0) {
perm &= ~M_4SEC_EXPORTED;
if (perm == M_RO)
return (NFSAUTH_RO);
@@ -598,7 +595,7 @@ nfsauth_access(struct exportinfo *exi, struct svc_req *req)
* Optimize if there are no lists
*/
perm = sp[i].s_flags;
- if ((perm & M_ROOT) == 0) {
+ if ((perm & (M_ROOT|M_NONE)) == 0) {
perm &= ~M_4SEC_EXPORTED;
if (perm == M_RO)
return (mapaccess | NFSAUTH_RO);
@@ -607,6 +604,8 @@ nfsauth_access(struct exportinfo *exi, struct svc_req *req)
}
access = nfsauth_cache_get(exi, req, flavor);
+ if (access & NFSAUTH_DENIED)
+ access = NFSAUTH_DENIED;
return (access | mapaccess);
}