r25068: Older samba3 DCs will return DCERPC_FAULT_OP_RNG_ERROR for every opcode on the initial-v3-0-unstable
authorGünther Deschner <gd@samba.org>
Mon, 10 Sep 2007 23:12:27 +0000 (23:12 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:23:56 +0000 (12:23 -0500)
LSARPC_DS pipe, continue with no_lsarpc_ds mode here as well to get
domain->initialized set to True. This avoids permanent scanning of Samba3 DCs
in winbindd. Thanks Michael, for pointing this out.

Guenther

source/nsswitch/winbindd_cm.c

index 0571cdad60b71a2e863b84145e897fff307805a2..85700272ea0c77121865d4d7dcf63c08b6106c54 100644 (file)
@@ -1696,6 +1696,16 @@ static void set_dc_type_and_flags_connect( struct winbindd_domain *domain )
                DEBUG(5, ("set_dc_type_and_flags_connect: rpccli_ds_getprimarydominfo "
                          "on domain %s failed: (%s)\n",
                          domain->name, nt_errstr(result)));
+
+               /* older samba3 DCs will return DCERPC_FAULT_OP_RNG_ERROR for
+                * every opcode on the LSARPC_DS pipe, continue with
+                * no_lsarpc_ds mode here as well to get domain->initialized
+                * set - gd */
+
+               if (NT_STATUS_V(result) == DCERPC_FAULT_OP_RNG_ERROR) {
+                       goto no_lsarpc_ds;
+               }
+
                return;
        }