gpt4 book ai didi

检查缓存中是否存在 Kerberos 票证

转载 作者:太空宇宙 更新时间:2023-11-03 23:56:04 27 4
gpt4 key购买 nike

我已经编写了一些 C 代码来连接到基于 Kerberos 的 LDAP 服务器。这一切都很好,但目前,它每次连接时都会生成一个新的 TGT,而不是使用默认凭证缓存中的那个(假设它已经存在)。

我研究过使用 krb5_cc_resolve 和 krb5_initialize 之类的方法来获取对缓存的引用,但这似乎会破坏缓存(如果它已经存在)以及它持有的任何票证。

基本上,我想知道的是:是否有任何方法可以在不破坏现有 TGT 的情况下检查默认凭据缓存?

最佳答案

krb5_cc_initialize 清除缓存,如文档所述。如果您想访问现有缓存,请不要这样做

来自 the docs :

Any existing credentials are discarded and the principal name for the cache is set to the value specified

关于检查缓存中是否存在 Kerberos 票证,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7415142/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com