{"action":"created","issue":{"url":"https://api.github.com/repos/heimdal/heimdal/issues/132","labels_url":"https://api.github.com/repos/heimdal/heimdal/issues/132/labels{/name}","comments_url":"https://api.github.com/repos/heimdal/heimdal/issues/132/comments","events_url":"https://api.github.com/repos/heimdal/heimdal/issues/132/events","html_url":"https://github.com/heimdal/heimdal/issues/132","id":90356490,"number":132,"title":"gss_acquire_cred_with_password and gss_store_cred","user":{"login":"smanolache","id":4068658,"avatar_url":"https://avatars.githubusercontent.com/u/4068658?v=3","gravatar_id":"","url":"https://api.github.com/users/smanolache","html_url":"https://github.com/smanolache","followers_url":"https://api.github.com/users/smanolache/followers","following_url":"https://api.github.com/users/smanolache/following{/other_user}","gists_url":"https://api.github.com/users/smanolache/gists{/gist_id}","starred_url":"https://api.github.com/users/smanolache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smanolache/subscriptions","organizations_url":"https://api.github.com/users/smanolache/orgs","repos_url":"https://api.github.com/users/smanolache/repos","events_url":"https://api.github.com/users/smanolache/events{/privacy}","received_events_url":"https://api.github.com/users/smanolache/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-06-23T11:11:48Z","updated_at":"2015-06-25T23:00:24Z","closed_at":null,"body":"Hello,\r\n\r\nLet us suppose that I invoke gss_acquire_cred_with_password. Then a unique memory cache is created, the credentials fetched from the KDC are stored in it, and cred->ccache is set to point to the newly created memory cache.\r\n\r\nThen if I call gss_store_cred the function picks a cache whose principal matches, and copies data from cred->ccache to the matching cache.\r\n\r\nI think there are two problems with this approach.\r\n\r\nFirst, cred->ccache obviously matches, so if there's no other cache with the same principal, we'll end up with the source and destination being the same cache.\r\n\r\nSecond, memory caches do not implement set_default (krb5_cc_support_switch returns false). Therefore the caller has no way to store the credential acquired by gss_acquire_cred_with_password to a default cache of type memory.\r\n\r\nIs there a way to get credentials by gss_acquire_cred_with_password and to store them in a default memory cache?\r\n\r\nThanks,\r\nSorin"},"comment":{"url":"https://api.github.com/repos/heimdal/heimdal/issues/comments/115424252","html_url":"https://github.com/heimdal/heimdal/issues/132#issuecomment-115424252","issue_url":"https://api.github.com/repos/heimdal/heimdal/issues/132","id":115424252,"user":{"login":"greghudson","id":1131421,"avatar_url":"https://avatars.githubusercontent.com/u/1131421?v=3","gravatar_id":"","url":"https://api.github.com/users/greghudson","html_url":"https://github.com/greghudson","followers_url":"https://api.github.com/users/greghudson/followers","following_url":"https://api.github.com/users/greghudson/following{/other_user}","gists_url":"https://api.github.com/users/greghudson/gists{/gist_id}","starred_url":"https://api.github.com/users/greghudson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/greghudson/subscriptions","organizations_url":"https://api.github.com/users/greghudson/orgs","repos_url":"https://api.github.com/users/greghudson/repos","events_url":"https://api.github.com/users/greghudson/events{/privacy}","received_events_url":"https://api.github.com/users/greghudson/received_events","type":"User","site_admin":false},"created_at":"2015-06-25T23:00:24Z","updated_at":"2015-06-25T23:00:24Z","body":"Have a look at http://k5wiki.kerberos.org/wiki/Projects/Credential_cache_collection_improvements .  I'm not sure when I can implement what's proposed here, but it still reflects my design preferences.\r\n\r\nI don't have a problem with FILE and DIR having different semantics for new_unique -> cache_match, since DIR is collection-enabled and FILE isn't.  Nor do I think it is a problem for new_unique caches to show up in the collection they are created in.\r\n\r\nI do have a problem with MEMORY caches appearing in the implicit global collection when you create them, since MEMORY isn't a collection-enabled type.  The above project page proposes to eliminate that behavior, along with the whole idea of an implicit global collection beyond the collection identified by the default cache name."}}