svn commit: samba r20486 - in branches: SAMBA_3_0/source/libads SAMBA_3_0_24/source/libads

jerry at samba.org jerry at samba.org
Tue Jan 2 21:29:10 GMT 2007


Author: jerry
Date: 2007-01-02 21:29:09 +0000 (Tue, 02 Jan 2007)
New Revision: 20486

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=20486

Log:
Always upper case the "host/<sAMAccoutnName>" entry in the keytab file
so apps will know which one to look for,


Modified:
   branches/SAMBA_3_0/source/libads/kerberos_keytab.c
   branches/SAMBA_3_0_24/source/libads/kerberos_keytab.c


Changeset:
Modified: branches/SAMBA_3_0/source/libads/kerberos_keytab.c
===================================================================
--- branches/SAMBA_3_0/source/libads/kerberos_keytab.c	2007-01-02 21:20:40 UTC (rev 20485)
+++ branches/SAMBA_3_0/source/libads/kerberos_keytab.c	2007-01-02 21:29:09 UTC (rev 20486)
@@ -530,13 +530,18 @@
 	}
 
 	/* now add the userPrincipalName and sAMAccountName entries */
-	
+
 	if ( (sam_account_name = ads_get_samaccountname( ads, ctx, machine_name)) == NULL ) {
 		DEBUG(0,("ads_keytab_add_entry: unable to determine machine account's name in AD!\n"));
 		TALLOC_FREE( ctx );
 		return -1;	
 	}
 
+	/* upper case the sAMAccountName to make it easier for apps to 
+	   know what case to use in the keytab file */
+
+	strupper_m( sam_account_name );	
+
 	if ( (ret = ads_keytab_add_entry(ads, sam_account_name )) != 0 ) {
 		DEBUG(1,("ads_keytab_create_default: ads_keytab_add_entry failed while adding sAMAccountName (%s)\n",
 			sam_account_name));

Modified: branches/SAMBA_3_0_24/source/libads/kerberos_keytab.c
===================================================================
--- branches/SAMBA_3_0_24/source/libads/kerberos_keytab.c	2007-01-02 21:20:40 UTC (rev 20485)
+++ branches/SAMBA_3_0_24/source/libads/kerberos_keytab.c	2007-01-02 21:29:09 UTC (rev 20486)
@@ -530,13 +530,18 @@
 	}
 
 	/* now add the userPrincipalName and sAMAccountName entries */
-	
+
 	if ( (sam_account_name = ads_get_samaccountname( ads, ctx, machine_name)) == NULL ) {
 		DEBUG(0,("ads_keytab_add_entry: unable to determine machine account's name in AD!\n"));
 		TALLOC_FREE( ctx );
 		return -1;	
 	}
 
+	/* upper case the sAMAccountName to make it easier for apps to 
+	   know what case to use in the keytab file */
+
+	strupper_m( sam_account_name );	
+
 	if ( (ret = ads_keytab_add_entry(ads, sam_account_name )) != 0 ) {
 		DEBUG(1,("ads_keytab_create_default: ads_keytab_add_entry failed while adding sAMAccountName (%s)\n",
 			sam_account_name));



More information about the samba-cvs mailing list