diff options
| author | Alexandra Ellwood <lxs@mit.edu> | 2008-10-01 15:35:48 +0000 |
|---|---|---|
| committer | Alexandra Ellwood <lxs@mit.edu> | 2008-10-01 15:35:48 +0000 |
| commit | 3f0979ee8bf09c9d5190c56f9facdcebb17a7680 (patch) | |
| tree | b27699c9208cfd180485037dbcd7fbd7d0330cd8 /src/kim/lib/mac | |
| parent | 8294739d8cbc7b91ae11c0fb8fbb3c918bb90348 (diff) | |
Support for passing options back and forth for enter_identity and
hints back for select_identity.
ticket: 6055
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20794 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/kim/lib/mac')
| -rw-r--r-- | src/kim/lib/mac/kim_os_ui_gui.c | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/src/kim/lib/mac/kim_os_ui_gui.c b/src/kim/lib/mac/kim_os_ui_gui.c index d87efb067..ec2ca608d 100644 --- a/src/kim/lib/mac/kim_os_ui_gui.c +++ b/src/kim/lib/mac/kim_os_ui_gui.c @@ -116,6 +116,7 @@ kim_error kim_os_ui_gui_init (kim_ui_context *io_context) /* ------------------------------------------------------------------------ */ kim_error kim_os_ui_gui_enter_identity (kim_ui_context *in_context, + kim_options io_options, kim_identity *out_identity) { kim_error err = KIM_NO_ERROR; @@ -123,6 +124,7 @@ kim_error kim_os_ui_gui_enter_identity (kim_ui_context *in_context, k5_ipc_stream reply = NULL; char *identity_string = NULL; + if (!err && !io_options ) { err = check_error (KIM_NULL_PARAMETER_ERR); } if (!err && !out_identity) { err = check_error (KIM_NULL_PARAMETER_ERR); } if (!err) { @@ -133,6 +135,9 @@ kim_error kim_os_ui_gui_enter_identity (kim_ui_context *in_context, err = k5_ipc_stream_write_string (request, "enter_identity"); } + if (!err) { + err = kim_options_write_to_stream (io_options, request); + } if (!err) { err = kim_os_ui_gui_send_request (0 /* don't launch server */, @@ -153,6 +158,10 @@ kim_error kim_os_ui_gui_enter_identity (kim_ui_context *in_context, } if (!err) { + err = kim_options_read_from_stream (io_options, reply); + } + + if (!err) { err = kim_identity_create_from_string (out_identity, identity_string); } @@ -166,15 +175,16 @@ kim_error kim_os_ui_gui_enter_identity (kim_ui_context *in_context, /* ------------------------------------------------------------------------ */ kim_error kim_os_ui_gui_select_identity (kim_ui_context *in_context, - kim_selection_hints in_hints, + kim_selection_hints io_hints, kim_identity *out_identity) { kim_error err = KIM_NO_ERROR; k5_ipc_stream request = NULL; k5_ipc_stream reply = NULL; char *identity_string = NULL; + kim_options options = NULL; - if (!err && !in_hints ) { err = check_error (KIM_NULL_PARAMETER_ERR); } + if (!err && !io_hints ) { err = check_error (KIM_NULL_PARAMETER_ERR); } if (!err && !out_identity) { err = check_error (KIM_NULL_PARAMETER_ERR); } if (!err) { @@ -186,7 +196,7 @@ kim_error kim_os_ui_gui_select_identity (kim_ui_context *in_context, } if (!err) { - err = kim_selection_hints_write_to_stream (in_hints, request); + err = kim_selection_hints_write_to_stream (io_hints, request); } if (!err) { @@ -211,6 +221,15 @@ kim_error kim_os_ui_gui_select_identity (kim_ui_context *in_context, err = kim_identity_create_from_string (out_identity, identity_string); } + if (!err) { + err = kim_options_create_from_stream (&options, reply); + } + + if (!err) { + err = kim_selection_hints_set_options (io_hints, options); + } + + kim_options_free (&options); k5_ipc_stream_free_string (identity_string); k5_ipc_stream_release (request); k5_ipc_stream_release (reply); |
