summaryrefslogtreecommitdiffstats
path: root/src/kim/lib
Commit message (Collapse)AuthorAgeFilesLines
* Rename functions from k5_ipc_stream_* to krb5int_ipc_stream_*, because some ↵Ken Raeburn2009-02-093-114/+114
| | | | | | of them will have to be exported git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21938 dc483132-0cff-0310-8789-dd5450dbe970
* Add _with_password credential acquisition functions to KIM APIAlexandra Ellwood2008-11-034-48/+3
| | | | | | | | Needed for kinit password option. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20963 dc483132-0cff-0310-8789-dd5450dbe970
* No . at end of stringsAlexandra Ellwood2008-10-311-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20944 dc483132-0cff-0310-8789-dd5450dbe970
* Avoid duplicate identical dialogs in KIMAlexandra Ellwood2008-10-314-6/+34
| | | | | | | | | Added KIM_DUPLICATE_UI_REQUEST_ERR error so UI can indicate it cancelled its dialog due to getting multiple identical dialogs at the same time. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20942 dc483132-0cff-0310-8789-dd5450dbe970
* Only prompt automatically from GUI appsAlexandra Ellwood2008-10-293-15/+31
| | | | | | | | | | Direct callers such as kinit need command line prompts. Do not automatically prompt (via krb5 or gssapi calls) unless the caller has loaded GUI libraries. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20937 dc483132-0cff-0310-8789-dd5450dbe970
* Remove saved password if it fails to get ticketsAlexandra Ellwood2008-10-291-0/+10
| | | | | | | | | | | Note that if preauth is turned on the password may be removed for other reasons. This is because preauth failing can mean several things. Better to always remove it than have the user sometimes get stuck though. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20936 dc483132-0cff-0310-8789-dd5450dbe970
* krb5_build_principal_va does not allocate krb5_principalAlexandra Ellwood2008-10-241-52/+10
| | | | | | | | | | | | | | | | | krb5_build_principal_va does not allocate the outer krb5_principal, making it useless for generating krb5_principals which can be freed with krb5_free_principal. Added krb5_build_principal_alloc_va which allocates the krb5_principal. Added krb5int_build_principal_alloc_va which is used by KIM to avoid code duplication. KIM's kim_identity_create_from_components takes the first component as an argument because principals with no components cannot be represented with the KIM UI. Modified KIM to use this new API. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20918 dc483132-0cff-0310-8789-dd5450dbe970
* Use CFStringGetCStringPtr if possible to avoid wasting memoryAlexandra Ellwood2008-10-241-12/+25
| | | | | | | | since CFStringGetMaximumSizeForEncoding is wasteful for UTF8. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20914 dc483132-0cff-0310-8789-dd5450dbe970
* KIM should only display error dialogs if it has displayed UI alreadyAlexandra Ellwood2008-10-221-21/+11
| | | | | | ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20909 dc483132-0cff-0310-8789-dd5450dbe970
* kim_identity_change_password_with_credential leaks krb5_credsAlexandra Ellwood2008-10-211-0/+3
| | | | | | ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20907 dc483132-0cff-0310-8789-dd5450dbe970
* kim_os_library_get_caller_name leaks file pathAlexandra Ellwood2008-10-211-0/+1
| | | | | | ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20906 dc483132-0cff-0310-8789-dd5450dbe970
* kim_ccache_iterator_next leaks principalAlexandra Ellwood2008-10-211-0/+3
| | | | | | ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20905 dc483132-0cff-0310-8789-dd5450dbe970
* kim_preferences should free old identity before overwritingAlexandra Ellwood2008-10-211-1/+9
| | | | | | ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20904 dc483132-0cff-0310-8789-dd5450dbe970
* KLCreatePrincipalFromTriplet should work with empty instanceAlexandra Ellwood2008-10-171-5/+12
| | | | | | | | | Fixed bug where shim layer was calling kim_identity_create_from_components incorrectly in this case. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20887 dc483132-0cff-0310-8789-dd5450dbe970
* Double free and leak in kim_os_library_get_application_pathAlexandra Ellwood2008-10-171-1/+1
| | | | | | ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20885 dc483132-0cff-0310-8789-dd5450dbe970
* Remap some of the more confusing krb5 errorsAlexandra Ellwood2008-10-172-23/+56
| | | | | | | | Also enlarged last error buffer for UTF8 strings with multibyte chars. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20884 dc483132-0cff-0310-8789-dd5450dbe970
* Treat unreadable terminal as user cancelled so regression tests workAlexandra Ellwood2008-10-171-3/+12
| | | | | | ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20883 dc483132-0cff-0310-8789-dd5450dbe970
* Make sure identity is set when using kim prompterAlexandra Ellwood2008-10-171-0/+1
| | | | | | ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20882 dc483132-0cff-0310-8789-dd5450dbe970
* Use a context to store error table infoAlexandra Ellwood2008-10-171-8/+18
| | | | | | | | | | Just sticking an einfo on the stack doesn't work because it's not initialized. Also the detailed error message doesn't end up propogated back to KIM. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20881 dc483132-0cff-0310-8789-dd5450dbe970
* remove unused variable in kim_ui_cli_ask_change_passwordAlexandra Ellwood2008-10-151-2/+0
| | | | | | ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20877 dc483132-0cff-0310-8789-dd5450dbe970
* use KIM_BUILTIN_UI instead of LEAN_CLIENT for builtin UIAlexandra Ellwood2008-10-155-27/+26
| | | | | | ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20875 dc483132-0cff-0310-8789-dd5450dbe970
* Move GUI/CLI detection from KerberosIPC into KIMAlexandra Ellwood2008-10-151-8/+39
| | | | | | ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20874 dc483132-0cff-0310-8789-dd5450dbe970
* Free error message returned by krb5_get_error_messageAlexandra Ellwood2008-10-141-0/+2
| | | | | | ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20866 dc483132-0cff-0310-8789-dd5450dbe970
* kim_os_string_create_localized leaks CFStringRefAlexandra Ellwood2008-10-101-0/+2
| | | | | | ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20865 dc483132-0cff-0310-8789-dd5450dbe970
* always zero out authentication stringsAlexandra Ellwood2008-10-101-3/+6
| | | | | | | | | strings returned by the UI are usually passwords or pins and should not get dripped all over memory. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20863 dc483132-0cff-0310-8789-dd5450dbe970
* kim_ui_plugin_fini sends pointer to context instead of contextAlexandra Ellwood2008-10-101-1/+1
| | | | | | ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20862 dc483132-0cff-0310-8789-dd5450dbe970
* allow kim ui plugins to have any nameAlexandra Ellwood2008-10-101-2/+1
| | | | | | | | | | Note that there can still only be one, it will just use the first one it finds. Just want to have different names for them so that we can distinguish between different plugins. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20861 dc483132-0cff-0310-8789-dd5450dbe970
* change password should always reprompt on errorAlexandra Ellwood2008-10-101-12/+8
| | | | | | | | | | Since it collects the password ahead of time, the prompt count won't get incremented. Checking whether it called auth_prompt is useless. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20860 dc483132-0cff-0310-8789-dd5450dbe970
* prefs should not create empty dictionary for KIM_OPTIONS_DEFAULTAlexandra Ellwood2008-10-091-6/+7
| | | | | | ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20855 dc483132-0cff-0310-8789-dd5450dbe970
* preferences should handle KIM_OPTIONS_DEFAULTAlexandra Ellwood2008-10-093-9/+5
| | | | | | ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20854 dc483132-0cff-0310-8789-dd5450dbe970
* kim_options_create sometimes returns KIM_OPTIONS_DEFAULTAlexandra Ellwood2008-10-091-1/+12
| | | | | | ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20853 dc483132-0cff-0310-8789-dd5450dbe970
* KL APIs which take a NULL principal return klParameterErrAlexandra Ellwood2008-10-093-64/+81
| | | | | | | | | Fixed by making kim_ccache_create_from_client_identity take KIM_IDENTITY_ANY (at which point it returns the system default ccache). ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20850 dc483132-0cff-0310-8789-dd5450dbe970
* Crash in kim_credential_create_from_keytabAlexandra Ellwood2008-10-091-1/+1
| | | | | | | | Was dereferencing NULL freeing creds. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20849 dc483132-0cff-0310-8789-dd5450dbe970
* kim_options_copy should allow in_options to be KIM_OPTIONS_DEFAULTAlexandra Ellwood2008-10-091-1/+0
| | | | | | | | (Don't error on NULL in_options) ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20848 dc483132-0cff-0310-8789-dd5450dbe970
* Removed unused header file include.Alexandra Ellwood2008-10-081-1/+0
| | | | | | | | (Not necessary for fix, just a cleanup) ticket: 6146 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20846 dc483132-0cff-0310-8789-dd5450dbe970
* KLL should use __attribute ((deprecated))Alexandra Ellwood2008-10-082-36/+39
| | | | | | | | | | | | | | | | Switched from a macro to GCC deprecated attributes. Also removed the deprecated struct used by KLSetApplicationOptions and KLGetApplicationOptions because they weren't touching it. Replaced pointer-to-struct arguments with void *. KLGetApplicationOptions now also returns an error since it did not modify its input. Not sure why it wasn't before since no one should be calling it on Mac OS X. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20844 dc483132-0cff-0310-8789-dd5450dbe970
* KIM should remember options and identity if prefs indicateAlexandra Ellwood2008-10-072-4/+47
| | | | | | | | Added code to remember ticket options if settings indicate it. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20838 dc483132-0cff-0310-8789-dd5450dbe970
* KLL shim layer does not correctly handle optionsAlexandra Ellwood2008-10-071-40/+40
| | | | | | | | | | KLGetDefaultLoginOption and KLSetDefaultLoginOption were incorrectly casting parameters and were not parsing the option argument correctly. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20837 dc483132-0cff-0310-8789-dd5450dbe970
* If the caller is a bundle, look up keys in its plist file to get the nameAlexandra Ellwood2008-10-071-5/+8
| | | | | | ticket: 6146 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20836 dc483132-0cff-0310-8789-dd5450dbe970
* KLLastChangedTime should return current time, not 0Alexandra Ellwood2008-10-071-5/+54
| | | | | | | | | | | | cc_context_get_change_time returns 0 the first time it is called if the CCacheServer is not running. KLLastChangedTime always returned the current time on the first call. So use globals and a mutex to make sure that KLLastChangedTime both monotonically increases and also returns the current time on the first call. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20835 dc483132-0cff-0310-8789-dd5450dbe970
* Include header to get error table for KLLAlexandra Ellwood2008-10-061-0/+3
| | | | | | ticket: 6154 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20834 dc483132-0cff-0310-8789-dd5450dbe970
* Hinge building KLL shim off KIM_TO_KLL_SHIM, not LEAN_CLIENTAlexandra Ellwood2008-10-063-4/+10
| | | | | | ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20833 dc483132-0cff-0310-8789-dd5450dbe970
* Add KLL error tableAlexandra Ellwood2008-10-061-0/+88
| | | | | | ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20831 dc483132-0cff-0310-8789-dd5450dbe970
* Don't touch keychain if home directory access is disabledAlexandra Ellwood2008-10-061-14/+23
| | | | | | | | Keychain is stored in the user's home directory. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20830 dc483132-0cff-0310-8789-dd5450dbe970
* Password is not expired when changing password from select and Alexandra Ellwood2008-10-022-2/+2
| | | | | | | | enter identity dialogs. ticket: 6055 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20816 dc483132-0cff-0310-8789-dd5450dbe970
* Don't write NULL name and path over stream. Just send empty stringsAlexandra Ellwood2008-10-021-2/+2
| | | | | | ticket: 6055 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20815 dc483132-0cff-0310-8789-dd5450dbe970
* Fix to get application name correctly. Was dropping argumentAlexandra Ellwood2008-10-021-2/+13
| | | | | | | | | from launchservices and not removing extension from path in fallback code. ticket: 6055 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20814 dc483132-0cff-0310-8789-dd5450dbe970
* Support for change password checkbox in enter and selectAlexandra Ellwood2008-10-0210-50/+146
| | | | | | | | identity ui elements. ticket: 6055 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20812 dc483132-0cff-0310-8789-dd5450dbe970
* Fixed a bug in kim_identity_get_components string where itAlexandra Ellwood2008-10-011-1/+1
| | | | | | | | would return the first component multiple times. ticket: 6055 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20805 dc483132-0cff-0310-8789-dd5450dbe970
* Make unset strings in kim_options and kim_selection_hintsAlexandra Ellwood2008-10-015-113/+90
| | | | | | | | | | | | be empty strings rather than NULL. This simplifies the stream code (and makes it easier to read and debug). In order to prevent copying tons of NUL bytes around, special case kim_string functions to use a special constant kim_empty_string. ticket: 6055 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20804 dc483132-0cff-0310-8789-dd5450dbe970