From: Trond Myklebust <trondmy@hammerspace.com>
To: "bfields@fieldses.org" <bfields@fieldses.org>
Cc: "linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>,
"lists@doriantaylor.com" <lists@doriantaylor.com>,
"chuck.lever@oracle.com" <chuck.lever@oracle.com>
Subject: Re: GSSAPI as it relates to NFS
Date: Mon, 3 Jan 2022 22:28:06 +0000 [thread overview]
Message-ID: <3ee50563b755cd5c1ecfa5be0c6127f5a52e9d16.camel@hammerspace.com> (raw)
In-Reply-To: <20220103215853.GP21514@fieldses.org>
On Mon, 2022-01-03 at 16:58 -0500, bfields@fieldses.org wrote:
> On Mon, Jan 03, 2022 at 09:45:45PM +0000, Trond Myklebust wrote:
> > On Mon, 2022-01-03 at 16:32 -0500, J. Bruce Fields wrote:
> > > On Sat, Dec 25, 2021 at 10:53:33PM +0000, Chuck Lever III wrote:
> > > > IIRC Linux requires that a mount operation be done by root. If
> > > > you
> > > > run
> > > > gssd with "-n", become root, then kinit as yourself, I think it
> > > > should
> > > > work.
> > > >
> > > > There has been some discussion about enabling a non-privileged
> > > > user
> > > > to
> > > > perform a mount... it's a bit tricky because the function of
> > > > mount
> > > > is
> > > > to alter the file namespace, which traditionally requires extra
> > > > privilege to do.
> > >
> > > The core VFS code is quite happy to allow you to make
> > > unprivileged
> > > mounts in your own namespace, but the particular filesystem being
> > > mounted also gets a veto.
> > >
> > > I think we're expecting NFS will be patched to allow unprivileged
> > > mounts
> > > some time. See e.g.
> > >
> > >
> > > https://lore.kernel.org/linux-nfs/aec219339d8296b7e9b114d9d247a71fd47423c5.camel@hammerspace.com
> > > /
> > >
> > > --b.
> >
> > As noted, the main issue is the bind() privileges needed for
> > AUTH_SYS.
> >
> > When using AUTH_GSS, the knfsd server doesn't care about the
> > originating port, which would allow unprivileged mounts to go ahead
> > provided that the user specifies the 'noresvport' mount option on
> > the
> > client. Isn't that working?
>
> Oh, I remembered you'd said that was one of the issues, but didn't
> understand that that was literally the only check remaining in the
> code.... In which case, you could also test this by using setcap on
> /usr/bin/mount or capsh to give the mount process
> CAP_NET_BIND_SERVICE?
> (If you also set up the right namespaces first.)
>
You'd have to give the container a CAP_NET_BIND_SERVICE privilege. With
docker, you can do that using the '--cap-add=NET_BIND_SERVICE' option.
--
Trond Myklebust
Linux NFS client maintainer, Hammerspace
trond.myklebust@hammerspace.com
next prev parent reply other threads:[~2022-01-03 22:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-23 22:27 GSSAPI as it relates to NFS Dorian Taylor
2021-12-24 17:28 ` Chuck Lever III
2021-12-24 19:15 ` Dorian Taylor (Lists)
2021-12-25 22:53 ` Chuck Lever III
2021-12-26 18:34 ` Dorian Taylor (Lists)
2022-01-03 21:32 ` J. Bruce Fields
2022-01-03 21:45 ` Trond Myklebust
2022-01-03 21:58 ` bfields
2022-01-03 22:28 ` Trond Myklebust [this message]
2022-01-06 13:44 ` Dorian Taylor (Lists)
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=3ee50563b755cd5c1ecfa5be0c6127f5a52e9d16.camel@hammerspace.com \
--to=trondmy@hammerspace.com \
--cc=bfields@fieldses.org \
--cc=chuck.lever@oracle.com \
--cc=linux-nfs@vger.kernel.org \
--cc=lists@doriantaylor.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox