s4:repl_meta_data LDB module - convert two debug messages into error messages
authorMatthias Dieter Wallnöfer <mdw@samba.org>
Fri, 12 Nov 2010 18:28:48 +0000 (19:28 +0100)
committerMatthias Dieter Wallnöfer <mdw@samba.org>
Fri, 12 Nov 2010 18:55:04 +0000 (18:55 +0000)
These regarding "objectGUID".

source4/dsdb/samdb/ldb_modules/repl_meta_data.c

index b2d5292a14f05347290559c4d2e4dd03681908e1..957ca3ccc543bebd2708b25c4651815fffd854b3 100644 (file)
@@ -770,8 +770,8 @@ static int replmd_add(struct ldb_module *module, struct ldb_request *req)
         guid_blob = ldb_msg_find_ldb_val(req->op.add.message, "objectGUID");
        if ( guid_blob != NULL ) {
                if( !allow_add_guid ) {
-                       ldb_debug_set(ldb, LDB_DEBUG_ERROR,
-                             "replmd_add: it's not allowed to add an object with objectGUID\n");
+                       ldb_set_errstring(ldb,
+                                         "replmd_add: it's not allowed to add an object with objectGUID!");
                        talloc_free(ac);
                        return LDB_ERR_UNWILLING_TO_PERFORM;
                } else {
@@ -2169,8 +2169,8 @@ static int replmd_modify(struct ldb_module *module, struct ldb_request *req)
 
        guid_blob = ldb_msg_find_ldb_val(req->op.mod.message, "objectGUID");
        if ( guid_blob != NULL ) {
-               ldb_debug_set(ldb, LDB_DEBUG_ERROR,
-                             "replmd_modify: it's not allowed to change the objectGUID\n");
+               ldb_set_errstring(ldb,
+                                 "replmd_modify: it's not allowed to change the objectGUID!");
                talloc_free(ac);
                return LDB_ERR_CONSTRAINT_VIOLATION;
        }