From 7dea4900af23686834aa9c899206438a8d27076a Mon Sep 17 00:00:00 2001 From: Alexandra Ellwood Date: Tue, 30 Sep 2008 19:26:56 +0000 Subject: [PATCH] kim_os_identity_get_saved_password should always return an error when no password is returned. ticket: 6055 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20785 dc483132-0cff-0310-8789-dd5450dbe970 --- src/kim/lib/mac/kim_os_identity.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/kim/lib/mac/kim_os_identity.c b/src/kim/lib/mac/kim_os_identity.c index 3044b21ac..063b9231f 100644 --- a/src/kim/lib/mac/kim_os_identity.c +++ b/src/kim/lib/mac/kim_os_identity.c @@ -87,7 +87,11 @@ kim_error kim_os_identity_get_saved_password (kim_identity in_identity, /* Short circuit if password saving is disabled */ if (!err && !kim_os_identity_allow_save_password ()) { - return kim_os_identity_remove_saved_password (in_identity); + err = kim_os_identity_remove_saved_password (in_identity); + if (!err) { + /* simulate no password found */ + err = check_error (ENOENT); + } } if (!err) { -- 2.26.2