mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
r23587: Cleanup redundant code in the krb5 renew function.
Guenther
This commit is contained in:
parent
1e4a7af993
commit
0b9acc8610
@ -1159,10 +1159,6 @@ out:
|
||||
goto done;
|
||||
}
|
||||
|
||||
#ifdef HAVE_KRB5_GET_RENEWED_CREDS /* MIT */
|
||||
{
|
||||
krb5_creds creds;
|
||||
|
||||
if (client_string) {
|
||||
ret = smb_krb5_parse_name(context, client_string, &client);
|
||||
if (ret) {
|
||||
@ -1175,6 +1171,10 @@ out:
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef HAVE_KRB5_GET_RENEWED_CREDS /* MIT */
|
||||
{
|
||||
krb5_creds creds;
|
||||
|
||||
ret = krb5_get_renewed_creds(context, &creds, client, ccache, CONST_DISCARD(char *, service_string));
|
||||
if (ret) {
|
||||
DEBUG(10,("smb_krb5_renew_ticket: krb5_get_kdc_cred failed: %s\n", error_message(ret)));
|
||||
@ -1204,17 +1204,10 @@ out:
|
||||
|
||||
memset(&creds_in, 0, sizeof(creds_in));
|
||||
|
||||
if (client_string) {
|
||||
ret = smb_krb5_parse_name(context, client_string, &creds_in.client);
|
||||
ret = krb5_copy_principal(context, client, &creds_in.client);
|
||||
if (ret) {
|
||||
goto done;
|
||||
}
|
||||
} else {
|
||||
ret = krb5_cc_get_principal(context, ccache, &creds_in.client);
|
||||
if (ret) {
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
|
||||
if (service_string) {
|
||||
ret = smb_krb5_parse_name(context, service_string, &creds_in.server);
|
||||
|
Loading…
Reference in New Issue
Block a user