[SCM] Samba Shared Repository - branch master updated

Matthias Dieter Wallnöfer mdw at samba.org
Mon Nov 15 16:15:01 MST 2010


The branch, master has been updated
       via  329f76c s4:heimdal - fix the return code of a non-void function
       via  59e22ba s4:torture/basic/base.c - fix output warnings regarding "time_t"
       via  061766e s4:objectclass LDB module - improve the default name context checking on modifications
      from  6ff009c s4-join: not all versions of w2003 have msDS-SupportedEncryptionTypes

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


- Log -----------------------------------------------------------------
commit 329f76c410ec0d8eee9ee471dd79d192e305cdba
Author: Matthias Dieter Wallnöfer <mdw at samba.org>
Date:   Mon Nov 15 22:42:22 2010 +0100

    s4:heimdal - fix the return code of a non-void function
    
    Autobuild-User: Matthias Dieter Wallnöfer <mdw at samba.org>
    Autobuild-Date: Mon Nov 15 23:14:57 UTC 2010 on sn-devel-104

commit 59e22ba9c06adba09ef40d9b1f8f01c7accc3ae8
Author: Matthias Dieter Wallnöfer <mdw at samba.org>
Date:   Mon Nov 15 22:38:09 2010 +0100

    s4:torture/basic/base.c - fix output warnings regarding "time_t"
    
    "time_t" is generally "long int".

commit 061766e732490b81df3e9ce5968b281efd8c3c0d
Author: Matthias Dieter Wallnöfer <mdw at samba.org>
Date:   Mon Nov 15 22:30:16 2010 +0100

    s4:objectclass LDB module - improve the default name context checking on modifications
    
    Pointed out by abartlet

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

Summary of changes:
 source4/dsdb/samdb/ldb_modules/objectclass.c |   30 +++++++++++--------------
 source4/heimdal/kdc/default_config.c         |    2 +
 source4/torture/basic/base.c                 |    6 +++-
 3 files changed, 19 insertions(+), 19 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/samdb/ldb_modules/objectclass.c b/source4/dsdb/samdb/ldb_modules/objectclass.c
index 5e3226a..19feaa5 100644
--- a/source4/dsdb/samdb/ldb_modules/objectclass.c
+++ b/source4/dsdb/samdb/ldb_modules/objectclass.c
@@ -844,23 +844,19 @@ static int objectclass_modify(struct ldb_module *module, struct ldb_request *req
 	 * only on application NCs - not on the standard DCs */
 	if (oc_changes &&
 	    (dsdb_forest_functional_level(ldb) < DS_DOMAIN_FUNCTION_2003)) {
-		int cnt = samdb_search_count(ldb, ac,
-					     ldb_get_default_basedn(ldb),
-					     "(distinguishedName=%s)",
-					     ldb_dn_get_linearized(req->op.mod.message->dn));
-		if (cnt == 0) {
-			cnt = samdb_search_count(ldb, ac,
-						 ldb_get_config_basedn(ldb),
-						 "(distinguishedName=%s)",
-						 ldb_dn_get_linearized(req->op.mod.message->dn));
-		}
-		if (cnt == 0) {
-			cnt = samdb_search_count(ldb, ac,
-						 ldb_get_schema_basedn(ldb),
-						 "(distinguishedName=%s)",
-						 ldb_dn_get_linearized(req->op.mod.message->dn));
+		struct ldb_dn *nc_root;
+
+		ret = dsdb_find_nc_root(ldb, ac, req->op.mod.message->dn,
+					&nc_root);
+		if (ret != LDB_SUCCESS) {
+			return ret;
 		}
-		if (cnt != 0) {
+
+		if ((ldb_dn_compare(nc_root, ldb_get_default_basedn(ldb)) == 0) ||
+		    (ldb_dn_compare(nc_root, ldb_get_config_basedn(ldb)) == 0) ||
+		    (ldb_dn_compare(nc_root, ldb_get_schema_basedn(ldb)) == 0)) {
+			ldb_set_errstring(ldb,
+					  "objectclass: object class changes on objects under the standard name contexts not allowed!");
 			return LDB_ERR_UNWILLING_TO_PERFORM;
 		}
 	}
diff --git a/source4/heimdal/kdc/default_config.c b/source4/heimdal/kdc/default_config.c
index f745183..66108f4 100644
--- a/source4/heimdal/kdc/default_config.c
+++ b/source4/heimdal/kdc/default_config.c
@@ -297,4 +297,6 @@ krb5_kdc_pkinit_config(krb5_context context, krb5_kdc_configuration *config)
     }
 
 #endif /* PKINIT */
+
+    return 0;
 }
diff --git a/source4/torture/basic/base.c b/source4/torture/basic/base.c
index eeba252..d5090e9 100644
--- a/source4/torture/basic/base.c
+++ b/source4/torture/basic/base.c
@@ -1777,7 +1777,8 @@ static bool run_birthtimetest(struct torture_context *tctx,
 			smbcli_errstr(cli->tree));
 		correct = false;
 	} else {
-		fprintf(stdout,"c_time = %d, c_time1 = %d\n",c_time,c_time1);
+		fprintf(stdout, "c_time = %li, c_time1 = %li\n",
+			(long) c_time, (long) c_time1);
 		if (c_time1 != c_time) {
 			torture_comment(tctx, "This system updated file \
 					birth times! Not expected!\n");
@@ -1820,7 +1821,8 @@ static bool run_birthtimetest(struct torture_context *tctx,
 				smbcli_errstr(cli->tree));
 		correct = false;
 	} else {
-		fprintf(stdout,"c_time = %d, c_time1 = %d\n",c_time,c_time1);
+		fprintf(stdout, "c_time = %li, c_time1 = %li\n",
+			(long) c_time, (long) c_time1);
 		if (c_time1 != c_time) {
 			torture_comment(tctx, "This system  updated directory \
 					birth times! Not Expected!\n");


-- 
Samba Shared Repository


More information about the samba-cvs mailing list