diff options
author | Weston Andros Adamson <dros@primarydata.com> | 2024-09-05 15:09:46 -0400 |
---|---|---|
committer | Anna Schumaker <anna.schumaker@oracle.com> | 2024-09-23 15:03:30 -0400 |
commit | 199f2128741077087a2ab33889a6868830465033 (patch) | |
tree | fb45fe4082584cc5aca296c625ce2f99629c0a7f /net/l2tp | |
parent | 2c8919848de1e5c881fe3473645c26a1c2a927f2 (diff) | |
download | linux-199f2128741077087a2ab33889a6868830465033.tar.gz linux-199f2128741077087a2ab33889a6868830465033.tar.bz2 linux-199f2128741077087a2ab33889a6868830465033.zip |
SUNRPC: add svcauth_map_clnt_to_svc_cred_local
Add new funtion svcauth_map_clnt_to_svc_cred_local which maps a
generic cred to a svc_cred suitable for use in nfsd.
This is needed by the localio code to map nfs client creds to nfs
server credentials.
Following from net/sunrpc/auth_unix.c:unx_marshal() it is clear that
->fsuid and ->fsgid must be used (rather than ->uid and ->gid). In
addition, these uid and gid must be translated with from_kuid_munged()
so local client uses correct uid and gid when acting as local server.
Jeff Layton noted:
This is where the magic happens. Since we're working in
kuid_t/kgid_t, we don't need to worry about further idmapping.
Suggested-by: NeilBrown <neilb@suse.de> # to approximate unx_marshal()
Signed-off-by: Weston Andros Adamson <dros@primarydata.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Co-developed-by: Mike Snitzer <snitzer@kernel.org>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Reviewed-by: Chuck Lever <chuck.lever@oracle.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: NeilBrown <neilb@suse.de>
Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
Diffstat (limited to 'net/l2tp')
0 files changed, 0 insertions, 0 deletions