From: "J. Bruce Fields" <bfields@fieldses.org>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: bfields@redhat.com, linux-nfs@vger.kernel.org
Subject: Re: [PATCH] RFC: export options for junctions
Date: Tue, 20 Mar 2012 15:56:07 -0400 [thread overview]
Message-ID: <20120320195607.GD1431@fieldses.org> (raw)
In-Reply-To: <20120302195451.18167.81861.stgit@degas.1015granger.net>
On Fri, Mar 02, 2012 at 02:54:51PM -0500, Chuck Lever wrote:
> At Connectathon, I ran my FedFS-enabled client in a guest environment
> with NAT networking. This made the source port for my NFS connections
> unprivileged.
>
> Attempting to access a junction on my test server failed with a
> "client insecure" error on the server, even if I specified the
> "insecure" export option on the parent export. I added "insecure" to
> the default junction export options, and this fixed the problem.
>
> Bruce suggested, however, that the correct way to address this is to
> have junctions inherit the export options of their parent. I don't
> see a direct way to do this, so I'm posting this patch as a
> conversation starter.
I think you want to do something like the search in
nfs-utils/utils/mountd/cache.c:lookup_export()--look for the export with
the longest matching path, and copy options from that.
--b.
>
> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
> ---
>
> utils/mountd/cache.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/utils/mountd/cache.c b/utils/mountd/cache.c
> index ac9cdbd..35bc2e9 100644
> --- a/utils/mountd/cache.c
> +++ b/utils/mountd/cache.c
> @@ -853,7 +853,7 @@ locations_to_options(struct jp_ops *ops, nfs_fsloc_set_t locations,
> ptr += len;
> } else {
> if (last_path == NULL)
> - len = snprintf(ptr, remaining, "refer=%s@%s",
> + len = snprintf(ptr, remaining, "insecure,refer=%s@%s",
> rootpath, server);
> else
> len = snprintf(ptr, remaining, ":%s@%s",
>
next prev parent reply other threads:[~2012-03-20 19:56 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-02 19:54 [PATCH] RFC: export options for junctions Chuck Lever
2012-03-20 16:06 ` Chuck Lever
2012-03-20 19:56 ` J. Bruce Fields [this message]
2012-03-21 21:11 ` Chuck Lever
2012-03-21 21:29 ` J. Bruce Fields
2012-03-21 21:35 ` Chuck Lever
2012-03-22 10:59 ` J. Bruce Fields
2012-03-22 19:28 ` Chuck Lever
2012-03-22 19:34 ` Chuck Lever
2012-04-11 21:31 ` J. Bruce Fields
2012-04-11 21:32 ` Chuck Lever
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120320195607.GD1431@fieldses.org \
--to=bfields@fieldses.org \
--cc=bfields@redhat.com \
--cc=chuck.lever@oracle.com \
--cc=linux-nfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).