[SCM] Samba Shared Repository - branch master updated

Andreas Schneider asn at samba.org
Tue Nov 12 08:40:02 MST 2013


The branch, master has been updated
       via  25be92b s3-libnetjoin: Fix Bug #10262: use upper-case realm when composing default upn.
      from  0dd512e s4:torture/netlogon: Test netlogon with additional attrs

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


- Log -----------------------------------------------------------------
commit 25be92b92567d962fa66261f565d3a8116f97e30
Author: Günther Deschner <gd at samba.org>
Date:   Wed Nov 6 18:21:32 2013 +0100

    s3-libnetjoin: Fix Bug #10262: use upper-case realm when composing default upn.
    
    In case we are about to generate a keytab during the join make sure the default
    upn we create is usable with kinit -k.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=10262
    
    Guenther
    
    Signed-off-by: Günther Deschner <gd at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    
    Autobuild-User(master): Andreas Schneider <asn at cryptomilk.org>
    Autobuild-Date(master): Tue Nov 12 16:39:03 CET 2013 on sn-devel-104

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

Summary of changes:
 source3/libnet/libnet_join.c |   17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c
index 2dcb920..b84fcd6 100644
--- a/source3/libnet/libnet_join.c
+++ b/source3/libnet/libnet_join.c
@@ -449,10 +449,25 @@ static ADS_STATUS libnet_join_set_machine_upn(TALLOC_CTX *mem_ctx,
 	}
 
 	if (!r->in.upn) {
+		char *realm = r->out.dns_domain_name;
+
+		/* in case we are about to generate a keytab during the join
+		 * make sure the default upn we create is usable with kinit -k.
+		 * gd */
+
+		if (USE_KERBEROS_KEYTAB) {
+			realm = talloc_strdup_upper(mem_ctx,
+						    r->out.dns_domain_name);
+		}
+
+		if (!realm) {
+			return ADS_ERROR(LDAP_NO_MEMORY);
+		}
+
 		r->in.upn = talloc_asprintf(mem_ctx,
 					    "host/%s@%s",
 					    r->in.machine_name,
-					    r->out.dns_domain_name);
+					    realm);
 		if (!r->in.upn) {
 			return ADS_ERROR(LDAP_NO_MEMORY);
 		}


-- 
Samba Shared Repository


More information about the samba-cvs mailing list