mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-17 09:43:59 +08:00
SUNRPC: Temporary sockets should inherit the cred from their parent
Temporary sockets should inherit the credential (and hence the user namespace) from the parent listener transport. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
This commit is contained in:
parent
4df493a260
commit
1237d3545c
@ -786,9 +786,10 @@ static int svc_handle_xprt(struct svc_rqst *rqstp, struct svc_xprt *xprt)
|
||||
__module_get(xprt->xpt_class->xcl_owner);
|
||||
svc_check_conn_limits(xprt->xpt_server);
|
||||
newxpt = xprt->xpt_ops->xpo_accept(xprt);
|
||||
if (newxpt)
|
||||
if (newxpt) {
|
||||
newxpt->xpt_cred = get_cred(xprt->xpt_cred);
|
||||
svc_add_new_temp_xprt(serv, newxpt);
|
||||
else
|
||||
} else
|
||||
module_put(xprt->xpt_class->xcl_owner);
|
||||
} else if (svc_xprt_reserve_slot(rqstp, xprt)) {
|
||||
/* XPT_DATA|XPT_DEFERRED case: */
|
||||
|
Loading…
Reference in New Issue
Block a user