diff options
Diffstat (limited to 'net/sunrpc/auth_gss/gss_rpc_upcall.c')
-rw-r--r-- | net/sunrpc/auth_gss/gss_rpc_upcall.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/net/sunrpc/auth_gss/gss_rpc_upcall.c b/net/sunrpc/auth_gss/gss_rpc_upcall.c index 3f874d704859..c63273604ddc 100644 --- a/net/sunrpc/auth_gss/gss_rpc_upcall.c +++ b/net/sunrpc/auth_gss/gss_rpc_upcall.c | |||
@@ -220,7 +220,6 @@ static int gssp_call(struct net *net, struct rpc_message *msg) | |||
220 | 220 | ||
221 | /* numbers somewhat arbitrary but large enough for current needs */ | 221 | /* numbers somewhat arbitrary but large enough for current needs */ |
222 | #define GSSX_MAX_OUT_HANDLE 128 | 222 | #define GSSX_MAX_OUT_HANDLE 128 |
223 | #define GSSX_MAX_MECH_OID 16 | ||
224 | #define GSSX_MAX_SRC_PRINC 256 | 223 | #define GSSX_MAX_SRC_PRINC 256 |
225 | #define GSSX_KMEMBUF (GSSX_max_output_handle_sz + \ | 224 | #define GSSX_KMEMBUF (GSSX_max_output_handle_sz + \ |
226 | GSSX_max_oid_sz + \ | 225 | GSSX_max_oid_sz + \ |
@@ -242,7 +241,7 @@ int gssp_accept_sec_context_upcall(struct net *net, | |||
242 | * buffers but let the xdr code kmalloc them: | 241 | * buffers but let the xdr code kmalloc them: |
243 | */ | 242 | */ |
244 | .exported_context_token.len = GSSX_max_output_handle_sz, | 243 | .exported_context_token.len = GSSX_max_output_handle_sz, |
245 | .mech.len = GSSX_max_oid_sz, | 244 | .mech.len = GSS_OID_MAX_LEN, |
246 | .src_name.display_name.len = GSSX_max_princ_sz | 245 | .src_name.display_name.len = GSSX_max_princ_sz |
247 | }; | 246 | }; |
248 | struct gssx_res_accept_sec_context res = { | 247 | struct gssx_res_accept_sec_context res = { |
@@ -272,7 +271,9 @@ int gssp_accept_sec_context_upcall(struct net *net, | |||
272 | data->minor_status = res.status.minor_status; | 271 | data->minor_status = res.status.minor_status; |
273 | if (res.context_handle) { | 272 | if (res.context_handle) { |
274 | data->out_handle = rctxh.exported_context_token; | 273 | data->out_handle = rctxh.exported_context_token; |
275 | data->mech_oid = rctxh.mech; | 274 | data->mech_oid.len = rctxh.mech.len; |
275 | memcpy(data->mech_oid.data, rctxh.mech.data, | ||
276 | data->mech_oid.len); | ||
276 | client_name = rctxh.src_name.display_name; | 277 | client_name = rctxh.src_name.display_name; |
277 | } | 278 | } |
278 | 279 | ||