TODO may fix it
authorStefan Metzmacher <metze@samba.org>
Thu, 19 May 2011 12:43:05 +0000 (14:43 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 7 Jul 2011 12:49:52 +0000 (14:49 +0200)
source3/librpc/crypto/gse.c

index c311c774d42c6b7deb8a13b35b3ce52db26e4eac..60de372e2482131f0ab35876f6b5a11d4792ba36 100644 (file)
@@ -248,7 +248,7 @@ NTSTATUS gse_init_client(TALLOC_CTX *mem_ctx,
        }
 
        name_buffer.value = talloc_asprintf(gse_ctx,
-                                           "%s@%s", service, server);
+                                           "%s/%s", service, server);
        if (!name_buffer.value) {
                status = NT_STATUS_NO_MEMORY;
                goto err_out;
@@ -271,15 +271,12 @@ NTSTATUS gse_init_client(TALLOC_CTX *mem_ctx,
        mech_set.count = 1;
        mech_set.elements = &gse_ctx->gss_mech;
 
-       gss_maj = gss_acquire_cred(&gss_min,
-                                  GSS_C_NO_NAME,
-                                  GSS_C_INDEFINITE,
-                                  &mech_set,
-                                  GSS_C_INITIATE,
-                                  &gse_ctx->creds,
-                                  NULL, NULL);
+       gss_maj = gss_krb5_import_cred(&gss_min,
+                                       gse_ctx->ccache,
+                                       NULL, NULL,
+                                       &gcc->creds);
        if (gss_maj) {
-               DEBUG(0, ("gss_acquire_creds failed for %s, with [%s]\n",
+               DEBUG(0, ("gss_krb5_import_cred failed for %s, with [%s]\n",
                          (char *)name_buffer.value,
                          gse_errstr(gse_ctx, gss_maj, gss_min)));
                status = NT_STATUS_INTERNAL_ERROR;