Skip to content

Commit d0a0660

Browse files
yixiangzhikesimo5
authored andcommitted
Try to obtain new cred if the cred from rpc.gssd or other apps is defective.
Rpc.gssd or other applications may use the cache configured with default_ccache_name(krb5. conf). If the cache file of gssproxy (cred_store=ccache: FILE: xxxxxx) is deleted, the gssproxy service returns an empty credential when processing a GSSX_ARG-ACQUIRE_CRED request, unless the user clears the default_ccache_name cache. However, users may not even be aware of the existence of the default_ccache_name cache. In this situation, it may be better for gssproxy to try to obtain new credentials. Signed-off-by: yixiangzhike <yixiangzhike007@163.com>
1 parent bd4518e commit d0a0660

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/gp_creds.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,8 @@ uint32_t gp_add_krb5_creds(uint32_t *min,
634634
if (ret_maj == GSS_S_COMPLETE) {
635635
return GSS_S_COMPLETE;
636636
} else if (ret_maj == GSS_S_CREDENTIALS_EXPIRED ||
637-
ret_maj == GSS_S_NO_CRED) {
637+
ret_maj == GSS_S_NO_CRED ||
638+
ret_maj == GSS_S_DEFECTIVE_CREDENTIAL) {
638639
/* continue and try to obtain new creds */
639640
ret_maj = 0;
640641
ret_min = 0;

0 commit comments

Comments
 (0)