From: Wang Yugui <wangyugui@e16-tech.com>
To: "NeilBrown" <neilb@suse.de>
Cc: Steve Dickson <steved@redhat.com>, Petr Vorel <pvorel@suse.cz>,
linux-nfs <linux-nfs@vger.kernel.org>,
Dave Jones <davej@codemonkey.org.uk>,
bfields@redhat.com
Subject: Re: [PATCH nfs-utils] mountd: don't advertise krb5 for v4root when not configured.
Date: Mon, 17 Apr 2023 10:05:12 +0800 [thread overview]
Message-ID: <20230417100511.9131.409509F4@e16-tech.com> (raw)
In-Reply-To: <168169080542.24821.1095959058130927513@noble.neil.brown.name>
Hi,
>
> If /etc/krb5.keytab does not exist, then krb5 cannot work, so
> advertising it as an option for v4root is pointless.
> Since linux commit 676e4ebd5f2c ("NFSD: SECINFO doesn't handle
> unsupported pseudoflavors correctly") this can result in an unhelpful
> warning if the krb5 code is not built, or built as a module which is not
> installed.
>
> [ 161.668635] NFS: SECINFO: security flavor 390003 is not supported
> [ 161.668655] NFS: SECINFO: security flavor 390004 is not supported
> [ 161.668670] NFS: SECINFO: security flavor 390005 is not supported
>
> So avoid advertising krb5 security options when krb5.keytab cannot be
> found.
>
> Link: https://lore.kernel.org/linux-nfs/20170104190327.v3wbpcbqtfa5jy7d@codemonkey.org.uk/
> Signed-off-by: NeilBrown <neilb@suse.de>
> ---
> support/export/v4root.c | 2 ++
> support/include/pseudoflavors.h | 1 +
> support/nfs/exports.c | 14 +++++++-------
> 3 files changed, 10 insertions(+), 7 deletions(-)
>
> diff --git a/support/export/v4root.c b/support/export/v4root.c
> index fbb0ad5f5b81..3e049582d7c1 100644
> --- a/support/export/v4root.c
> +++ b/support/export/v4root.c
> @@ -66,6 +66,8 @@ set_pseudofs_security(struct exportent *pseudo)
>
> if (!flav->fnum)
> continue;
> + if (flav->need_krb5 && !access("/etc/krb5.keytab", F_OK))
> + continue;
Could we replace "/etc/krb5.keytab" with krb5_kt_default_name()?
Best Regards
Wang Yugui (wangyugui@e16-tech.com)
2023/04/17
next prev parent reply other threads:[~2023-04-17 2:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-17 0:20 [PATCH nfs-utils] mountd: don't advertise krb5 for v4root when not configured NeilBrown
2023-04-17 2:05 ` Wang Yugui [this message]
2023-04-17 2:20 ` NeilBrown
2023-04-17 2:25 ` Wang Yugui
2023-04-18 23:54 ` NeilBrown
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=20230417100511.9131.409509F4@e16-tech.com \
--to=wangyugui@e16-tech.com \
--cc=bfields@redhat.com \
--cc=davej@codemonkey.org.uk \
--cc=linux-nfs@vger.kernel.org \
--cc=neilb@suse.de \
--cc=pvorel@suse.cz \
--cc=steved@redhat.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.