s4-netlogon: fixed logic for setting DS_SERVER_WRITABLE
authorAndrew Tridgell <tridge@samba.org>
Tue, 14 Sep 2010 23:19:47 +0000 (09:19 +1000)
committerAndrew Tridgell <tridge@samba.org>
Wed, 15 Sep 2010 05:39:36 +0000 (15:39 +1000)
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

source4/cldap_server/netlogon.c

index 1dd3cb7e0e78afaf9afe9e8c9433d3d4d036744e..7192e4601f8dfc0529c69133eeb5622af15c0d59 100644 (file)
@@ -261,7 +261,7 @@ NTSTATUS fill_netlogon_samlogon_response(struct ldb_context *sam_ctx,
                server_type |= DS_SERVER_KDC;
        }
 
-       if (samdb_rodc(sam_ctx, &am_rodc) != LDB_SUCCESS && !am_rodc) {
+       if (samdb_rodc(sam_ctx, &am_rodc) == LDB_SUCCESS && !am_rodc) {
                server_type |= DS_SERVER_WRITABLE;
        }