]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
winbind: make sure we don't contact trusted domains via SAMR as AD DC
authorStefan Metzmacher <metze@samba.org>
Thu, 22 Feb 2018 09:33:48 +0000 (10:33 +0100)
committerStefan Metzmacher <metze@samba.org>
Fri, 23 Feb 2018 11:47:25 +0000 (12:47 +0100)
This is not needed for the normal operation of an AD DC.

Administrators should just use other tools instead of
wbinfo to list and query users and groups.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13278

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/winbindd/winbindd_cm.c

index a88e05cac232d7780c9c2a0fea5899524194e190..27f6f3614e24977fa0ca63f34311043bd08ebbc3 100644 (file)
@@ -2650,6 +2650,20 @@ NTSTATUS cm_connect_sam(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx,
                }
        }
 
+       if (IS_AD_DC) {
+               /*
+                * In theory we should not use SAMR within
+                * winbindd at all, but that's a larger task to
+                * remove this and avoid breaking existing
+                * setups.
+                *
+                * At least as AD DC we have the restriction
+                * to avoid SAMR against trusted domains,
+                * as there're no existing setups.
+                */
+               return NT_STATUS_REQUEST_NOT_ACCEPTED;
+       }
+
 retry:
        status = init_dc_connection_rpc(domain, need_rw_dc);
        if (!NT_STATUS_IS_OK(status)) {