Fix blocker bug 5745 kerberos authentication with (lib)smbclient is broken.
authorJeremy Allison <jra@samba.org>
Wed, 10 Sep 2008 17:18:02 +0000 (10:18 -0700)
committerJeremy Allison <jra@samba.org>
Wed, 10 Sep 2008 17:18:02 +0000 (10:18 -0700)
Jeremy.
(This used to be commit a59bd0e4854117a8646f4d388a0f7285362d5ba2)

source3/libsmb/clikrb5.c

index f940081072ae3cc183ccb585ff09cb43c8ceed7b..b8afb579778ffe9557963b32d9f6c872a7d76a58 100644 (file)
@@ -749,9 +749,21 @@ static krb5_error_code ads_krb5_mk_req(krb5_context context,
                                                ccache,
                                                &in_data );
                if (retval) {
                                                ccache,
                                                &in_data );
                if (retval) {
-                       DEBUG( 1, ("ads_krb5_get_fwd_ticket failed (%s)\n",
+                       DEBUG( 3, ("ads_krb5_get_fwd_ticket failed (%s)\n",
                                   error_message( retval ) ) );
                                   error_message( retval ) ) );
-                       goto cleanup_creds;
+
+                       /*
+                        * This is not fatal. Delete the *auth_context and continue
+                        * with krb5_mk_req_extended to get a non-forwardable ticket.
+                        */
+
+                       if (in_data.data) {
+                               free( in_data.data );
+                               in_data.data = NULL;
+                               in_data.length = 0;
+                       }
+                       krb5_auth_con_free(context, *auth_context);
+                       *auth_context = NULL;
                }
        }
 #endif
                }
        }
 #endif