From a76d3e0941c91d1c6a2f85709bdb21db2ea4b9d0 Mon Sep 17 00:00:00 2001 From: Alexandra Ellwood Date: Wed, 1 Oct 2008 20:58:56 +0000 Subject: [PATCH] Correctly parse KIM_IDENTITY_ANY in error handler ticket: 6055 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20801 dc483132-0cff-0310-8789-dd5450dbe970 --- src/kim/agent/mac/ServerDemux.m | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/kim/agent/mac/ServerDemux.m b/src/kim/agent/mac/ServerDemux.m index 00b13c9c5..595da0656 100644 --- a/src/kim/agent/mac/ServerDemux.m +++ b/src/kim/agent/mac/ServerDemux.m @@ -458,6 +458,11 @@ static int32_t kim_handle_request_handle_error (mach_port_t in_client_port, if (!err) { err = k5_ipc_stream_read_string (in_request_stream, &identity_string); + /* Can be empty string "" if there is no identity */ + if (!err && identity_string[0]) { + k5_ipc_stream_free_string (identity_string); + identity_string = KIM_IDENTITY_ANY; + } } if (!err) { @@ -475,11 +480,11 @@ static int32_t kim_handle_request_handle_error (mach_port_t in_client_port, if (!err) { // performs selector on main thread [KerberosAgentListener handleErrorWithClientPort:in_client_port - replyPort:in_reply_port - identity:identity_string - error:error - message:message - description:description]; + replyPort:in_reply_port + identity:identity_string + error:error + message:message + description:description]; } k5_ipc_stream_free_string (identity_string); -- 2.26.2