[Pkg-samba-maint] [samba] 06/135: s3-libnetjoin: Fix Bug #10262: use upper-case realm when composing default upn.

Ivo De Decker ivodd at moszumanska.debian.org
Sat Jan 11 21:30:22 UTC 2014


This is an automated email from the git hooks/post-receive script.

ivodd pushed a commit to branch master
in repository samba.

commit 7b13739adcbd7807219258190cccdab3f7076d71
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.
    
    Guenther
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=10262
    Signed-off-by: Günther Deschner <gd at samba.org>
---
 source3/libnet/libnet_join.c | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c
index dfe7283..96f7a98 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);
 		}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-samba/samba.git




More information about the Pkg-samba-maint mailing list