kim_os_identity_get_saved_password should always return an error when
authorAlexandra Ellwood <lxs@mit.edu>
Tue, 30 Sep 2008 19:26:56 +0000 (19:26 +0000)
committerAlexandra Ellwood <lxs@mit.edu>
Tue, 30 Sep 2008 19:26:56 +0000 (19:26 +0000)
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

index 3044b21acec08275a4ae3f9bc96d782df8e392cc..063b9231ff85fd3389cfa5e88a8270d35089e305 100644 (file)
@@ -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) {