]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
winbindd: assert wb_parent_idmap_setup_send/recv() was called before idmap_child_handle()
authorStefan Metzmacher <metze@samba.org>
Fri, 11 Sep 2020 12:12:17 +0000 (14:12 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 23 Oct 2020 03:25:36 +0000 (03:25 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14539

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
source3/winbindd/winbindd_idmap.c

index 487f27fd94dde669c609fadc4944f52da4475aa3..14836e3b8a0090fa2ecdbcdff2b10de0565c8d25 100644 (file)
@@ -59,6 +59,11 @@ pid_t idmap_child_pid(void)
 
 struct dcerpc_binding_handle *idmap_child_handle(void)
 {
+       /*
+        * The caller needs to use wb_parent_idmap_setup_send/recv
+        * before talking to the idmap child!
+        */
+       SMB_ASSERT(static_parent_idmap_config.num_doms > 0);
        return static_idmap_child.binding_handle;
 }