The branch, master has been updated
       via  8efd107 s4-pyrpc: fixed build on python 2.4
       via  3fe8e97 s4-rodc: fixed repsFrom store on RODC
       via  5995116 s4-kcc: a bit more debug info on repsFrom creation
      from  ead126c Merge branch 'v4-0-stable' into newmaster

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


- Log -----------------------------------------------------------------
commit 8efd1074c21fde70a31756dd54b3b31811beccc8
Author: Andrew Tridgell <tri...@samba.org>
Date:   Mon Sep 20 12:16:09 2010 -0700

    s4-pyrpc: fixed build on python 2.4
    
    Pair-Programmed-With: Jelmer Vernooij <jel...@samba.org>

commit 3fe8e97a7289c18903a9f481a13f8793f9f17bab
Author: Andrew Tridgell <tri...@samba.org>
Date:   Sun Sep 19 21:49:00 2010 -0700

    s4-rodc: fixed repsFrom store on RODC
    
    We were disallowing repsFrom store as a RODC on the basis that it is a
    write to the directory. It should be allowed, as its is a
    non-replicated attribute.
    
    Pair-Programmed-With: Andrew Bartlett <abart...@samba.org>

commit 59951163bea67b1a5d5eeef109f200a6323c00f3
Author: Andrew Tridgell <tri...@samba.org>
Date:   Sun Sep 19 21:48:35 2010 -0700

    s4-kcc: a bit more debug info on repsFrom creation
    
    Pair-Programmed-With: Andrew Bartlett <abart...@samba.org>

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

Summary of changes:
 source4/dsdb/kcc/kcc_periodic.c                 |    8 ++++++-
 source4/dsdb/samdb/ldb_modules/repl_meta_data.c |   25 ++++++++++------------
 source4/librpc/rpc/pyrpc.h                      |    4 +++
 source4/librpc/rpc/pyrpc_util.c                 |    4 ---
 4 files changed, 22 insertions(+), 19 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/kcc/kcc_periodic.c b/source4/dsdb/kcc/kcc_periodic.c
