s4-drs: don't give an error on repsTo delete if add is also specified
authorAndrew Tridgell <tridge@samba.org>
Sat, 2 Jan 2010 05:51:30 +0000 (16:51 +1100)
committerAndrew Tridgell <tridge@samba.org>
Sat, 2 Jan 2010 06:28:35 +0000 (17:28 +1100)
w2k8-r2 in dcpromo asks for a delete+add during its initial join.

source4/rpc_server/drsuapi/updaterefs.c

index 6e2efed4f9f2f7e9f20ced72d23c3c3e4bcd2df6..b1e3d6c352ebb216fe863d37a032fd3306898e47 100644 (file)
@@ -105,7 +105,9 @@ static WERROR uref_del_dest(struct ldb_context *sam_ctx, TALLOC_CTX *mem_ctx,
                return werr;
        }
 
-       if (!found && !(options & DRSUAPI_DS_REPLICA_UPDATE_GETCHG_CHECK)) {
+       if (!found &&
+           !(options & DRSUAPI_DS_REPLICA_UPDATE_GETCHG_CHECK) &&
+           !(options & DRSUAPI_DS_REPLICA_UPDATE_ADD_REFERENCE)) {
                return WERR_DS_DRA_REF_NOT_FOUND;
        }