s4:dsdb/extended_dn_out: make use of the existing have_reveal_control variable
[samba.git] / source4 / dsdb / samdb / ldb_modules / extended_dn_out.c
index 53cbe345070abe3d8a2fee42ad6d56aaea02fa31..1664b4466b5aa127027969d5889c061cc20a83c1 100644 (file)
@@ -402,8 +402,7 @@ static int extended_callback(struct ldb_request *req, struct ldb_reply *ares)
                                        talloc_free(dsdb_dn);
                                        return ldb_module_done(ac->req, NULL, NULL, ret);
                                }
-                               if (remove_value &&
-                                   !ldb_request_get_control(req, LDB_CONTROL_REVEAL_INTERNALS)) {
+                               if (remove_value && !have_reveal_control) {
                                        /* we show these with REVEAL
                                           to allow dbcheck to find and
                                           cleanup these orphaned links */