[SCM] Samba Shared Repository - branch v3-0-test updated - release-3-0-28-99-gdd2489a

Günther Deschner gd at samba.org
Wed Jan 23 11:10:23 GMT 2008


The branch, v3-0-test has been updated
       via  dd2489a178e0760082695904e75b75d57528f953 (commit)
      from  db905d9c4248c0051266ef0995dce077c1a33dd3 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-0-test


- Log -----------------------------------------------------------------
commit dd2489a178e0760082695904e75b75d57528f953
Author: Günther Deschner <gd at samba.org>
Date:   Wed Jan 23 12:03:51 2008 +0100

    Fix get_trust_creds() to return always an upper-cased krb5 principal (this
    fixes winbind krb5 session at least with heimdal).
    
    Guenther

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

Summary of changes:
 source/nsswitch/winbindd_cm.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/nsswitch/winbindd_cm.c b/source/nsswitch/winbindd_cm.c
index 1593b2b..3ca625e 100644
--- a/source/nsswitch/winbindd_cm.c
+++ b/source/nsswitch/winbindd_cm.c
@@ -609,11 +609,15 @@ static NTSTATUS get_trust_creds(const struct winbindd_domain *domain,
 
 	/* this is at least correct when domain is our domain,
 	 * which is the only case, when this is currently used: */
-	if ((machine_krb5_principal != NULL) &&
-	    (asprintf(machine_krb5_principal, "%s$@%s", account_name,
-		      domain->alt_name) == -1))
+	if (machine_krb5_principal != NULL)
 	{
-		return NT_STATUS_NO_MEMORY;
+		if (asprintf(machine_krb5_principal, "%s$@%s",
+			     account_name, domain->alt_name) == -1)
+		{
+			return NT_STATUS_NO_MEMORY;
+		}
+
+		strupper_m(*machine_krb5_principal);
 	}
 
 	return NT_STATUS_OK;


-- 
Samba Shared Repository


More information about the samba-cvs mailing list