public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] svcgss: reply AUTH_BADCRED to RPCSEC_GSS with unkown services
@ 2009-08-04  9:27 Wei Yongjun
  2009-08-25 21:40 ` J. Bruce Fields
  0 siblings, 1 reply; 10+ messages in thread
From: Wei Yongjun @ 2009-08-04  9:27 UTC (permalink / raw)
  To: J. Bruce Fields, Neil Brown; +Cc: linux-nfs, nfsv4

When RPC messages is received with RPCSEC_GSS, and if the RPCSEC_GSS
include unkown services (not RPC_GSS_SVC_NONE, RPC_GSS_SVC_INTEGRITY
and RPC_GSS_SVC_PRIVACY), the response is considered as AUTH_BADCRED
in svcauth_gss_accept(), but the response be drop by
svcauth_gss_release(). I think response with AUTH_BADCRED is correct
one. So this patch fixed it.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
---
  static int
  svcauth_gss_accept(struct svc_rqst *rqstp, __be32 *authp)
  {
         switch (gc->gc_svc) {
         case RPC_GSS_SVC_NONE:
         ...
         case RPC_GSS_SVC_INTEGRITY:
         ...
         case RPC_GSS_SVC_PRIVACY:
         ...
         default:
                 goto auth_err; <-- reply with AUTH_BADCRED
         }
   ...
   }

  static int
  svcauth_gss_release(struct svc_rqst *rqstp)
  {
      ...
      switch (gc->gc_svc) {
      case RPC_GSS_SVC_NONE:
              break;
      case RPC_GSS_SVC_INTEGRITY:
      ...
      case RPC_GSS_SVC_PRIVACY:
      ...
      default:
             goto out_err; <--- will drop it
      }
      ...
  }
---
 net/sunrpc/auth_gss/svcauth_gss.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/sunrpc/auth_gss/svcauth_gss.c b/net/sunrpc/auth_gss/svcauth_gss.c
index 2278a50..6dce327 100644
--- a/net/sunrpc/auth_gss/svcauth_gss.c
+++ b/net/sunrpc/auth_gss/svcauth_gss.c
@@ -1370,7 +1370,7 @@ svcauth_gss_release(struct svc_rqst *rqstp)
 			goto out_err;
 		break;
 	default:
-		goto out_err;
+		goto out;
 	}
 
 out:
-- 
1.6.2.2





^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2009-08-28 16:11 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-04  9:27 [PATCH] svcgss: reply AUTH_BADCRED to RPCSEC_GSS with unkown services Wei Yongjun
2009-08-25 21:40 ` J. Bruce Fields
2009-08-26  0:34   ` Wei Yongjun
2009-08-26 20:57     ` J. Bruce Fields
2009-08-27  2:23       ` Wei Yongjun
2009-08-27 16:26         ` J. Bruce Fields
2009-08-27 21:05           ` J. Bruce Fields
2009-08-27 21:09             ` J. Bruce Fields
2009-08-28  0:53             ` Wei Yongjun
2009-08-28 16:11               ` J. Bruce Fields

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox