Linux NFS development
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: Dai Ngo <dai.ngo@oracle.com>, chuck.lever@oracle.com
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH] NFSD: callback request does not use correct credential for AUTH_SYS
Date: Tue, 04 Apr 2023 06:54:46 -0400	[thread overview]
Message-ID: <c29bdf3faa6d274acf7083839ecf8b2a2a66a21a.camel@kernel.org> (raw)
In-Reply-To: <1680380528-22306-1-git-send-email-dai.ngo@oracle.com>

On Sat, 2023-04-01 at 13:22 -0700, Dai Ngo 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>
> ---
>  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;
>  	}
>  }

Reviewed-by: Jeff Layton <jlayton@kernel.org>

      parent reply	other threads:[~2023-04-04 10:59 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
2023-04-02 23:53   ` NeilBrown
2023-04-04 10:54 ` Jeff Layton [this message]

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=c29bdf3faa6d274acf7083839ecf8b2a2a66a21a.camel@kernel.org \
    --to=jlayton@kernel.org \
    --cc=chuck.lever@oracle.com \
    --cc=dai.ngo@oracle.com \
    --cc=linux-nfs@vger.kernel.org \
    /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