linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Honor the no_root_squash flag on pseudo roots.
@ 2012-05-29 13:07 Steve Dickson
  2012-05-29 15:00 ` Trond Myklebust
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Steve Dickson @ 2012-05-29 13:07 UTC (permalink / raw)
  To: Linux NFS Mailing List

If root squashing is turned off on a export that
has multiple directories, the parent directories
of the pseudo exports that's built, also needs to
have root squashing turned off.

Signed-off-by: Steve Dickson <steved@redhat.com>
---
 utils/mountd/v4root.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/utils/mountd/v4root.c b/utils/mountd/v4root.c
index 708eb61..ad8a3e7 100644
--- a/utils/mountd/v4root.c
+++ b/utils/mountd/v4root.c
@@ -92,7 +92,14 @@ v4root_create(char *path, nfs_export *export)
 	exp = export_create(&eep, 0);
 	if (exp == NULL)
 		return NULL;
-	xlog(D_CALL, "v4root_create: path '%s'", exp->m_export.e_path);
+	/*
+	 * Honor the no_root_squash flag 
+	 */
+	if ((curexp->e_flags & NFSEXP_ROOTSQUASH) == 0)
+		exp->m_export.e_flags &= ~NFSEXP_ROOTSQUASH;
+	xlog(D_CALL, "v4root_create: path '%s' flags 0x%x", 
+		exp->m_export.e_path, exp->m_export.e_flags);
+
 	return &exp->m_export;
 }
 
-- 
1.7.7.6


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-05-29 19:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-29 13:07 [PATCH] Honor the no_root_squash flag on pseudo roots Steve Dickson
2012-05-29 15:00 ` Trond Myklebust
2012-05-29 15:55   ` Steve Dickson
2012-05-29 16:29     ` Myklebust, Trond
2012-05-29 16:49       ` Steve Dickson
2012-05-29 15:31 ` J. Bruce Fields
2012-05-29 19:18 ` Steve Dickson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).