if (child_domain != NULL) {
setproctitle("domain child [%s]", child_domain->name);
- } else if (child == idmap_child()) {
+ } else if (is_idmap_child(child)) {
setproctitle("idmap child");
}
* We are in idmap child, make sure that we set the
* check_online_event to bring primary domain online.
*/
- if (child == idmap_child()) {
+ if (is_idmap_child(child)) {
set_domain_online_request(primary_domain);
}
return &static_idmap_child;
}
+bool is_idmap_child(const struct winbindd_child *child)
+{
+ if (child == &static_idmap_child) {
+ return true;
+ }
+
+ return false;
+}
+
pid_t idmap_child_pid(void)
{
return static_idmap_child.pid;
void init_idmap_child(void);
struct winbindd_child *idmap_child(void);
+bool is_idmap_child(const struct winbindd_child *child);
pid_t idmap_child_pid(void);
struct dcerpc_binding_handle *idmap_child_handle(void);
struct idmap_domain *idmap_find_domain_with_sid(const char *domname,