linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [nfs-utils PATCH RFC 0/2] add principal to the data being tracked by nfsdcld
@ 2019-07-30 21:09 Scott Mayhew
  2019-07-30 21:09 ` [nfs-utils PATCH RFC 1/2] nfsdcld: add a "GetVersion" upcall Scott Mayhew
  2019-07-30 21:09 ` [nfs-utils PATCH RFC 2/2] nfsdcld: add support for upcall version 2 Scott Mayhew
  0 siblings, 2 replies; 3+ messages in thread
From: Scott Mayhew @ 2019-07-30 21:09 UTC (permalink / raw)
  To: steved; +Cc: linux-nfs

At the spring bakeathon, Chuck suggested that we should store the
kerberos principal in addition to the client id string in nfsdcld.  The
idea is to prevent an illegitimate client from reclaiming another
client's opens by supplying that client's id string.  This is an initial
attempt at doing that.

The first patch adds support for a "GetVersion" upcall which allows nfsd
to determine the maximum message version that nfsdcld supports.  Right
now it's based on the value of CLD_UPCALL_VERSION from cld.h, but I was
thinking we may wish to add a command-line option (and an nfs.conf)
option to make it possible to use a lower version than
CLD_UPCALL_VERSION.  My thinking here is that an older nfsdcld daemon
won't be compatible with the new database schema... rather than worrying
about messing with downgrading the database, just use the command-line
option to make it behave like an older daemon.

The second patch adds handling for the v2 Cld_Create and Cld_GraceStart
upcalls, which can include the kerberos principal which we'll store
along with the client id string in the database.  Note that if we're
talking to an old kernel that does the v1 upcall, everything still works
(we just ignore the new columns in the database).

Question: Why do we have a copy of cld.h in support/include?  It seems
unnecessary... maybe we should get rid of it so that we're always
using the cld.h from the kernel headers?

Scott Mayhew (2):
  nfsdcld: add a "GetVersion" upcall
  nfsdcld: add support for upcall version 2

 support/include/cld.h        |  37 +++++-
 utils/nfsdcld/cld-internal.h |  13 +-
 utils/nfsdcld/nfsdcld.c      | 140 +++++++++++++++++----
 utils/nfsdcld/sqlite.c       | 238 +++++++++++++++++++++++++++++------
 utils/nfsdcld/sqlite.h       |   2 +
 5 files changed, 366 insertions(+), 64 deletions(-)

-- 
2.17.2


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

end of thread, other threads:[~2019-07-30 21:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-30 21:09 [nfs-utils PATCH RFC 0/2] add principal to the data being tracked by nfsdcld Scott Mayhew
2019-07-30 21:09 ` [nfs-utils PATCH RFC 1/2] nfsdcld: add a "GetVersion" upcall Scott Mayhew
2019-07-30 21:09 ` [nfs-utils PATCH RFC 2/2] nfsdcld: add support for upcall version 2 Scott Mayhew

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).