From: Alexandra Ellwood Date: Wed, 1 Oct 2008 20:58:56 +0000 (+0000) Subject: Correctly parse KIM_IDENTITY_ANY in error handler X-Git-Tag: krb5-1.7-alpha1~370 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a76d3e0941c91d1c6a2f85709bdb21db2ea4b9d0;p=krb5.git 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 --- 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);