Преглед на файлове

sunrpc: reply AUTH_BADCRED to RPCSEC_GSS with unknown service

When an RPC message is received with RPCSEC_GSS with an unknown service
(not RPC_GSS_SVC_NONE, RPC_GSS_SVC_INTEGRITY, or RPC_GSS_SVC_PRIVACY),
svcauth_gss_accept() returns AUTH_BADCRED, but svcauth_gss_release()
subsequently drops the response entirely, discarding the error.

Fix that so the AUTH_BADCRED error is returned to the client.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Wei Yongjun преди 16 години
родител
ревизия
eac81736e6
променени са 1 файла, в които са добавени 4 реда и са изтрити 2 реда
  1. 4 2
      net/sunrpc/auth_gss/svcauth_gss.c

+ 4 - 2
net/sunrpc/auth_gss/svcauth_gss.c

@@ -1374,8 +1374,10 @@ svcauth_gss_release(struct svc_rqst *rqstp)
 		if (stat)
 		if (stat)
 			goto out_err;
 			goto out_err;
 		break;
 		break;
-	default:
-		goto out_err;
+	/*
+	 * For any other gc_svc value, svcauth_gss_accept() already set
+	 * the auth_error appropriately; just fall through:
+	 */
 	}
 	}
 
 
 out:
 out: