summaryrefslogtreecommitdiffstats
path: root/src/kim/agent/mac
diff options
context:
space:
mode:
authorAlexandra Ellwood <lxs@mit.edu>2008-09-29 20:48:43 +0000
committerAlexandra Ellwood <lxs@mit.edu>2008-09-29 20:48:43 +0000
commit49f4372f3f635a6f8722d430d86a480db7db6e79 (patch)
tree10187dafbd0ea26dedd6d5cda5bb54a38d8c62de /src/kim/agent/mac
parentbf461a42b8f2d3fc3769e5166583799de7512a93 (diff)
downloadkrb5-49f4372f3f635a6f8722d430d86a480db7db6e79.tar.gz
krb5-49f4372f3f635a6f8722d430d86a480db7db6e79.tar.xz
krb5-49f4372f3f635a6f8722d430d86a480db7db6e79.zip
Added support for disabling password saving, both globally
and also per prompt via the UI. ticket: 6055 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20781 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/kim/agent/mac')
-rw-r--r--src/kim/agent/mac/ServerDemux.h1
-rw-r--r--src/kim/agent/mac/ServerDemux.m12
2 files changed, 12 insertions, 1 deletions
diff --git a/src/kim/agent/mac/ServerDemux.h b/src/kim/agent/mac/ServerDemux.h
index 12afa36c2c..1f1de5964c 100644
--- a/src/kim/agent/mac/ServerDemux.h
+++ b/src/kim/agent/mac/ServerDemux.h
@@ -43,6 +43,7 @@ int32_t kim_handle_reply_select_identity (mach_port_t in_reply_port,
int32_t kim_handle_reply_auth_prompt (mach_port_t in_reply_port,
kim_string in_prompt_response,
+ kim_boolean in_allow_save_response,
int32_t in_error);
int32_t kim_handle_reply_change_password (mach_port_t in_reply_port,
diff --git a/src/kim/agent/mac/ServerDemux.m b/src/kim/agent/mac/ServerDemux.m
index bc8525b0d6..a70a668c43 100644
--- a/src/kim/agent/mac/ServerDemux.m
+++ b/src/kim/agent/mac/ServerDemux.m
@@ -267,6 +267,7 @@ static int32_t kim_handle_request_auth_prompt (mach_port_t in_client_port,
int32_t err = 0;
char *identity_string = NULL;
int32_t type = 0;
+ int32_t allow_save_reply = 0;
int32_t hide_reply = 0;
char *title = NULL;
char *message = NULL;
@@ -281,6 +282,10 @@ static int32_t kim_handle_request_auth_prompt (mach_port_t in_client_port,
}
if (!err) {
+ err = k5_ipc_stream_read_int32 (in_request_stream, &allow_save_reply);
+ }
+
+ if (!err) {
err = k5_ipc_stream_read_int32 (in_request_stream, &hide_reply);
}
@@ -299,7 +304,7 @@ static int32_t kim_handle_request_auth_prompt (mach_port_t in_client_port,
if (!err) {
NSLog (@"Got auth prompt with identity '%s', type '%d', hide '%d', title '%s', message '%s', description '%s'",
identity_string, type, hide_reply, title, message, description);
- err = kim_handle_reply_auth_prompt (in_reply_port, "ydobon", 0);
+ err = kim_handle_reply_auth_prompt (in_reply_port, "ydobon", 0, 0);
#warning Send auth prompt message to main thread with 2 ports and arguments
}
@@ -315,6 +320,7 @@ static int32_t kim_handle_request_auth_prompt (mach_port_t in_client_port,
int32_t kim_handle_reply_auth_prompt (mach_port_t in_reply_port,
kim_string in_prompt_response,
+ kim_boolean in_allow_save_response,
int32_t in_error)
{
int32_t err = 0;
@@ -332,6 +338,10 @@ int32_t kim_handle_reply_auth_prompt (mach_port_t in_reply_port,
err = k5_ipc_stream_write_string (reply, in_prompt_response);
}
+ if (!err && !in_error) {
+ err = k5_ipc_stream_write_int32 (reply, in_allow_save_response);
+ }
+
if (!err) {
err = k5_ipc_server_send_reply (in_reply_port, reply);
}