From cc45b429c83c0506169dbdcdbe7d917900981664 Mon Sep 17 00:00:00 2001 From: Jeremy Filizetti Date: Sun, 13 Dec 2015 23:52:46 -0500 Subject: [PATCH] LU-3289 gss: Return GSS major and minor status Return the major and minor status codes back from the server side userspace component (lsvcgssd) instead of defaulting to GSS_S_FAILURE for the major and 0 for the minor. Signed-off-by: Jeremy Filizetti Change-Id: I14d1a4b4ab6fb982e3c6c9c062d585865aa77ca0 Reviewed-on: http://review.whamcloud.com/17599 Tested-by: Jenkins Reviewed-by: John L. Hammond Reviewed-by: Andreas Dilger Reviewed-by: Sebastien Buisson Tested-by: Maloo --- lustre/ptlrpc/gss/gss_svc_upcall.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lustre/ptlrpc/gss/gss_svc_upcall.c b/lustre/ptlrpc/gss/gss_svc_upcall.c index 8944ef8..047b71a 100644 --- a/lustre/ptlrpc/gss/gss_svc_upcall.c +++ b/lustre/ptlrpc/gss/gss_svc_upcall.c @@ -182,7 +182,7 @@ static void rsi_free(struct rsi *rsi) rawobj_free(&rsi->out_token); } -/* See handle_req() userspace for where the upcall data is read */ +/* See handle_channel_req() userspace for where the upcall data is read */ static void rsi_request(struct cache_detail *cd, struct cache_head *h, char **bpp, int *blen) @@ -1017,8 +1017,11 @@ cache_check: if (!rsci) { CERROR("authentication failed\n"); - if (!gss_pack_err_notify(req, GSS_S_FAILURE, 0)) - rc = SECSVC_COMPLETE; + /* gss mechanism returned major and minor code so we return + * those in error message */ + if (!gss_pack_err_notify(req, rsip->major_status, + rsip->minor_status)) + rc = SECSVC_COMPLETE; GOTO(out, rc); } else { -- 1.8.3.1