Whamcloud - gitweb
LU-3289 gss: Return GSS major and minor status 99/17599/12
authorJeremy Filizetti <jeremy.filizetti@gmail.com>
Mon, 14 Dec 2015 04:52:46 +0000 (23:52 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 13 Jun 2016 17:15:25 +0000 (17:15 +0000)
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 <jeremy.filizetti@gmail.com>
Change-Id: I14d1a4b4ab6fb982e3c6c9c062d585865aa77ca0
Reviewed-on: http://review.whamcloud.com/17599
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
lustre/ptlrpc/gss/gss_svc_upcall.c

index 8944ef8..047b71a 100644 (file)
@@ -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 {