s4: do not change the critical flag when it's on a dirsync control
authorMatthieu Patou <mat@matws.net>
Mon, 7 Feb 2011 06:58:17 +0000 (09:58 +0300)
committerMatthieu Patou <mat@matws.net>
Sat, 21 May 2011 10:39:12 +0000 (14:39 +0400)
Signed-off-by: Andrew Tridgell <tridge@samba.org>
source4/dsdb/samdb/ldb_modules/rootdse.c

index 7bc27b46b46a98f16ca98cbcdbbc12474bb822c6..c584a11b2c6e9f389003feaec9f2014e3216ad64 100644 (file)
@@ -612,7 +612,11 @@ static int rootdse_filter_controls(struct ldb_module *module, struct ldb_request
                        continue;
                }
 
-               if (is_registered) {
+               /* If the control is DIRSYNC control then we keep the critical
+                * flag as the dirsync module will need to act upon it
+                */
+               if (is_registered && strcmp(req->controls[i]->oid,
+                                       LDB_CONTROL_DIRSYNC_OID)!= 0) {
                        req->controls[i]->critical = 0;
                }
        }