[SCM] Samba Shared Repository - branch master updated

Stefan Metzmacher metze at samba.org
Mon Mar 6 10:45:02 UTC 2017


The branch, master has been updated
       via  bdce9f5 s3:libads: remove unused fallback to gss_acquire_cred()
      from  53e9c2b s4/torture: add a creditting test skipping a SMB2 MID

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit bdce9f5fae979006fa97a398a5bc44eeb9e85875
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Mar 3 12:56:24 2017 +0100

    s3:libads: remove unused fallback to gss_acquire_cred()
    
    Heimdal and all supported versions of MIT krb5 prove gss_krb5_import_cred(),
    so we don't need an #ifdef here.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Alexander Bokovoy <ab at samba.org>
    
    Autobuild-User(master): Stefan Metzmacher <metze at samba.org>
    Autobuild-Date(master): Mon Mar  6 11:44:54 CET 2017 on sn-devel-144

-----------------------------------------------------------------------

Summary of changes:
 source3/libads/sasl.c | 27 ---------------------------
 1 file changed, 27 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/libads/sasl.c b/source3/libads/sasl.c
index 8570788..cb630fa 100644
--- a/source3/libads/sasl.c
+++ b/source3/libads/sasl.c
@@ -365,7 +365,6 @@ static ADS_STATUS ads_init_gssapi_cred(ADS_STRUCT *ads, gss_cred_id_t *cred)
 		return ADS_ERROR_KRB5(kerr);
 	}
 
-#ifdef HAVE_GSS_KRB5_IMPORT_CRED
 	kerr = krb5_cc_resolve(kctx, ads->auth.ccache_name, &kccache);
 	if (kerr) {
 		status = ADS_ERROR_KRB5(kerr);
@@ -377,32 +376,6 @@ static ADS_STATUS ads_init_gssapi_cred(ADS_STRUCT *ads, gss_cred_id_t *cred)
 		status = ADS_ERROR_GSS(maj, min);
 		goto done;
 	}
-#else
-	/* We need to fallback to overriding the default creds.
-	 * This operation is not thread safe as it changes the process
-	 * environment variable, but we do not have any better option
-	 * with older kerberos libraries */
-	{
-		const char *oldccname = NULL;
-
-		oldccname = getenv("KRB5CCNAME");
-		setenv("KRB5CCNAME", ads->auth.ccache_name, 1);
-
-		maj = gss_acquire_cred(&min, GSS_C_NO_NAME, GSS_C_INDEFINITE,
-				       NULL, GSS_C_INITIATE, cred, NULL, NULL);
-
-		if (oldccname) {
-			setenv("KRB5CCNAME", oldccname, 1);
-		} else {
-			unsetenv("KRB5CCNAME");
-		}
-
-		if (maj != GSS_S_COMPLETE) {
-			status = ADS_ERROR_GSS(maj, min);
-			goto done;
-		}
-	}
-#endif
 
 	status = ADS_SUCCESS;
 


-- 
Samba Shared Repository



More information about the samba-cvs mailing list