[SCM] Samba Shared Repository - branch master updated

Andrew Bartlett abartlet at samba.org
Fri Mar 14 03:17:04 MDT 2014


The branch, master has been updated
       via  61b9788 dsdb: Ensure to sort replPropertyMetaData as UNSIGNED, not SIGNED quantities
       via  83fbdc8 kdc: Use correct KDC include path when building against the system heimdal
      from  3632c59 selftest/subunithelper.py: correctly pass testsuite-uxsuccess to end_testsuite()

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


- Log -----------------------------------------------------------------
commit 61b978872fe86906611f64430b2608f5e7ea7ad8
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Fri Feb 28 22:59:06 2014 +1300

    dsdb: Ensure to sort replPropertyMetaData as UNSIGNED, not SIGNED quantities
    
    enum is an int, and therefore signed.  Some attributes have the high bit set.
    
    Andrew Bartlett
    
    Change-Id: I39a5499b7c6bbb763e15977d802cda8c69b94618
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-on: https://gerrit.samba.org/163
    Reviewed-by: Kamen Mazdrashki <kamenim at samba.org>
    
    Autobuild-User(master): Andrew Bartlett <abartlet at samba.org>
    Autobuild-Date(master): Fri Mar 14 10:16:41 CET 2014 on sn-devel-104

commit 83fbdc81cdfe6c018bb97d2d482ca09389b2c7af
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Fri Feb 21 10:20:52 2014 +1300

    kdc: Use correct KDC include path when building against the system heimdal
    
    This ensures we notice any API changes at compile time.
    
    Andrew Bartlett
    
    Signed-off-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Jelmer Vernooij <jelmer at samba.org>

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

Summary of changes:
 source4/dsdb/samdb/ldb_modules/repl_meta_data.c |   22 ++++++++++++++++++----
 source4/kdc/wscript_build                       |   16 +++++++++++-----
 2 files changed, 29 insertions(+), 9 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
index c5dcf21..e96bdf1 100644
--- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
+++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
@@ -660,7 +660,15 @@ static int replmd_replPropertyMetaData1_attid_sort(const struct replPropertyMeta
 						   const struct replPropertyMetaData1 *m2,
 						   const uint32_t *rdn_attid)
 {
-	if (m1->attid == m2->attid) {
+	/*
+	 * This assignment seems inoccous, but it is critical for the
+	 * system, as we need to do the comparisons as a unsigned
+	 * quantity, not signed (enums are signed integers)
+	 */
+	uint32_t attid_1 = m1->attid;
+	uint32_t attid_2 = m2->attid;
+
+	if (attid_1 == attid_2) {
 		return 0;
 	}
 
@@ -669,7 +677,7 @@ static int replmd_replPropertyMetaData1_attid_sort(const struct replPropertyMeta
 	 * so we need to return a value greater than zero
 	 * which means m1 is greater than m2
 	 */
-	if (m1->attid == *rdn_attid) {
+	if (attid_1 == *rdn_attid) {
 		return 1;
 	}
 
@@ -678,11 +686,17 @@ static int replmd_replPropertyMetaData1_attid_sort(const struct replPropertyMeta
 	 * so we need to return a value less than zero
 	 * which means m2 is greater than m1
 	 */
-	if (m2->attid == *rdn_attid) {
+	if (attid_2 == *rdn_attid) {
 		return -1;
 	}
 
-	return m1->attid > m2->attid ? 1 : -1;
+	/*
+	 * See above regarding this being an unsigned comparison.
+	 * Otherwise when the high bit is set on non-standard
+	 * attributes, they would end up first, before objectClass
+	 * (0).
+	 */
+	return attid_1 > attid_2 ? 1 : -1;
 }
 
 static int replmd_replPropertyMetaDataCtr1_sort(struct replPropertyMetaDataCtr1 *ctr1,
diff --git a/source4/kdc/wscript_build b/source4/kdc/wscript_build
index a566818..78a79b7 100755
--- a/source4/kdc/wscript_build
+++ b/source4/kdc/wscript_build
@@ -1,5 +1,11 @@
 #!/usr/bin/env python
 
+# We do this because we do not want to depend on the KDC, only find and use it's header files.  We do not want 
+if not bld.CONFIG_SET("USING_SYSTEM_KDC"):
+    kdc_include = "../heimdal/kdc"
+else:
+    kdc_include = getattr(bld.env, "CPPPATH_KDC")
+
 bld.SAMBA_MODULE('service_kdc',
 	source='kdc.c kpasswdd.c proxy.c',
 	subsystem='service',
@@ -12,7 +18,7 @@ bld.SAMBA_MODULE('service_kdc',
 bld.SAMBA_LIBRARY('HDB_SAMBA4',
                   source='hdb-samba4.c hdb-samba4-plugin.c',
                   deps='ldb auth4_sam auth_sam_reply samba-credentials hdb db-glue samba-hostconfig com_err',
-                  includes='../heimdal/kdc',
+                  includes=kdc_include,
                   private_library=True
                   )
 
@@ -20,7 +26,7 @@ bld.SAMBA_LIBRARY('HDB_SAMBA4',
 bld.SAMBA_LIBRARY('HDB_SAMBA4_PLUGIN',
                   source='hdb-samba4-plugin.c',
                   deps='hdb HDB_SAMBA4 samba-util samba-hostconfig ',
-                  includes='../heimdal/kdc',
+                  includes=kdc_include,
                   link_name='modules/hdb/hdb_samba4.so',
                   realname='hdb_samba4.so',
                   install_path='${MODULESDIR}/hdb',
@@ -29,14 +35,14 @@ bld.SAMBA_LIBRARY('HDB_SAMBA4_PLUGIN',
 
 bld.SAMBA_SUBSYSTEM('WDC_SAMBA4',
 	source='wdc-samba4.c',
-	includes='../heimdal/kdc',
+        includes=kdc_include,
 	deps='ldb auth4_sam auth_sam_reply samba-credentials hdb PAC_GLUE samba-hostconfig com_err'
 	)
 
 
 bld.SAMBA_SUBSYSTEM('PAC_GLUE',
 	source='pac-glue.c',
-	includes='../heimdal/kdc',
+        includes=kdc_include,
 	deps='ldb auth4_sam auth_sam_reply samba-credentials hdb samba-hostconfig com_err'
 	)
 
@@ -51,7 +57,7 @@ bld.SAMBA_LIBRARY('db-glue',
 	source='db-glue.c',
 	deps='ldb auth4_sam auth_sam_reply samba-credentials hdb samba-hostconfig com_err',
 	private_library=True,
-	includes='../heimdal/kdc',
+        includes=kdc_include,
 	)
 
 bld.SAMBA_SUBSYSTEM('MIT_SAMBA',


-- 
Samba Shared Repository


More information about the samba-cvs mailing list