NFSD: callback request does not use correct credential for AUTH_SYS
Subsystems (2)
Dai Ngo
reviewerPATCH 1/1 NFSD: callback request does not use correct credential for AUTH_SYS
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
--- fs/nfsd/nfs4callback.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
fs/nfsd/nfs4callback.c +2 -2
@@ -946,8 +946,8 @@ static const struct cred *get_backchannel_cred(struct nfs4_client *clp, struct rif (!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; } }
Signature · 1 line
2.9.5
Quoted 12 lines · Dai Ngo
Currently callback request does not use the credential specified in
CREATE_SESSIONif the security flavor for the back channel isAUTH_SYS.Problem was discovered by pynfs 4.1 DELEG5 and DELEG7 test with error:
DELEG5 st_delegation.testCBSecParms : FAILUREexpected callback with uid, gid == 17, 19, got 0, 0Signed-off-by Dai Ngo <[email protected]>
Does
sound OK to everyone?
Quoted 22 lines
---
fs/nfsd/nfs4callback.c| 4 ++--1 file changed, 2 insertions(+), 2 deletions(-)fs/nfsd/nfs4callback.c +2
-2@@ -946,8 +946,8 @@ static const struct cred *get_backchannel_cred(struct nfs4_client *clp, struct rif (!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; } }Signature · 1 line
2.9.5
--
Chuck Lever
Quoted 10 lines · Chuck Lever III
Quoted 10 lines · Dai Ngo
Currently callback request does not use the credential specified in
CREATE_SESSIONif the security flavor for the back channel isAUTH_SYS.Problem was discovered by pynfs 4.1 DELEG5 and DELEG7 test with error:
DELEG5 st_delegation.testCBSecParms : FAILUREexpected callback with uid, gid == 17, 19, got 0, 0
Quoted 7 lines
Quoted 1 line
Signed-off-by Dai Ngo <[email protected]>Does
Fixes 8276c902bbe9 ("SUNRPC: remove uid and gid from struct auth_cred")sound OK to everyone?
Yes, that looks right to me. Thanks.
NeilBrown
Quoted 30 lines
Quoted 24 lines
---
fs/nfsd/nfs4callback.c| 4 ++--1 file changed, 2 insertions(+), 2 deletions(-)fs/nfsd/nfs4callback.c +2
-2@@ -946,8 +946,8 @@ static const struct cred *get_backchannel_cred(struct nfs4_client *clp, struct rif (!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; } }Signature · 1 line
2.9.5--
Chuck Lever
Quoted 17 lines · Dai Ngo
Currently callback request does not use the credential specified in
CREATE_SESSIONif the security flavor for the back channel isAUTH_SYS.Problem was discovered by pynfs 4.1 DELEG5 and DELEG7 test with error:
DELEG5 st_delegation.testCBSecParms : FAILUREexpected callback with uid, gid == 17, 19, got 0, 0Signed-off-by Dai Ngo <[email protected]>--- fs/nfsd/nfs4callback.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)fs/nfsd/nfs4callback.c +0
-0
fs/nfsd/nfs4callback.c static const struct cred *get_backchannel_cred(struct nfs4_client *clp, struct r · line 953
Quoted 10 lines
fs/nfsd/nfs4callback.c +2
-2@@ -946,8 +946,8 @@ static const struct cred *get_backchannel_cred(struct nfs4_client *clp, struct rif (!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; } }