All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chuck Lever III <chuck.lever@oracle.com>
To: Dai Ngo <dai.ngo@oracle.com>, Neil Brown <neilb@suse.de>
Cc: Linux NFS Mailing List <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH] NFSD: callback request does not use correct credential for AUTH_SYS
Date: Sun, 2 Apr 2023 15:09:16 +0000	[thread overview]
Message-ID: <CF4DFCD5-332D-4147-AA8A-F81FAB96AFA4@oracle.com> (raw)
In-Reply-To: <1680380528-22306-1-git-send-email-dai.ngo@oracle.com>



> On Apr 1, 2023, at 4:22 PM, Dai Ngo <dai.ngo@oracle.com> wrote:
> 
> Currently callback request does not use the credential specified in
> CREATE_SESSION if the security flavor for the back channel is AUTH_SYS.
> 
> Problem was discovered by pynfs 4.1 DELEG5 and DELEG7 test with error:
> DELEG5   st_delegation.testCBSecParms     : FAILURE
>           expected callback with uid, gid == 17, 19, got 0, 0
> 
> Signed-off-by: Dai Ngo <dai.ngo@oracle.com>

Does

Fixes: 8276c902bbe9 ("SUNRPC: remove uid and gid from struct auth_cred")

sound OK to everyone?


> ---
> fs/nfsd/nfs4callback.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c
> index 2a815f5a52c4..4039ffcf90ba 100644
> --- a/fs/nfsd/nfs4callback.c
> +++ b/fs/nfsd/nfs4callback.c
> @@ -946,8 +946,8 @@ static const struct cred *get_backchannel_cred(struct nfs4_client *clp, struct r
> if (!kcred)
> return NULL;
> 
> - kcred->uid = ses->se_cb_sec.uid;
> - kcred->gid = ses->se_cb_sec.gid;
> + kcred->fsuid = ses->se_cb_sec.uid;
> + kcred->fsgid = ses->se_cb_sec.gid;
> return kcred;
> }
> }
> -- 
> 2.9.5
> 

--
Chuck Lever



  reply	other threads:[~2023-04-02 15:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-01 20:22 [PATCH] NFSD: callback request does not use correct credential for AUTH_SYS Dai Ngo
2023-04-02 15:09 ` Chuck Lever III [this message]
2023-04-02 23:53   ` NeilBrown
2023-04-04 10:54 ` Jeff Layton

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=CF4DFCD5-332D-4147-AA8A-F81FAB96AFA4@oracle.com \
    --to=chuck.lever@oracle.com \
    --cc=dai.ngo@oracle.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neilb@suse.de \
    /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.