index a79c848..c396912 100644
--- a/source4/dsdb/kcc/kcc_periodic.c
+++ b/source4/dsdb/kcc/kcc_periodic.c
@@ -73,7 +73,8 @@ static bool check_MasterNC(struct kccsrv_partition *p, struct 
repsFromToBlob *r,
                struct ldb_dn *dn;
 
                struct GUID id2 = samdb_result_guid(msg, "invocationID");
-               if (!GUID_equal(&invocation_id, &id2)) {
+               if (GUID_all_zero(&id2) ||
+                   !GUID_equal(&invocation_id, &id2)) {
                        continue;
                }
 
@@ -89,6 +90,9 @@ static bool check_MasterNC(struct kccsrv_partition *p, struct 
repsFromToBlob *r,
                        }
                        if (ldb_dn_compare(dn, p->dn) == 0) {
                                talloc_free(dn);
+                               DEBUG(5,("%s hasMasterNCs match on %s in %s\n",
+                                        r1->other_info->dns_name, 
ldb_dn_get_linearized(dn),
+                                        ldb_dn_get_linearized(msg->dn)));
                                return true;
                        }
                        talloc_free(dn);
@@ -183,6 +187,7 @@ static NTSTATUS kccsrv_add_repsFrom(struct kccsrv_service 
*s, TALLOC_CTX *mem_ct
                                old_reps[old_count] = reps[i];
                                old_count++;
                                modified = true;
+                               DEBUG(4,(__location__ ": Added repsFrom for 
%s\n", reps[i].ctr.ctr1.other_info->dns_name));
                        }
                }
 
@@ -194,6 +199,7 @@ static NTSTATUS kccsrv_add_repsFrom(struct kccsrv_service 
*s, TALLOC_CTX *mem_ct
                                old_count--;
                                i--;
                                modified = true;
+                               DEBUG(4,(__location__ ": Removed repsFrom for 
%s\n", reps[i].ctr.ctr1.other_info->dns_name));
                        }
                }
                
diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c 
b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
index 45ef4d9..6ae8e92 100644
--- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
+++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
@@ -1246,20 +1246,6 @@ static int replmd_update_rpmd(struct ldb_module *module,
                        return LDB_ERR_OPERATIONS_ERROR;
                }
 
-               /*we have elements that will be modified*/
-               if (msg->num_elements > 0) {
-                       /*if we are RODC and this is a DRSR update then its ok*/
-                       if (!ldb_request_get_control(req, 
DSDB_CONTROL_REPLICATED_UPDATE_OID)) {
-                               ret = samdb_rodc(ldb, &rodc);
-                               if (ret != LDB_SUCCESS) {
-                                       DEBUG(4, (__location__ ": unable to 
tell if we are an RODC\n"));
-                               } else if (rodc) {
-                                       ldb_asprintf_errstring(ldb, "RODC 
modify is forbidden\n");
-                                       return LDB_ERR_REFERRAL;
-                               }
-                       }
-               }
-
                for (i=0; i<msg->num_elements; i++) {
                        struct ldb_message_element *old_el;
                        old_el = ldb_msg_find_element(res->msgs[0], 
msg->elements[i].name);
@@ -1283,6 +1269,17 @@ static int replmd_update_rpmd(struct ldb_module *module,
                struct ldb_val *md_value;
                struct ldb_message_element *el;
 
+               /*if we are RODC and this is a DRSR update then its ok*/
+               if (!ldb_request_get_control(req, 
DSDB_CONTROL_REPLICATED_UPDATE_OID)) {
+                       ret = samdb_rodc(ldb, &rodc);
+                       if (ret != LDB_SUCCESS) {
+                               DEBUG(4, (__location__ ": unable to tell if we 
are an RODC\n"));
+                       } else if (rodc) {
+                               ldb_asprintf_errstring(ldb, "RODC modify is 
forbidden\n");
+                               return LDB_ERR_REFERRAL;
+                       }
+               }
+
                md_value = talloc(msg, struct ldb_val);
                if (md_value == NULL) {
                        ldb_oom(ldb);
diff --git a/source4/librpc/rpc/pyrpc.h b/source4/librpc/rpc/pyrpc.h
index c3bc838..52f4f4d 100644
--- a/source4/librpc/rpc/pyrpc.h
+++ b/source4/librpc/rpc/pyrpc.h
@@ -22,6 +22,10 @@
 
 #include "libcli/util/pyerrors.h"
 
+#ifndef Py_TYPE /* Py_TYPE is only available on Python > 2.6 */
+#define Py_TYPE(ob)             (((PyObject*)(ob))->ob_type)
+#endif
+
 #define PY_CHECK_TYPE(type, var, fail) \
        if (!PyObject_TypeCheck(var, type)) {\
                PyErr_Format(PyExc_TypeError, __location__ ": Expected type 
'%s' for '%s' of type '%s'", (type)->tp_name, #var, Py_TYPE(var)->tp_name); \
diff --git a/source4/librpc/rpc/pyrpc_util.c b/source4/librpc/rpc/pyrpc_util.c
index ba42c08..33bce38 100644
--- a/source4/librpc/rpc/pyrpc_util.c
+++ b/source4/librpc/rpc/pyrpc_util.c
@@ -31,10 +31,6 @@
 #include "lib/messaging/messaging.h"
 #include "lib/messaging/irpc.h"
 
-#ifndef Py_TYPE /* Py_TYPE is only available on Python > 2.6 */
-#define Py_TYPE(ob)             (((PyObject*)(ob))->ob_type)
-#endif
-
 bool py_check_dcerpc_type(PyObject *obj, const char *module, const char 
*typename)
 {
        PyObject *mod;


-- 
Samba Shared Repository

Reply via email to