summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2007-06-22 14:50:15 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:23:33 -0500
commit679727b8df0b64cfe2e04111a41a3e512c1428c5 (patch)
tree131ec8578a25292e12a1ad1f465a92146f8a819c /source3
parent33c7b666adfa5c873ffd1461edca37b068dfddac (diff)
downloadsamba-679727b8df0b64cfe2e04111a41a3e512c1428c5.tar.gz
samba-679727b8df0b64cfe2e04111a41a3e512c1428c5.tar.bz2
samba-679727b8df0b64cfe2e04111a41a3e512c1428c5.zip
r23587: Cleanup redundant code in the krb5 renew function.
Guenther (This used to be commit 0b9acc8610ae2ba9c42168e9ceb2e9ea8bc2f5bd)
Diffstat (limited to 'source3')
-rw-r--r--source3/libsmb/clikrb5.c39
1 files changed, 16 insertions, 23 deletions
diff --git a/source3/libsmb/clikrb5.c b/source3/libsmb/clikrb5.c
index 0180bef47a..be6fb1bda8 100644
--- a/source3/libsmb/clikrb5.c
+++ b/source3/libsmb/clikrb5.c
@@ -1159,22 +1159,22 @@ out:
goto done;
}
+ if (client_string) {
+ ret = smb_krb5_parse_name(context, client_string, &client);
+ if (ret) {
+ goto done;
+ }
+ } else {
+ ret = krb5_cc_get_principal(context, ccache, &client);
+ if (ret) {
+ 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) {
- goto done;
- }
- } else {
- ret = krb5_cc_get_principal(context, ccache, &client);
- if (ret) {
- goto done;
- }
- }
-
+
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,16 +1204,9 @@ out:
memset(&creds_in, 0, sizeof(creds_in));
- if (client_string) {
- ret = smb_krb5_parse_name(context, client_string, &creds_in.client);
- if (ret) {
- goto done;
- }
- } else {
- ret = krb5_cc_get_principal(context, ccache, &creds_in.client);
- if (ret) {
- goto done;
- }
+ ret = krb5_copy_principal(context, client, &creds_in.client);
+ if (ret) {
+ goto done;
}
if (service_string) {